Bug 258830 - Provide a Scripting API or Command Line API
Summary: Provide a Scripting API or Command Line API
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Unlisted Binaries Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-04 19:23 UTC by Chris Spencer
Modified: 2023-07-06 09:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Spencer 2010-12-04 19:23:25 UTC
Version:           CVS HEAD (using Devel) 
OS:                Linux

It would be greatly useful if there was some sort of programmatic interface to KMyMoney for scripting languages. I'd like to extend KMyMoney's functionality, such as modify ledger labeling or export dynamic reports to email, but I can't do these without going through the painful process of setting up a complicated dev environment to modify, recompile, and reinstall the application binary. Something like GNUCash's Python API, or at least more commandline options to expose funcationality, would be a great addition to KMyMoney.

Reproducible: Didn't try
Comment 1 Cristian Oneț 2014-08-20 20:31:47 UTC
Moving this wish to kmymoney4.
Comment 2 tnemeth 2021-12-13 08:08:10 UTC
Hi.
This issue is still opened after 11 years :)
And I have to admit it's a really useful feature. Not only for scripting purpose, but also for remote access without taking a lot of bandwidth (eg: over ssh-over-ssh).
Comment 3 Peter Richards 2023-07-06 08:13:52 UTC
I also would like this feature, only recently needing to run the KMyMoney reports from the command line ( see https://discuss.kde.org/t/can-reports-be-run-from-terminal/2737 ). Have spent quite a bit of time now testing Python to read the KMyMoney XML file, and that has proved challenging due to the many levels of 'tags' within the data, and the account balances requiring a parse through the XML to arrive at a total balance.
Comment 4 Peter Richards 2023-07-06 09:30:41 UTC
As the original comment mentioned "GNUCash's Python API", some quick searching. It's not clear but it seems the API is written in C, although this link suggests some python bindings - https://wiki.gnucash.org/wiki/Python_Bindings

The shell seems to be written in Python - https://wiki.gnucash.org/wiki/Python_shell. There is a Python interface to GNUCash reports, see https://piecash.readthedocs.io/en/master/

Of course one may ask what has all this to do with KMyMoney. Personally, it seems a lot of ground has been broken that can possibly be used to commence some sort of interface to KMyMoney. It seems GNUCash also uses an XML file.