Peanut gallery comment. Was: Gnucash reports
Geert Janssens
janssens-geert at telenet.be
Thu May 30 11:48:36 EDT 2013
I haven't actually checked, but I'm pretty sure most if not all of this can already be done via
guile bindings. I don't think the python bindings are equally well developped.
A guile script would have to do this:
- load the necessary gnucash and guile modules (I would have to experiment what
"necessary" means in this context).
- query the list of clients (look in the business reports for examples on this)
- create an invoice report with the proper parameters. This is a matter of creating the report,
setting the options and calling its render. That should result in a html formatted file
somewhere on your harddisk. Probably in /tmp on linux, you may be able to specify the
location yourself.
Again, this is just from the top of my head. You will still need to dig in the existing code for
examples of how to match this up.
Geert
On Wednesday 29 May 2013 14:23:31 Buddha Buck wrote:
> I would be happy with the reports, including report options, being
> available via Python bindings, or even Guile bindings. It may be easier to
> make that interface generic than a command-line based one. In which case,
> the particular command-line reporting Mr. Rout is looking for could be
> easily written as a custom Python script.
>
> I'll admit that being able to get customer reports via command line would
> be very handy for me and my hackerspace as well.
>
> On Wed, May 29, 2013 at 10:14 AM, Derek Atkins <warlord at mit.edu> wrote:
> > Allen,
> >
> > "Allen S. Rout" <asr at ufl.edu> writes:
> >
> > [snip]
> >
> > > Simplest: "Fire a report from the command line". Absolute minimum data
> > > from the command line, no need to be able to tweak all the details.
> > > Customer ID, target filename and that's it
> > >
> > > gnucash --run-customer-report="report-name"
> > > --output-filename="/path/file.html" --customer-id="000003"
> > >
> > > If you want fancy specialness, define a customized report in the
> > > interactive GUI, and refer to it by name.
> >
> > This is an extremely report-specific command-line. I think if we DID do
> > something like this we would want to make it generic, to work with any
> >
> > report. Something like:
> > gnucash --run-report="Customer Report"
> >
> > --report-output="/path/to/file.html"
> > --report-options="customer-id=000003"
> >
> > But designing the interface to be generic is a lot of work.
> >
> > > Next simplest: "Run this report for all [active] customers"
> > >
> > > --output-dir="/path/dir/"
> > >
> > > and then you'd wind up with
> > >
> > > 000003.html
> > > 000005.html
> > >
> > > etc.
> >
> > Again, not very simple, would create tons of extraneous output, and VERY
> > specific to a particular report.
> >
> > > I find the gnucash engine fairly comfortable, but coming out of
> > > GNUspace, it makes me twitch that it's so very difficult to modify or
> > > automate the operations of the engine. I want to get to the point at
> > > which I can help change that.
> >
> > I'm not sure what you mean by "GNUspace". but fair enough about the
> > difficulty of automating operations; it's been a long-standing request
> > to have a command-line interface to at least some operations. Just
> > remember, however, that whatever gets implemented should be generic, not
> > specific, because the next person is going to come along and suggest
> > that they want a different report, or different options, or different
> > settings that they want to set.
> >
> > > - Allen S. Rout
> >
> > -derek
> >
> > --
> >
> > Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
> > Member, MIT Student Information Processing Board (SIPB)
> > URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
> > warlord at MIT.EDU PGP key available
> >
> > _______________________________________________
> > gnucash-devel mailing list
> > gnucash-devel at gnucash.org
> > https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
More information about the gnucash-devel
mailing list