Re: [GNC] Command Line Report Options

2020-07-18 Thread Robin Chattopadhyay
Got it! That makes complete sense.

Robin

On Fri, Jul 17, 2020 at 10:58 PM Christopher Lam 
wrote:

> Hi Robin
>
> The documentation is not comprehensive yet. The export-type argument
> refers to the *report-specific* export types available, rather than
> PDF/XLS/DOC etc. Report-specific exports are rather sparse; currently only
> the following exist:
>
> Income and GST Statement: CSV
> Tax Schedule Report & TXF Export: TXF
> Tax Report & XML Export (in German only): XML
>
> To export "Income and GST Statement" CSV, you'd need to customize the
> report options, save into "Saved Report Configurations" eg. "My GST", then
> run as follows. I cannot assist with the tax reports.
>
> $ gnucash-cli --report run --name "My GST" --export-type CSV --output-file
> gst.csv datafile.gnucash
>
> outputs the following into gst.csv
>
> "from","01/04/20"
> "to","30/06/20"
> "Gross Sales",220.0
> "Net Sales",200.0
> "Tax on Sales",20.0
> "Gross Purchases",110.0
> "Net Purchases",100.0
> "Tax on Purchases",10.0
>
> On Sat, 18 Jul 2020 at 02:52, Robin Chattopadhyay 
> wrote:
>
>> In the release notes and the help page, the documentation lists
>> 'export-type' as an option and the example cites html as an export type
>> option. Are there any other supported options? I tried 'pdf' and 'PDF' and
>> neither of those worked.
>>
>> From the release notes:
>> • A new separate executable, gnucash-cli (gnucash-cli.exe on
>> Microsoft Windows) for doing command-line things like updating the prices
>> in your book. gnucash-cli gains the ability to run reports from the
>> command
>> line. Specify reports to run by name or guid. It also provides an export
>> format and an output file name without which it will output the report to
>> stdout.
>> • gnucash-cli --report run --name=[reportname/guid]
>> datafile.gnucash
>> • gnucash-cli --report run --name=[reportname/guid]
>> --output-file=x.html datafile.gnucash
>> • gnucash-cli --report run --name=[reportname/guid]
>> --output-file=x.html --export-type=TYPE datafile.gnucash
>>
>> Thanks,
>> Robin
>> ___
>> 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] Command Line Report Options

2020-07-18 Thread Michael or Penny Novack

On 7/17/2020 10:50 PM, Robin Chattopadhyay wrote:

In the release notes and the help page, the documentation lists
'export-type' as an option and the example cites html as an export type
option. Are there any other supported options? I tried 'pdf' and 'PDF' and
neither of those worked.

You are confusing file extension with data conversion to match that file 
extension. Gnucash is not incorporating that data conversion so it can't 
do what you appear to be asking for.


BUT --- if you are working from the command line in some "shell" you 
should be able to restructure that command so that the output from 
gnucash would then be passed as input to an "X to pdf" utility and then 
the output of that would be what you want. Since you are referring to 
Windows, this might not be obvious to you but should be to those using 
a  'nix operating system.


Please note that this is more or less a "philosophical" difference.  The 
concept of the 'nix shells is that they would have available to them a 
library of useful utilities, each doing one small thing very well, that 
could be chained together in this way. As opposed to bloating every 
application with everything it might possibly need (and so multiple 
copies of those things). Remember the history (how old the 'nix 
operating systems are and how much smaller our computer memories once 
were).


Sorry, but I do not know what the Windows "shell" language might be or 
what utilities might be available to it.


Michael D Novack


___
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] Command Line Report Options

2020-07-17 Thread Christopher Lam
Hi Robin

The documentation is not comprehensive yet. The export-type argument refers
to the *report-specific* export types available, rather than PDF/XLS/DOC
etc. Report-specific exports are rather sparse; currently only the
following exist:

Income and GST Statement: CSV
Tax Schedule Report & TXF Export: TXF
Tax Report & XML Export (in German only): XML

To export "Income and GST Statement" CSV, you'd need to customize the
report options, save into "Saved Report Configurations" eg. "My GST", then
run as follows. I cannot assist with the tax reports.

$ gnucash-cli --report run --name "My GST" --export-type CSV --output-file
gst.csv datafile.gnucash

outputs the following into gst.csv

"from","01/04/20"
"to","30/06/20"
"Gross Sales",220.0
"Net Sales",200.0
"Tax on Sales",20.0
"Gross Purchases",110.0
"Net Purchases",100.0
"Tax on Purchases",10.0

On Sat, 18 Jul 2020 at 02:52, Robin Chattopadhyay 
wrote:

> In the release notes and the help page, the documentation lists
> 'export-type' as an option and the example cites html as an export type
> option. Are there any other supported options? I tried 'pdf' and 'PDF' and
> neither of those worked.
>
> From the release notes:
> • A new separate executable, gnucash-cli (gnucash-cli.exe on
> Microsoft Windows) for doing command-line things like updating the prices
> in your book. gnucash-cli gains the ability to run reports from the command
> line. Specify reports to run by name or guid. It also provides an export
> format and an output file name without which it will output the report to
> stdout.
> • gnucash-cli --report run --name=[reportname/guid]
> datafile.gnucash
> • gnucash-cli --report run --name=[reportname/guid]
> --output-file=x.html datafile.gnucash
> • gnucash-cli --report run --name=[reportname/guid]
> --output-file=x.html --export-type=TYPE datafile.gnucash
>
> Thanks,
> Robin
> ___
> 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.


[GNC] Command Line Report Options

2020-07-17 Thread Robin Chattopadhyay
In the release notes and the help page, the documentation lists
'export-type' as an option and the example cites html as an export type
option. Are there any other supported options? I tried 'pdf' and 'PDF' and
neither of those worked.

From the release notes:
• A new separate executable, gnucash-cli (gnucash-cli.exe on
Microsoft Windows) for doing command-line things like updating the prices
in your book. gnucash-cli gains the ability to run reports from the command
line. Specify reports to run by name or guid. It also provides an export
format and an output file name without which it will output the report to
stdout.
• gnucash-cli --report run --name=[reportname/guid]
datafile.gnucash
• gnucash-cli --report run --name=[reportname/guid]
--output-file=x.html datafile.gnucash
• gnucash-cli --report run --name=[reportname/guid]
--output-file=x.html --export-type=TYPE datafile.gnucash

Thanks,
Robin
___
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.