ledgible: a web interface for ledger-cli (with data entry!)

1,688 views
Skip to first unread message

Ankur Kothari

unread,
Mar 9, 2016, 1:32:03 AM3/9/16
to Ledger
Hello!

I have used ledger-cli for some time, and wanted my family and friends to be able to use it.

Since not everyone is a programmer, I made a web interface for ledger. My mother and my wife have been using it since mid-2015. It is actually so convenient that I use it myself.

So if you want:
  • your accounting information accessible everywhere
  • easy entry of transactions (auto-completion which learns from past entries!)
  • interactive visualizations of your finances
Then please check it out here <https://github.com/lipidity/ledgible> and give me feedback.

John Wiegley

unread,
Mar 9, 2016, 1:37:24 AM3/9/16
to Ankur Kothari, Ledger
>>>>> Ankur Kothari <ankz.k...@gmail.com> writes:

> So if you want:
> * your accounting information accessible everywhere
> * easy entry of transactions (auto-completion which learns from past entries!)
> * interactive visualizations of your finances

> Then please check it out here <https://github.com/lipidity/ledgible> and
> give me feedback.

Very cool! Thanks for sharing that, I enjoyed seeing it.

--
John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2

Ankur Kothari

unread,
Mar 10, 2016, 4:03:22 AM3/10/16
to Ledger

John Wiegley wrote:

Very cool!  Thanks for sharing that, I enjoyed seeing it.

Thanks for making ledger :)

--

There's a live version people can play with: <https://lipidity.com/cgi/ledgible/app.py/> (login as demo/demo; changes not permitted)

Jostein Berntsen

unread,
Apr 17, 2016, 6:10:18 PM4/17/16
to Ledger
On 10.03.16,01:03, Ankur Kothari wrote:
>
>John Wiegley wrote:
>
>Very cool! Thanks for sharing that, I enjoyed seeing it.
>
>
>Thanks for making ledger :)
>

This looks interesting. Do you have some more details on how to set it up?

Jostein

Ankur Kothari

unread,
Apr 17, 2016, 7:56:05 PM4/17/16
to Ledger

On Monday, 18 April 2016 08:10:18 UTC+10, Jostein Berntsen wrote:

This looks interesting. Do you have some more details on how to set it up?

The necessary steps are in the "Installation" section in <https://github.com/lipidity/ledgible>

Which part would you like more details about?

Vikas Rawal

unread,
Apr 17, 2016, 10:38:17 PM4/17/16
to ledge...@googlegroups.com
Ankur,

This looks very interesting and I look forward to using it.

I was, however, wondering if it would be possible to customise it to add comments to each transation. I use a specific set of comments for each transaction (specifying the project, project head, giving path to scanned copy of invoice, etc).

Here is a sample:

015/04/1 Name of recipient
    ; Narration: A descriptive narratino here
    ; VoucherNo: BP: Apr/15/1
    ; Receipt: path_to_file/filename.pdf
    ; ReceiptNo: 12345678
    ; FlowDetail:
    ; Project: Project_name
    ; ProjectHead: Project_head
    Expenses:Account:Sub_account    $ 25000
    Assets:Bank:Savings_account:Bank transfer

Can ledgible be configured to make entries of these comments?

Vikas

 

--

---
You received this message because you are subscribed to the Google Groups "Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jostein Berntsen

unread,
Apr 18, 2016, 1:40:17 AM4/18/16
to Ledger
How to use app.py in the CGI setup.


Jostein

Ankur Kothari

unread,
Apr 18, 2016, 7:25:38 AM4/18/16
to Ledger
On Monday, 18 April 2016 12:38:17 UTC+10, VR wrote:
This looks very interesting and I look forward to using it.

Thank you.
 
VR wrote:
Can ledgible be configured to make entries of these comments?
 
Yes, absolutely. I too use similar metadata tags.
You can add metadata or comments in the "notes" field (same syntax but just leave out the semicolons)
(I can change the input field to a textarea to facilitate adding newlines if that makes it easier)

Ankur Kothari

unread,
Apr 18, 2016, 7:32:19 AM4/18/16
to Ledger
On Monday, 18 April 2016 15:40:17 UTC+10, Jostein Berntsen wrote:
How to use app.py in the CGI setup.

You configure your web server to execute the app.py file. It depends on which server you decide to use since they all have different configuration.
Do you have a particular web server that you want to use?

As an example, using lighttpd you might add something to it's configuration like:

server.modules += ( "mod_cgi" )
cgi.assign = ( ".py"  => "/usr/bin/python2" )

Jostein Berntsen

unread,
Apr 18, 2016, 7:41:47 AM4/18/16
to Ledger
Thanks. I was checking out the nginx server here. It seems like there
was something wrong with the FastCGI installation so I will check that.

Jostin

Vikas Rawal

unread,
Apr 18, 2016, 11:38:17 AM4/18/16
to ledge...@googlegroups.com

Can ledgible be configured to make entries of these comments?
 
Yes, absolutely. I too use similar metadata tags.
You can add metadata or comments in the "notes" field (same syntax but just leave out the semicolons)
(I can change the input field to a textarea to facilitate adding newlines if that makes it easier)

It would be nice if we could specify (in the config file) tags that are supposed to be added to each record.

Then, the interface could perhaps give us fields for each tag to fill. That would save the trouble of entering "key: value” for all the tags in one common input field/text area. They “key” part should be specified in the config file. That should be read to create the fields where the “value” part is entered.

Optionally, you could also give the option in the config file to specify whether a particular tag is mandatory or optional, could be blank or not.

Vikas



Remco Rijnders

unread,
Apr 18, 2016, 12:27:24 PM4/18/16
to Ledger
Hi Ankur,

This looks very handy, thank you! Can you add a copyright notice to your project or let us know on here what license this is covered under?

Many thanks in advance!

Remco

Ankur Kothari

unread,
Apr 18, 2016, 11:22:25 PM4/18/16
to Ledger
* Remco Rijnders wrote:
This looks very handy, thank you!

Thanks, I'm glad.
 
Can you add a copyright notice to your project or let us know on here what license this is covered under?

I was waiting for this question :P. How about: © 2015 Ankur Kothari

Ankur Kothari

unread,
Apr 18, 2016, 11:31:31 PM4/18/16
to Ledger
* Jostein Berntsen wrote:
I was checking out the nginx server here. It seems like there
was something wrong with the FastCGI installation so I will check that.

There is a flaw in ledger's python bindings where once a journal file is read in,
you can't unread or reread it in the same process.
This is why the web interface needs to use CGI, which spawns one process per request.

This is a bit off-topic, but one way to run cgi programs with nginx is with fcgiwrap.
Once it's installed and running, add something to your conf like:
location /cgi/ {
            include fastcgi_params;
            fastcgi_pass unix:/run/fcgiwrap.sock;
}

HTH
Might be better to start a new thread about this, since it's not really specific to ledgible.

Ankur Kothari

unread,
Apr 18, 2016, 11:39:46 PM4/18/16
to Ledger
* VR wrote:
It would be nice if we could specify (in the config file) tags that are supposed to be added to each record.
[...] you could also give the option in the config file to specify whether a particular tag is mandatory or optional, could be blank or not.

Thank you for the feedback.

I thought about this, since I use metadata regularly myself. It is something I will add in one form or another.

A naive server-side implementation, especially including custom validation of these inputs,
would add much more complexity than I am willing to maintain. I am thinking that it might be simplest
to allow extensibility by adding client-side (ie javascript) code to add and validate fields, but I need
to ruminate on this.

Vikas Rawal

unread,
Apr 18, 2016, 11:48:02 PM4/18/16
to ledge...@googlegroups.com
How about allowing for addition of fields on the server-side, without any validation?

Vikas

Remco Rijnders

unread,
Apr 19, 2016, 1:57:33 AM4/19/16
to ledge...@googlegroups.com
On Mon, Apr 18, 2016 at 08:22:25PM -0700, Ankur wrote in
<f72442c5-d699-4e53...@googlegroups.com>:
>> Can you add a copyright notice to your project or let us know on here what license this is covered under?
>>
>>
>I was waiting for this question :P. How about: © 2015 Ankur Kothari

Sweet. And how about if I would want to make changes and/or redistribute
it? What are the conditions (I know it must be open source for it to be
published on github, but knowing the exact terms and conditions would
help).

Thanks,

Remco

Ben Finney

unread,
Apr 19, 2016, 2:21:32 AM4/19/16
to ledge...@googlegroups.com
Ankur Kothari <ankz.k...@gmail.com>
writes:

> * Remco Rijnders wrote:
> > Can you add a copyright notice to your project or let us know on
> > here what license this is covered under?
> >
> I was waiting for this question :P. How about: © 2015 Ankur Kothari

If you want to ensure every recipient has software freedom, I recommend
you write:

This is free software: you may copy, modify, and/or distribute this work
under the terms of the GNU General Public License, version 3.0 or later
as published by the Free Software Foundation.
No warranty expressed or implied. See the file ‘LICENSE.GPL-2’ for details,
or view it online at <URL:https://www.gnu.org/licenses/gpl-3.0>.

If you don't care about people making proprietary closed versions of
your work, I recommend you write:

This is free software: you may copy, modify, and/or distribute this work
under the terms of the Apache License, version 2.0 as published by the
Apache Software Foundation.
No warranty expressed or implied. See the file ‘LICENSE.ASF-2’ for details,
or view it online at <URL:https://www.apache.org/licenses/LICENSE-2.0.txt>.

Either way, please be sure to write explicit grant to do those things
(and specify the license terms). Without explicitly saying what people
may do, copyright law today forbids us from doing them.

--
\ “I don't want to live peacefully with difficult realities, and |
`\ I see no virtue in savoring excuses for avoiding a search for |
_o__) real answers.” —Paul Z. Myers, 2009-09-12 |
Ben Finney

Ankur Kothari

unread,
Apr 21, 2016, 7:08:25 AM4/21/16
to Ledger, ben+l...@benfinney.id.au
On Tuesday, 19 April 2016 16:21:32 UTC+10, Ben Finney wrote:
Llease be sure to write explicit grant to do those things 
(and specify the license terms). Without explicitly saying what people
may do, copyright law today forbids us from doing them.

Ben Finney

unread,
Apr 21, 2016, 4:04:02 PM4/21/16
to ledge...@googlegroups.com
Ankur Kothari <ankz.k...@gmail.com>
writes:
That's an explicit grant of the “Unlicense”, effectively granting all
copyright-restricted freedoms to the recipient. Thank you!

--
\ “At my lemonade stand I used to give the first glass away free |
`\ and charge five dollars for the second glass. The refill |
_o__) contained the antidote.” —Emo Philips |
Ben Finney

manish chandra

unread,
Sep 12, 2017, 7:41:49 AM9/12/17
to Ledger
Hi Ankur,
I'm trying to build Web interface for ledger CLI . Could you please help me with few of my queries --
1> Does Ledger - CLI reads only from .dat file ?
2> I want to give user access to input his transaction details from front - end. So were can I store that incoming new data ? Can I use any DB for that ?

Thanks 
Manish
Reply all
Reply to author
Forward
0 new messages