[GNC] Should the gnc-fq-* helper scripts be invoked as commands, or as an arg to perl?

Jim DeLaHunt list+gnucash at jdlh.com
Tue Jun 15 03:15:53 EDT 2021


On 2021-06-14 11:58, Frank H. Ellenberger wrote:

> Hello Jim,
>
> I fear this changes would go in the wrong direction. It would hide the
> important "normal" stuff behind a bunch of noise.
>
> Instead of adding aphavantage and probably other keys to each command,
> explain for your OSes, how to add them to the environment on each login.
> IIRC future FQ release will handle it different.

I fear that I did a terrible job of explaining what change I propose to 
the Online quotes wiki page. You are the second person who got the 
impression that I want to add lots of Alphavantage keys and paths to 
each command. I'm sorry if my wording gave that impression.  I certainly 
do not propose that.

I propose to change every invocation on that page from a bare name of 
the helper script, e.g.

gnc-fq-dump currency USD EUR

by adding just "perl" in front. Something like

perl gnc-fq-dump currency USD EUR


> Instead of adding -{w|W} to each command, explain them in the
> troubleshooting section and perhaps how to add them to perls configuration.
This is a good point. I read about the -w option to perl. While GnuCash 
appears to use it when calling gnc-fc-helper, I agree that we don't need 
it in each example on the page. Drop it.
> The gnc-fq-* scripts have a shebang and Windows it the only OS without
> the mechanism.
>
> The main purpose ofthe helper scripts is not to mimic GnuCash's call but
> to find out why it is not working as expected.

I agree. But I now understand that for some users, including me, 
invoking the gnc-fq-* scripts as commands and relying on the shebang, 
leads to different results than invoking "perl gnc-fq-dump" etc. 
Teaching the user to rely on the shebang can make it _harder_ to find 
out why online quotes are not working as expected. Teaching the user 
"perl gnc-fq-dump" is still simple, but avoids that problem.

Thank you for your comments.

       —Jim DeLaHunt




More information about the gnucash-user mailing list