Re: [GNC] GnuCash very slow to start up and quit

2021-06-13 Thread Chris Green
On Sun, Jun 13, 2021 at 06:31:25AM +, Tim Hume wrote:
> Hi,
> 
> I've been using GnuCash for a number of years. I especially like how it 
> can handle foreign currencies - a feature that the commercial software 
> packages tend to charge extra for. 
> 
> But a continual annoyance is how slow GnuCash is at these operations:
> 
> 1. Starting up (Takes more than a minute)
> 2. Quitting (Takes a long time)
> 3. Importing new transactions from CSV files (Easily a couple of minutes for 
> modest imports).
> 
> I'm running GnuCash on Fedora Linux.
> 
I'm running it on two Ubuntu Linux systems (same files on both, using
Syncthing to keep synchronised).

> Version: 4.5 (27th March 2021 build)
>
In my case it's version 4.4, default from the Ubuntu repositories.

> Hardware: i5 Dell ultrabook, 8Mbyte RAM.
>
Laptop is Lenovo, i7, desktop Fujitsu i5

> Backend: SQLite database
>
Ditto


> Database size: About 36 Megabytes on an SSD drive.
> 
Mine is much smaller, only 250k or so, also on SSD on both systems.


> Is there any quick tips to speed things up? Or should I just throw more 
> hardware at it (Ryzen7 desktop or something similar)? When running top, 
> I see gnucash tends to be CPU bound when it is performing these slow tasks. 
> 
Mine starts up in a second or two and quits instantaneously.  I guess
the difference must simply be down to the size of database.  I create
a new accounts file each year, apart from anything else it keeps the
auditor happy (church accounts) and it certainly keeps it small. 
Could you maybe split your system somehow?

-- 
Chris Green
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] GnuCash very slow to start up and quit

2021-06-13 Thread Tim Hume
On Sunday, June 13th, 2021 at 17:28, Chris Green  wrote:

> the difference must simply be down to the size of database. I create
> a new accounts file each year, apart from anything else it keeps the
> auditor happy (church accounts) and it certainly keeps it small.
> Could you maybe split your system somehow?

I guess it must be just the size. I too only have a year of data - it's for a 
money transfer business, so there are lots of transactions every day. The start 
up and quit time shouldn't be this long - I/O will be a second at most, and the 
fact that I see GnuCash is CPU bound suggests there is something a little 
inefficient going on in the bowels of the code.

I'm going to throw more powerful hardware at the problem to start with. If I 
get sufficiently annoyed, I might delve into the source code :-).
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


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

2021-06-13 Thread Jim DeLaHunt
GnuCash ships with Helper Scripts  which make it easier to work with 
Finance::Quote. They are: gnc-fq-check, gnc-fq-dump, gnc-fq-helper, and 
gnc-fq-update. Collectively, call them gc-fq-* .


When running these Helper Scripts from a command prompt on MacOS and 
Linux, should they invoked as commands:


% gnc-fq-check

Or should they be invoked as an argument to a perl command:

% perl gnc-fq-check

?

The wiki page https://wiki.gnucash.org/wiki/Online_Quotes#Helper_Scripts 
says, pretty clearly, the former:


"While unixoid operating systems use a shebang (#!) to associate perl 
scripts with the Perl interpreter, others, e.g. Windows, will fail….

C:\> gnc-fq-check [fails]…
so use the following: … Prefix any gnc-fq-xxx perl script command with 
perl and a space: …

perl gnc-fq-check …"

The perl invocation is described as a workaround needed on Windows 
because the shebang doesn't work. All the other examples show invocation 
as a command, e.g.


$ gnc-fq-check

This makes a difference on Unixoid systems when there are multiple Perl 
installations. Presumably command invocation of the helper scripts will 
always obey the shebang and thus always run the same Perl installation. 
But invocation as an argument to "perl" will run whichever Perl 
installation the environment dictates.


Am I correct in guessing that GnuCash 4.5 internally invokes these 
scripts (maybe just gnc-fq-helper) as an argument to a perl command?


If so, should the wiki page https://wiki.gnucash.org/wiki/Online_Quotes 
use the same invocation?


Best regards,
 —Jim DeLaHunt


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


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

2021-06-13 Thread Liz Dodd
On Sun, 13 Jun 2021 00:39:39 -0700
Jim DeLaHunt  wrote:

> GnuCash ships with Helper Scripts  which make it easier to work with 
> Finance::Quote. They are: gnc-fq-check, gnc-fq-dump, gnc-fq-helper,
> and gnc-fq-update. Collectively, call them gc-fq-* .
> 
> When running these Helper Scripts from a command prompt on MacOS and 
> Linux, should they invoked as commands:
> 
> % gnc-fq-check
> 
> Or should they be invoked as an argument to a perl command:
> 
> % perl gnc-fq-check
> 
> ?
> 
> The wiki page
> https://wiki.gnucash.org/wiki/Online_Quotes#Helper_Scripts says,
> pretty clearly, the former:
> 
> "While unixoid operating systems use a shebang (#!) to associate perl 
> scripts with the Perl interpreter, others, e.g. Windows, will fail….
> C:\> gnc-fq-check [fails]…  
> so use the following: … Prefix any gnc-fq-xxx perl script command
> with perl and a space: …
> perl gnc-fq-check …"
> 
> The perl invocation is described as a workaround needed on Windows 
> because the shebang doesn't work. All the other examples show
> invocation as a command, e.g.
> 
> $ gnc-fq-check
> 
> This makes a difference on Unixoid systems when there are multiple
> Perl installations. Presumably command invocation of the helper
> scripts will always obey the shebang and thus always run the same
> Perl installation. But invocation as an argument to "perl" will run
> whichever Perl installation the environment dictates.
> 
> Am I correct in guessing that GnuCash 4.5 internally invokes these 
> scripts (maybe just gnc-fq-helper) as an argument to a perl command?
> 
> If so, should the wiki page
> https://wiki.gnucash.org/wiki/Online_Quotes use the same invocation?
> 
> Best regards,
>   —Jim DeLaHunt
> 

I don't know the answer, but I think that if you could write it out for
the wiki it would be good long term recording.

Liz
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] GnuCash very slow to start up and quit

2021-06-13 Thread Saša Janiška
On Sun, 13 Jun 2021 08:28:12 +0100
Chris Green  wrote:

> > Backend: SQLite database
> >  
> Ditto

Just wonder how does SQLite back-end compare with XML and whether you
recommend one over the other? (my XML is 20MB uncompressed and under
VCS).


Sincerely,
Gour

-- 
As a lamp in a windless place does not waver, so the transcendentalist,
whose mind is controlled, remains always steady in his meditation on the
transcendent self.


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


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

2021-06-13 Thread Peter West
I think it is still true for Big Sur that the launchctl environment for Mac can 
be set with launchctl commands.

To set the same env var in  the launchctl environment as in your .profile 
environment, you can include in your .profile a function like this:

set_env_var () {
eval export $1=\""$2"\"
eval launchctl setenv "$1" \""$2"\"
}

Instead of
export PATH=blah
use
set_env_var PATH “blah”

I not sure about the timing of environment settings; that is, whether you can 
start up a shell and then immediately invoke, say, GnuCash, or whether you must 
log out and in to have the env vars in effect.


—
Peter West
p...@ehealth.id.au
“…whoever says, ‘You fool!’ will be liable to the hell of fire.”



> On 13 Jun 2021, at 6:23 pm, Liz Dodd  wrote:
> 
> On Sun, 13 Jun 2021 00:39:39 -0700
> Jim DeLaHunt mailto:list+gnuc...@jdlh.com>> wrote:
> 
>> GnuCash ships with Helper Scripts  which make it easier to work with 
>> Finance::Quote. They are: gnc-fq-check, gnc-fq-dump, gnc-fq-helper,
>> and gnc-fq-update. Collectively, call them gc-fq-* .
>> 
>> When running these Helper Scripts from a command prompt on MacOS and 
>> Linux, should they invoked as commands:
>> 
>> % gnc-fq-check
>> 
>> Or should they be invoked as an argument to a perl command:
>> 
>> % perl gnc-fq-check
>> 
>> ?
>> 
>> The wiki page
>> https://wiki.gnucash.org/wiki/Online_Quotes#Helper_Scripts says,
>> pretty clearly, the former:
>> 
>> "While unixoid operating systems use a shebang (#!) to associate perl 
>> scripts with the Perl interpreter, others, e.g. Windows, will fail….
>> C:\> gnc-fq-check [fails]…  
>> so use the following: … Prefix any gnc-fq-xxx perl script command
>> with perl and a space: …
>> perl gnc-fq-check …"
>> 
>> The perl invocation is described as a workaround needed on Windows 
>> because the shebang doesn't work. All the other examples show
>> invocation as a command, e.g.
>> 
>> $ gnc-fq-check
>> 
>> This makes a difference on Unixoid systems when there are multiple
>> Perl installations. Presumably command invocation of the helper
>> scripts will always obey the shebang and thus always run the same
>> Perl installation. But invocation as an argument to "perl" will run
>> whichever Perl installation the environment dictates.
>> 
>> Am I correct in guessing that GnuCash 4.5 internally invokes these 
>> scripts (maybe just gnc-fq-helper) as an argument to a perl command?
>> 
>> If so, should the wiki page
>> https://wiki.gnucash.org/wiki/Online_Quotes use the same invocation?
>> 
>> Best regards,
>>  —Jim DeLaHunt
>> 
> 
> I don't know the answer, but I think that if you could write it out for
> the wiki it would be good long term recording.
> 
> Liz
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see 
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] GnuCash very slow to start up and quit

2021-06-13 Thread Tim Hume
On Sunday, June 13th, 2021 at 18:28, Saša Janiška  wrote:

> Just wonder how does SQLite back-end compare with XML and whether you
> recommend one over the other? (my XML is 20MB uncompressed and under
> VCS).

I just ran a test. My data file is 37 MByte in SQLite format, and 52 MByte when 
in XML and uncompressed. However, the compressed XML is under 4 MByte.

It took 1m 17s to open GnuCash with the compressed XML file, and 55s with the 
SQLite file. I'd recommend the SQLite format based on these tests.

My CPU is currently an i5 6300U. I was looking at a small PC with a Ryzen 7 
4700U CPU. Given GnuCash runs on a single thread, I suspect speedup in loading 
the data will be about 1.5 times given it seems to be CPU bound. I'm not sure 
if I'm going to upgrade. The advantage of my current setup is that it's on a 
laptop, so if the power goes out (which it does frequently enough) I don't lose 
everything. Mind you, I wouldn't mind the extra speed. Once GnuCash is loaded, 
it's fast enough to do the tasks I want it to do, so I normally just keep it 
open.

Cheers,

Tim
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] GnuCash very slow to start up and quit

2021-06-13 Thread David Carlson
Speed depends on not only the factors that you have identified, but other
factors as well.  I have an instance of release 3.8 running in a Linux Lite
environment within a  Virtualbox on a laptop.  Of course this hardware has
its limits too.

I happen to normally store my compressed XML datafile on a Network Attached
Storage device connected via Ethernet in (probably unencrypted) SMB
protocol, which I thought was a speedy connection.  However, I recently set
up an alternate arrangement on a locally attached USB 3.0 memory stick and
found that file saves in particular sped up from around 30 seconds to
around 2 or 3 seconds.  This is anecdotal information as I currently am not
in a position to perform a controlled experiment.  I suspect that there
must be a kink in the Ethernet possibly limiting it to 1 MHz or 10 MHZ.
instead of the 100 MHz I expect on my rather dated network.  I do know that
the network saves take roughly the same amount of time when Wi-Fi is used
as the transmission medium, but there is still one ethernet cable between
the router and the NAS.  That connection could be 1 Gigahertz if the cable
is good enough.  I will be checking that when I get a chance in a week or
two.

On Sun, Jun 13, 2021 at 5:11 AM Tim Hume  wrote:

> On Sunday, June 13th, 2021 at 18:28, Saša Janiška 
> wrote:
>
> > Just wonder how does SQLite back-end compare with XML and whether you
> > recommend one over the other? (my XML is 20MB uncompressed and under
> > VCS).
>
> I just ran a test. My data file is 37 MByte in SQLite format, and 52 MByte
> when in XML and uncompressed. However, the compressed XML is under 4 MByte.
>
> It took 1m 17s to open GnuCash with the compressed XML file, and 55s with
> the SQLite file. I'd recommend the SQLite format based on these tests.
>
> My CPU is currently an i5 6300U. I was looking at a small PC with a Ryzen
> 7 4700U CPU. Given GnuCash runs on a single thread, I suspect speedup in
> loading the data will be about 1.5 times given it seems to be CPU bound.
> I'm not sure if I'm going to upgrade. The advantage of my current setup is
> that it's on a laptop, so if the power goes out (which it does frequently
> enough) I don't lose everything. Mind you, I wouldn't mind the extra speed.
> Once GnuCash is loaded, it's fast enough to do the tasks I want it to do,
> so I normally just keep it open.
>
> Cheers,
>
> Tim
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


-- 
David Carlson
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] On a Mac, where are the database configuration details stored?

2021-06-13 Thread Peter West
As it says, where can I find the details of the database connection?




—
Peter West
p...@ehealth.id.au
“…whoever says, ‘You fool!’ will be liable to the hell of fire.”

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] gnucash-cli says, "No quotes retrieved. Finance::Quote isn't installed properly" on macOS

2021-06-13 Thread John Ralls


> On Jun 12, 2021, at 11:49 PM, Jim DeLaHunt  wrote:
> 
> On 2021-06-12 20:49, John Ralls wrote:
>> 
>>> On Jun 12, 2021, at 6:31 PM, Jim DeLaHunt  wrote:
>>> 
>>> On 2021-06-12 09:13, John Ralls wrote:
>>> 
> On Jun 12, 2021, at 12:22 AM, Jim DeLaHunt  wrote:
> 
> OK, I can understand that the MacPorts installation of perl may be 
> configured to look for perl packages in MacPorts locations, and ignore 
> the system locations. But I don't understand wny the GUI app of GnuCash 
> apparently can find Finance::Quote when run from the GUI, but the 
> gnucash-cli app apparently cannot. What is different?
 Because applications started by LaunchServices don't get the environment 
 from your shell's startup files. That means GnuCash is running 
 /usr/bin/perl, not /opt/local/bin/perl but when you run a program from 
 Terminal the environment is read so gnucash-cli runs /opt/local/bin/perl.
>>> Thank you, John, this explanation is very helpful. I can understand that 
>>> the GnuCash GUI and the gnucash-cli experience different environments, 
>>> especially different $PATH values, because the OS invokes them in different 
>>> environments.
>>> 
>>> But I find it very confusing to have gnucash-cli be presented as an 
>>> integral part of GnuCash, and all the references to a singular action of 
>>> "update Finance::Quote on the system", then have gnucash-cli behave 
>>> differently and require a different installation of Finance::Quote than the 
>>> GnuCash GUI.
>>> 
>>> It seems to me that if both gnucash-cli and the GnuCash GUI would invoke 
>>> the perl executable at an absolute path, then they would have consistent 
>>> behaviour. Thus I wonder why GnuCash lets the environment find the perl 
>>> executable.
>>> 
>>> I have filed Bug 798209, "gnucash-cli might not use the same perl and 
>>> Finance::Quote as GnuCash GUI", 
>>>  , to track this.
>>> 
>>> My workaround as a MacPorts user: install Finance::Quote into the MacPorts 
>>> perl environment:
>>> 
>>> ```
>>> % port install p5-finance-quote
>> Jim,
>> 
>> I summarily dismissed your bug report. It's on users who modify their 
>> operating systems to know what they're doing.
>> 
>> It's standard practice nowadays to use the environment to get the executable 
>> to make it easy for users to set the one they want. That does require that 
>> users have a clue, but users without one who mess up their OS with package 
>> managers they don't understand have only themselves to blame.
> 
> As I said to David, I submit that installing packages with MacPorts or 
> Homebrew has aspects of installing application software, as well as aspects 
> of altering the OS. Installing application software is a reasonable thing for 
> people to do with their personal computers. I don't think its reasonable to 
> say that GnuCash should ignore the existence of MacPorts and Homebrew.
> 
> It would help for the gnucash-cli documentation to mention that GnuCash lets 
> the environment pick which perl instance to run.
> 
> It would help for the Finance::Quote troubleshooting documentation to mention 
> this problem, and the solution.
> 
> It would help for the GnuCash error message to also say, "Use `perl -e 'print 
> join("\n", @INC), "\n";'` to see where perl is looking.".
> 
>> There's a really simple solution for you: Just install F::Q in both perls:
> Agreed, but…
>>   /opt/local/bin/perl 
>> /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-update
> 
> AFAIK it is bad practice to have anything but MacPorts install into the 
> MacPorts directory tree. Maybe there are circumstances in which it works for 
> perl modules in a MacPorts instance, but there are many stories of the 
> MacPorts and other package managers conflicting. Fortunately, Finance::Quote 
> is available via MacPorts. Thus I feel more confident with:
> 
> % sudo port install p5-finance-quote
> 
> I appreciate all the explanations. Thank you.

IMO installing MacPorts or Homebrew as those package managers intend changes 
the operating system. It's no longer macOS, it's MacPorts or Homebrew.

MacPorts correctly addresses the problem by supplying their own "port" for 
GnuCash. If you want to run MacPorts, use their GnuCash and if it doesn't work 
the way you expect, complain to them.

Homebrew, on the other hand, is different: They claim to have a recipe for 
GnuCash but all it does is download the dmg from Github.

There are several ways to work around the problem you've made for yourself; 
* Create a second user in System Preferences and not install the package 
manager's environment changes. Fast User Switching makes it easy to flip back 
and forth between the two.
* Remove the environment changes from your shell's rc files (e.g. .bash_profile 
and .bashrc if you use Bash as your shell) and put them in their own shell 
script that you'd source when you want package manager behavior or a shell 
script that removes the en

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

2021-06-13 Thread John Ralls
https://apple.stackexchange.com/questions/51677/how-to-set-path-for-finder-launched-applications
 has some details about using launchctl. It seems to be a bit fiddly and with 
setenv you have to run the command *once* after every reboot, meaning that 
after you boot you login, open a Terminal session, run `launchctl setenv...`, 
and kill the Dock. After that you can run GnuCash from Finder and it will use 
the changed path, though the SO indicates that it works only on 10.7.

On newer versions of macOS there's `config` command that you run just once then 
reboot, but it's not clear from the SO nor from launchctl(1) with what version 
that was introduced; 10.12 is the earliest mentioned in the SO. Since it's 
persistent make sure that you know how to undo it if you don't like the 
results... if you screw it up badly enough that might mean booting to single 
user. Definitely for experts only.

Regards,
John Ralls


> On Jun 13, 2021, at 2:01 AM, Peter West  wrote:
> 
> I think it is still true for Big Sur that the launchctl environment for Mac 
> can be set with launchctl commands.
> 
> To set the same env var in  the launchctl environment as in your .profile 
> environment, you can include in your .profile a function like this:
> 
> set_env_var () {
>eval export $1=\""$2"\"
>eval launchctl setenv "$1" \""$2"\"
> }
> 
> Instead of
> export PATH=blah
> use
> set_env_var PATH “blah”
> 
> I not sure about the timing of environment settings; that is, whether you can 
> start up a shell and then immediately invoke, say, GnuCash, or whether you 
> must log out and in to have the env vars in effect.
> 
> 
> —
> Peter West
> p...@ehealth.id.au
> “…whoever says, ‘You fool!’ will be liable to the hell of fire.”
> 
> 
> 
>> On 13 Jun 2021, at 6:23 pm, Liz Dodd  wrote:
>> 
>> On Sun, 13 Jun 2021 00:39:39 -0700
>> Jim DeLaHunt mailto:list+gnuc...@jdlh.com>> wrote:
>> 
>>> GnuCash ships with Helper Scripts  which make it easier to work with 
>>> Finance::Quote. They are: gnc-fq-check, gnc-fq-dump, gnc-fq-helper,
>>> and gnc-fq-update. Collectively, call them gc-fq-* .
>>> 
>>> When running these Helper Scripts from a command prompt on MacOS and 
>>> Linux, should they invoked as commands:
>>> 
>>> % gnc-fq-check
>>> 
>>> Or should they be invoked as an argument to a perl command:
>>> 
>>> % perl gnc-fq-check
>>> 
>>> ?
>>> 
>>> The wiki page
>>> https://wiki.gnucash.org/wiki/Online_Quotes#Helper_Scripts says,
>>> pretty clearly, the former:
>>> 
>>> "While unixoid operating systems use a shebang (#!) to associate perl 
>>> scripts with the Perl interpreter, others, e.g. Windows, will fail….
>>> C:\> gnc-fq-check [fails]…  
>>> so use the following: … Prefix any gnc-fq-xxx perl script command
>>> with perl and a space: …
>>> perl gnc-fq-check …"
>>> 
>>> The perl invocation is described as a workaround needed on Windows 
>>> because the shebang doesn't work. All the other examples show
>>> invocation as a command, e.g.
>>> 
>>> $ gnc-fq-check
>>> 
>>> This makes a difference on Unixoid systems when there are multiple
>>> Perl installations. Presumably command invocation of the helper
>>> scripts will always obey the shebang and thus always run the same
>>> Perl installation. But invocation as an argument to "perl" will run
>>> whichever Perl installation the environment dictates.
>>> 
>>> Am I correct in guessing that GnuCash 4.5 internally invokes these 
>>> scripts (maybe just gnc-fq-helper) as an argument to a perl command?
>>> 
>>> If so, should the wiki page
>>> https://wiki.gnucash.org/wiki/Online_Quotes use the same invocation?
>>> 
>>> Best regards,
>>> —Jim DeLaHunt
>>> 
>> 
>> I don't know the answer, but I think that if you could write it out for
>> the wiki it would be good long term recording.
>> 
>> Liz
>> ___
>> gnucash-user mailing list
>> gnucash-user@gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see 
>> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> 
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see 
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wi

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

2021-06-13 Thread John Ralls


> On Jun 13, 2021, at 12:39 AM, Jim DeLaHunt  wrote:
> 
> GnuCash ships with Helper Scripts  which make it easier to work with 
> Finance::Quote. They are: gnc-fq-check, gnc-fq-dump, gnc-fq-helper, and 
> gnc-fq-update. Collectively, call them gc-fq-* .
> 
> When running these Helper Scripts from a command prompt on MacOS and Linux, 
> should they invoked as commands:
> 
> % gnc-fq-check
> 
> Or should they be invoked as an argument to a perl command:
> 
> % perl gnc-fq-check
> 
> ?
> 
> The wiki page https://wiki.gnucash.org/wiki/Online_Quotes#Helper_Scripts 
> says, pretty clearly, the former:
> 
> "While unixoid operating systems use a shebang (#!) to associate perl scripts 
> with the Perl interpreter, others, e.g. Windows, will fail….
> C:\> gnc-fq-check [fails]…
> so use the following: … Prefix any gnc-fq-xxx perl script command with perl 
> and a space: …
> perl gnc-fq-check …"
> 
> The perl invocation is described as a workaround needed on Windows because 
> the shebang doesn't work. All the other examples show invocation as a 
> command, e.g.
> 
> $ gnc-fq-check
> 
> This makes a difference on Unixoid systems when there are multiple Perl 
> installations. Presumably command invocation of the helper scripts will 
> always obey the shebang and thus always run the same Perl installation. But 
> invocation as an argument to "perl" will run whichever Perl installation the 
> environment dictates.
> 
> Am I correct in guessing that GnuCash 4.5 internally invokes these scripts 
> (maybe just gnc-fq-helper) as an argument to a perl command?
> 
> If so, should the wiki page https://wiki.gnucash.org/wiki/Online_Quotes use 
> the same invocation?

The answer depends on what the user wants or in this case for which perl they 
want to or did install F::Q.  People who have multiple perl installations 
shouldn't need to be told; people who need to be told then they shouldn't have 
multiple perl installations.

Arthur Ransome opened 'Swallows and Amazons` with the doggerel 
  "Better drowned than duffers.
   If not duffers won't drown."

An excellent guiding principle to system administration.

Regards,
John Ralls
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] On a Mac, where are the database configuration details stored?

2021-06-13 Thread John Ralls



> On Jun 13, 2021, at 4:09 AM, Peter West  wrote:
> 
> As it says, where can I find the details of the database connection?

You mean for opening the most recently used book? In 
~/Library/Preferences/org.gnucash.GnuCash.plist. You can read the values with 
e.g.
  defaults read org.gnucash.Gnucash /org/gnucash/history/file0
or all of them
  defaults read org.gnucash.Gnucash | grep history

Regards,
John Ralls

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Problem Editing Payment - Customer Job

2021-06-13 Thread Keith Fetterman
Hi,

I am encountering a problem with GnuCash 4.5 where I can not edit an existing 
customer payment if the payment is for invoices that have a job associated with 
them.  When I select “Edit payment” on an existing payment, I see a dialog 
overlaying the Process Payment dialog that says: 

You have no valid “Post To” accounts.  Please create an account of type “” 
before you continue to process this payment. Perhaps you want to create an 
Invoice or Bill first?.

When I close this dialog, the Process Payment dialog shows the job name where 
the customer name usually appears in the upper left sections.  The Post To 
account select is blank and the invoice(s) that were originally selected when 
the payment was created are missing.

I attempted to replace the job name with the customer name, but it only accepts 
the other jobs for that customer.  You can not find or select a customer.

Am I doing something wrong or is this a defect in GnuCash 4.5?

If my invoices do not have a job selected, I do have an issue editing an 
existing payment.  It only happens when the invoices have a job associated with 
them.

I am using GnuCash 4.5 on MacOS Catalina.  I searched Bugzilla, but I didn’t 
find an existing defect.

Thanks,
Keith
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


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

2021-06-13 Thread Peter West
‘config’ is a subcommand of ‘launchctl’.

Not having a common PATH for command-line and Finder execution is right royal 
pain, as I found many years ago. So way back when, I set up my 
environment.plist then, when Apple invalidated that, my launchctl environment, 
and I had forgotten about the problems of persisting the environment changes. 
The way I actually do it involves collecting all of the launchctl commands to a 
file, and executing each of them on login, via a simple LaunchAgent script.

Details are at 
http://www.pbw.id.au/blog/2013/11/setting-environment-variables-in-os-x-yosemite-and-mavericks/
 


If anyone wants a hand with this, let me know.

—
Peter West
p...@ehealth.id.au
“And if anyone forces you to go one mile, go with him two miles.”

> On 14 Jun 2021, at 2:43 am, John Ralls  wrote:
> 
> https://apple.stackexchange.com/questions/51677/how-to-set-path-for-finder-launched-applications
>  
> 
>  has some details about using launchctl. It seems to be a bit fiddly and with 
> setenv you have to run the command *once* after every reboot, meaning that 
> after you boot you login, open a Terminal session, run `launchctl setenv...`, 
> and kill the Dock. After that you can run GnuCash from Finder and it will use 
> the changed path, though the SO indicates that it works only on 10.7.
> 
> On newer versions of macOS there's `config` command that you run just once 
> then reboot, but it's not clear from the SO nor from launchctl(1) with what 
> version that was introduced; 10.12 is the earliest mentioned in the SO. Since 
> it's persistent make sure that you know how to undo it if you don't like the 
> results... if you screw it up badly enough that might mean booting to single 
> user. Definitely for experts only.
> 
> Regards,
> John Ralls
> 
> 
>> On Jun 13, 2021, at 2:01 AM, Peter West > > wrote:
>> 
>> I think it is still true for Big Sur that the launchctl environment for Mac 
>> can be set with launchctl commands.
>> 
>> To set the same env var in  the launchctl environment as in your .profile 
>> environment, you can include in your .profile a function like this:
>> 
>> set_env_var () {
>>   eval export $1=\""$2"\"
>>   eval launchctl setenv "$1" \""$2"\"
>> }
>> 
>> Instead of
>> export PATH=blah
>> use
>> set_env_var PATH “blah”
>> 
>> I not sure about the timing of environment settings; that is, whether you 
>> can start up a shell and then immediately invoke, say, GnuCash, or whether 
>> you must log out and in to have the env vars in effect.
>> 
>> 
>> —
>> Peter West
>> p...@ehealth.id.au
>> “…whoever says, ‘You fool!’ will be liable to the hell of fire.”
>> 
>> 
>> 
>>> On 13 Jun 2021, at 6:23 pm, Liz Dodd  wrote:
>>> 
>>> On Sun, 13 Jun 2021 00:39:39 -0700
>>> Jim DeLaHunt mailto:list+gnuc...@jdlh.com> 
>>> >> wrote:
>>> 
 GnuCash ships with Helper Scripts  which make it easier to work with 
 Finance::Quote. They are: gnc-fq-check, gnc-fq-dump, gnc-fq-helper,
 and gnc-fq-update. Collectively, call them gc-fq-* .
 
 When running these Helper Scripts from a command prompt on MacOS and 
 Linux, should they invoked as commands:
 
 % gnc-fq-check
 
 Or should they be invoked as an argument to a perl command:
 
 % perl gnc-fq-check
 
 ?
 
 The wiki page
 https://wiki.gnucash.org/wiki/Online_Quotes#Helper_Scripts says,
 pretty clearly, the former:
 
 "While unixoid operating systems use a shebang (#!) to associate perl 
 scripts with the Perl interpreter, others, e.g. Windows, will fail….
 C:\> gnc-fq-check [fails]…  
 so use the following: … Prefix any gnc-fq-xxx perl script command
 with perl and a space: …
 perl gnc-fq-check …"
 
 The perl invocation is described as a workaround needed on Windows 
 because the shebang doesn't work. All the other examples show
 invocation as a command, e.g.
 
 $ gnc-fq-check
 
 This makes a difference on Unixoid systems when there are multiple
 Perl installations. Presumably command invocation of the helper
 scripts will always obey the shebang and thus always run the same
 Perl installation. But invocation as an argument to "perl" will run
 whichever Perl installation the environment dictates.
 
 Am I correct in guessing that GnuCash 4.5 internally invokes these 
 scripts (maybe just gnc-fq-helper) as an argument to a perl command?
 
 If so, should the wiki page
 https://wiki.gnucash.org/wiki/Online_Quotes use the same invocation?
 
 Best regards,
—Jim DeLaHunt
 
>>> 
>>> I don't know the answer, but I think that if you could write it out for
>>> the wiki it would be good long term recording

Re: [GNC] On a Mac, where are the database configuration details stored?

2021-06-13 Thread Peter West
Thanks John.

I was looking for the way the connection is actually set up. At the moment, I 
have no password requirement for local connections (and no external 
connections.) If I want to add password validation to postgresql, what happens 
to my GnuCash connection?


—
Peter West
p...@ehealth.id.au
“And if anyone forces you to go one mile, go with him two miles.”

> On 14 Jun 2021, at 3:11 am, John Ralls  wrote:
> 
> 
> 
>> On Jun 13, 2021, at 4:09 AM, Peter West  wrote:
>> 
>> As it says, where can I find the details of the database connection?
> 
> You mean for opening the most recently used book? In 
> ~/Library/Preferences/org.gnucash.GnuCash.plist. You can read the values with 
> e.g.
>  defaults read org.gnucash.Gnucash /org/gnucash/history/file0
> or all of them
>  defaults read org.gnucash.Gnucash | grep history
> 
> Regards,
> John Ralls
> 

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Incorrect Trial Balance Amounts

2021-06-13 Thread Volker Englisch

Hi there,

I would like to check if I'm doing something wrong or if I'm correct in 
my assumption that the Trial Balance report isn't displaying correct 
amounts in all cases.


I'm using Ubuntu 20.04.2 LTS with GnuCash 3.8.

I started keeping track of some stock and entered the number of shares 
on Jan. 1, 2021, for example.  Let's say I have 100 shares worth $2 each.

   Asset:Investment:MyStock                200 (for 100 shares at $2)
               Equity:Opening Balance                    200

After a while (April 1st) I sell all shares and enter the corresponding 
transaction.  The price for the shares increased to $3 since I started 
tracking (I wish!):

    Asset:Current Asset:Checking Account        300
                Asset:Investment:MyStock 300 (for 100 shares, $100 
realized gains)


When I run the trial balance report for the day I first entered MyStock 
everything looks good: $200 debit / $200 credit.  The same is true for 
the day I sold MyStock: $300 debit / $200 credit, the difference is my 
gain.  However, when I run the trial balance for 03/01 for instance, the 
trial balance shows $300 debit / $300 credit with $100 listed as 
unrealized gains.


What seems to be happening is that the TB calculates the value of the 
stock based on the last price entered in the price editor rather than 
using the last price prior to the date for which the TB is run.  With 
two entries in the price editor DB, one for 01/01 and one for 04/01 I 
would expect the price for 01/01 to be used until 03/31.


Am I doing something wrong?  It's possible I'm not understanding 
precisely how the TB is coming up with the numbers.


Thank you!


--
Volker Englisch
phone: (240) 343-5343 (mobil)
mailto:vol...@englisch.us

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


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

2021-06-13 Thread Jim DeLaHunt

On 2021-06-13 00:39, Jim DeLaHunt wrote:

Am I correct in guessing that GnuCash 4.5 internally invokes these 
scripts (maybe just gnc-fq-helper) as an argument to a perl command?


After a fairly quick read of the source code, I think the answer is, 
"Yes, for over 14 years". I see in gnucash/price-quotes.scm:120-122:


    (define (start-quoter)
      (set! quoter
        (gnc-spawn-process-async (list "perl" "-w" 
gnc:*finance-quote-helper*) #t)))


I interpret this as meaning that GnuCash fetches quotes by spawning a 
process with arguments like:


perl -w /path/to/helpers/gnc-fq-helper ...[args giving security for 
which to get quotes]...


It looks to me like this code has been much the same since commit 
c38bcd3 on 2007-04-28.  Looking at the code it replaced, I suspect that 
GnuCash used to invoke the scripts directly, without the "perl" "-w" 
part. But that was long ago.


There are comments in libgnucash/quotes/gnc-fq-help.in:75,92 which imply 
direct invocation. They have examples like:


$ echo '(alphavantage "CSCO" "JDSU" "^IXIC")' | ./gnc-fq-helper

But that will only get read by developers, who aren't as easily misled 
as non-developer users.



If so, should the wiki page 
https://wiki.gnucash.org/wiki/Online_Quotes use the same invocation?


I am now of the opinion that, yes, it should.

I think that we should guide users to invoke the helper scripts is a 
similar way to how GnuCash actually invokes them. This will help reduce 
user confusion, by making their results more closely match GnuCash's 
results.


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

to something like

perl -w gnc-fq-dump currency USD EUR

I will also make sure there is a clear explanation that the above 
abbreviates the path to the helper scripts and the AlphaVantage key. The 
actual invocation is actually more like:


$ ALPHAVANTAGE_API_KEY=01234ABCD perl -w 
/Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump currency 
USD EUR


I will also deemphasise the mention of the shebang (#!). It looks like 
the invocation which GnuCash actually uses does not rely on shebang, so 
we should not be leading users to pay attention to it.



Are there objections to me being bold and making such changes?

Best regards,
 —Jim DeLaHunt


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


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

2021-06-13 Thread Jim DeLaHunt

On 2021-06-13 09:53, John Ralls wrote:


On Jun 13, 2021, at 12:39 AM, Jim DeLaHunt  wrote:
... [elided] ...
Am I correct in guessing that GnuCash 4.5 internally invokes these scripts 
(maybe just gnc-fq-helper) as an argument to a perl command?

If so, should the wiki page https://wiki.gnucash.org/wiki/Online_Quotes use the 
same invocation?

The answer depends on what the user wants or in this case for which perl they 
want to or did install F::Q.  People who have multiple perl installations 
shouldn't need to be told; people who need to be told then they shouldn't have 
multiple perl installations.


It seems to me also to depend on how the software was designed. We 
should guide users in the direction the software expects them to go.


Also, we should have some sympathy for our users who are neither system 
administrators nor accountants, but nevertheless use GnuCash because 
they want to get something useful done. Many forces in the computer 
ecosystem lobby users to install stuff, and users often comply, without 
understanding the implications. I think it would be kind of us as coders 
and writers to help protect and guide them.




Arthur Ransome opened 'Swallows and Amazons` with the doggerel
   "Better drowned than duffers.
If not duffers won't drown."

An excellent guiding principle to system administration.



Well, it's an excellent hook for an adventure story. It's not such a 
kind way to treat non-specialist users. Imagine if cars or medicines or 
food were produced with that as a guiding principle.


Best regards,
  —Jim DeLaHunt


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Convincing the balance sheet report to not show sold stocks...

2021-06-13 Thread km22
I am also having this issue.  I have a brokerage account and for each stock
or bond I have set up a security and a "stock" account type for that
security.  Many of the positions have long been closed and reflect a zero
balance in the register.  However the "Balance Sheet" report is showing the
row with 0 position despite me deselecting the option "Include accounts with
zero total balances".  I have chosen to select "Levels of subaccounts" to 4.
When I change this number to 6 (the maximum) then some of the accounts with
zero balances are no longer displayed (while some accounts more than 6
levels deep are still displayed with the zero balance).  I therefore suspect
the issue has to do with how the report chooses to show accounts that are
deeper than the "Levels of subaccounts" selected.  It would be nice if this
issue could be fixed in the report logic. (I have no idea how to try to do
this myself.)

Thanks,
Ken



Maybe you're not managing your entries so that there is no residual value
after all the shares are sold. The way I handle my capital gains/losses the
stock asset accounts have no residual value.

HTH

Paul





--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


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

2021-06-13 Thread Chris Good
Message: 9
Date: Sun, 13 Jun 2021 20:44:18 -0700
From: Jim DeLaHunt 
To: gnucash-user@gnucash.org
Subject: Re: [GNC] Should the gnc-fq-* helper scripts be invoked as
commands, or as an arg to perl?
Message-ID: <96cbda1f-b16d-68be-da69-1e38fdf0e...@jdlh.com>
Content-Type: text/plain; charset=utf-8; format=flowed

On 2021-06-13 00:39, Jim DeLaHunt wrote:

> Am I correct in guessing that GnuCash 4.5 internally invokes these 
> scripts (maybe just gnc-fq-helper) as an argument to a perl command?

After a fairly quick read of the source code, I think the answer is, 
"Yes, for over 14 years". I see in gnucash/price-quotes.scm:120-122:

 ??? (define (start-quoter)
 ??? ? (set! quoter
 ??? ??? (gnc-spawn-process-async (list "perl" "-w" 
gnc:*finance-quote-helper*) #t)))

I interpret this as meaning that GnuCash fetches quotes by spawning a 
process with arguments like:

perl -w /path/to/helpers/gnc-fq-helper ...[args giving security for 
which to get quotes]...

It looks to me like this code has been much the same since commit 
c38bcd3 on 2007-04-28.? Looking at the code it replaced, I suspect that 
GnuCash used to invoke the scripts directly, without the "perl" "-w" 
part. But that was long ago.

There are comments in libgnucash/quotes/gnc-fq-help.in:75,92 which imply 
direct invocation. They have examples like:

$ echo '(alphavantage "CSCO" "JDSU" "^IXIC")' | ./gnc-fq-helper

But that will only get read by developers, who aren't as easily misled 
as non-developer users.


> If so, should the wiki page 
> https://wiki.gnucash.org/wiki/Online_Quotes use the same invocation?

I am now of the opinion that, yes, it should.

I think that we should guide users to invoke the helper scripts is a 
similar way to how GnuCash actually invokes them. This will help reduce 
user confusion, by making their results more closely match GnuCash's 
results.

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

to something like

perl -w gnc-fq-dump currency USD EUR

I will also make sure there is a clear explanation that the above 
abbreviates the path to the helper scripts and the AlphaVantage key. The 
actual invocation is actually more like:

$ ALPHAVANTAGE_API_KEY=01234ABCD perl -w 
/Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump currency 
USD EUR

I will also deemphasise the mention of the shebang (#!). It looks like 
the invocation which GnuCash actually uses does not rely on shebang, so 
we should not be leading users to pay attention to it.


Are there objections to me being bold and making such changes?

Best regards,
  ?Jim DeLaHunt

Hi Jim,

Thanks for contributing to the documentation!

I think:
perl -w gnc-fq-dump currency USD EUR
is going to confuse non-technical people just as much.

And using
/Path/To/Perl/perl -w /Path/To/HelperScripts/gnc-fq-dump currency USD EUR
for every example is unnecessarily complicated.

I suggest you just add a section at the start of
https://wiki.gnucash.org/wiki/index.php?title=Online_Quotes#Helper_Scripts
that gives explicit instructions and examples for Linux and macOS like it
current does for
Windows.
Or maybe the later examples should all be stated to be for Linux and have
specific instructions for Windows and macOS at the start of
Helper_Scripts...

I'm pretty sure prefixing commands with the setting of environment variables
(e.g. XYZ=abc command) does not work in Windows.

Running the helper scripts
I'm open to any better suggestions.

Regards, Chris Good


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


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

2021-06-13 Thread Jim DeLaHunt

Thank you for your comments and encouragement, Chris!

On 2021-06-13 22:42, Chris Good wrote:

Thanks for contributing to the documentation!
I think:
perl -w gnc-fq-dump currency USD EUR
is going to confuse non-technical people just as much.

And using
/Path/To/Perl/perl -w /Path/To/HelperScripts/gnc-fq-dump currency USD EUR
for every example is unnecessarily complicated.


Oh, I certainly don't advocate using the complex form for every example. 
It just needs to be explained once, so that people can figure out how to 
convert the simpler form, in the examples, to the full form which 
actually works.


And in any case, "/Path/To/Perl/perl" is against the thrust of this 
discussion. GnuCash seems to use "perl" without a path, and I think so 
should the examples.




I suggest you just add a section at the start of
https://wiki.gnucash.org/wiki/index.php?title=Online_Quotes#Helper_Scripts
that gives explicit instructions and examples for Linux and macOS like it
current does for
Windows.
Or maybe the later examples should all be stated to be for Linux and have
specific instructions for Windows and macOS at the start of
Helper_Scripts...

I'm pretty sure prefixing commands with the setting of environment variables
(e.g. XYZ=abc command) does not work in Windows.
Interesting. How does one do "gnc-fq-dump currency" on Windows? How does 
one provide the AlphaVantage key?

Running the helper scripts
I'm open to any better suggestions.


My first step is taking an overall look at the wiki page 
https://wiki.gnucash.org/wiki/Online_Quotes to see how best to work with 
what is there.


Best regards,
 —Jim DeLaHunt




___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.