Re: [GNC-dev] Scripting Gnucash actions without UI

2023-10-12 Thread Adrien Monteleone
I've seen several questions on the user list with respect to that very 
use case as an SX variable.


Regards,
Adrien

On 10/12/23 9:26 PM, Christopher Lam wrote:

Other ideas are possible: determine the balance of an account at a
particular date


___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Scripting Gnucash actions without UI

2023-10-12 Thread Christopher Lam
Thanks Liz... With the full power of scheme (or python) it will be
relatively straightforward to customise these calculations. There's an
example script in the GitHub pull request, and it does interact via command
line to input some transaction details, summarises the transaction and asks
confirmation before committing the change.

It does require some knowledge of programming and learning the gnucash API,
but won't require building the full gnucash code.

Other ideas are possible: determine the balance of an account at a
particular date, download transactional, business or pricing data from an
external source or any format (json,TSV), submit anything to an external
recipient, etc.

Implementing such a change effectively raises the scheme code from being a
report-only mechanism to unlocking full scripting, and also unlock python
scripting to more users.

On Fri, 13 Oct 2023, 5:52 am Liz,  wrote:

> On Sun, 8 Oct 2023 17:51:40 +0800
> Christopher Lam  wrote:
>
> > It would thus be useful to know the types of tasks that users wish to
> > automate. I'll start:
> >
> > Every quarter, I personally tally up the GST account balances, which
> > allows me to submit to the tax office. I currently use the "Income
> > and GST Statement" report for tallying. I will also create some
> > transactions which will offset the GST accounts back to zero. This
> > could easily be automated.
>
> My GST is more complex
> with two different vehicles, company tax and the income tax to be
> reckoned as well.
> Vehicles only have a proportion of the GST to be put in the
> calculations.
>
> I attach my Scheduled transaction just for the amounts to be given to
> the tax office.
> There are also a series of scheduled transactions for the splits in the
> GST for vehicle expenses.
>
> Liz
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Scripting Gnucash actions without UI

2023-10-12 Thread Liz
On Sun, 8 Oct 2023 17:51:40 +0800
Christopher Lam  wrote:

> It would thus be useful to know the types of tasks that users wish to
> automate. I'll start:
> 
> Every quarter, I personally tally up the GST account balances, which
> allows me to submit to the tax office. I currently use the "Income
> and GST Statement" report for tallying. I will also create some
> transactions which will offset the GST accounts back to zero. This
> could easily be automated.

My GST is more complex
with two different vehicles, company tax and the income tax to be
reckoned as well.
Vehicles only have a proportion of the GST to be put in the
calculations.

I attach my Scheduled transaction just for the amounts to be given to
the tax office.
There are also a series of scheduled transactions for the splits in the
GST for vehicle expenses.

Liz
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [GNC-dev] Scripting Gnucash actions without UI

2023-10-08 Thread David H
Christopher,

Did you mean to post this to the gnucash-users list so the "Dear Users" can
comment ?

Cheers David H.


On Sun, 8 Oct 2023 at 19:52, Christopher Lam 
wrote:

> Dear Users
>
> I'm aware there's demand for automated scripting Gnucash activity such as
> entering transactions with custom formulas more complex than the SX
> facility will allow, determining end-of-quarter calculations etc.
>
> There's a pending PR at https://github.com/Gnucash/gnucash/pull/1794 which
> will unlock it (with a scheme script... or a python script if someone
> proficient can code it), and *will* allow the above, and* can* offer some
> interactivity (e.g. "please enter the transaction description" -- see the
> PR for such an example),* and also* potentially unlock other UI toolkits.
> From my understanding this is a facility that the original GnuCash code
> from 1997 or so offered.
>
> We are not willing to provide custom-built solutions for users (not even
> with money offers); and I do not think it's a good idea to add custom
> scripts into the code. Users could share the scripts among themselves at
> their own maintenance risk. However, if users are needing help for such
> tasks, we can consider augmenting the software with api calls which can
> assist.
>
> It would thus be useful to know the types of tasks that users wish to
> automate. I'll start:
>
> Every quarter, I personally tally up the GST account balances, which allows
> me to submit to the tax office. I currently use the "Income and GST
> Statement" report for tallying. I will also create some transactions which
> will offset the GST accounts back to zero. This could easily be automated.
> ___
> gnucash-devel mailing list
> gnucash-devel@gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


[GNC-dev] Scripting Gnucash actions without UI

2023-10-08 Thread Christopher Lam
Dear Users

I'm aware there's demand for automated scripting Gnucash activity such as
entering transactions with custom formulas more complex than the SX
facility will allow, determining end-of-quarter calculations etc.

There's a pending PR at https://github.com/Gnucash/gnucash/pull/1794 which
will unlock it (with a scheme script... or a python script if someone
proficient can code it), and *will* allow the above, and* can* offer some
interactivity (e.g. "please enter the transaction description" -- see the
PR for such an example),* and also* potentially unlock other UI toolkits.
>From my understanding this is a facility that the original GnuCash code
from 1997 or so offered.

We are not willing to provide custom-built solutions for users (not even
with money offers); and I do not think it's a good idea to add custom
scripts into the code. Users could share the scripts among themselves at
their own maintenance risk. However, if users are needing help for such
tasks, we can consider augmenting the software with api calls which can
assist.

It would thus be useful to know the types of tasks that users wish to
automate. I'll start:

Every quarter, I personally tally up the GST account balances, which allows
me to submit to the tax office. I currently use the "Income and GST
Statement" report for tallying. I will also create some transactions which
will offset the GST accounts back to zero. This could easily be automated.
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel