Ledger Mobile App

887 views
Skip to first unread message

Leonardo Melo

unread,
Jul 16, 2015, 10:32:06 AM7/16/15
to ledge...@googlegroups.com
Hi everyone, not sure this is the best way to post this. Please let me know if I'm screwing this up.

I've been meaning to develop a Ledger CLI front-end hybrid web/mobile app to interact with some sort of backend web implementation but could never find a Backend implementation for it.

Looking through this Google groups I noticed that some, could I say, sibling projects of Ledger seem to have some sort of web implementation to them, eg Haskell Ledger or Beancount.

So my questions to the group would be: Is Ledger not being actively developed anymore? Should I instead choose one of the other projects and develop my app using one of those? Is there something like this already in the community that I could help improve?

Any information regarding the matter would be great. My idea is to use the Ionic Framework to create the app and I was between using PHP or NodeJS as the backend (as PHP and Javascript are my strongest skills). I can also try some Python or as a last resort Rails implementation if that's all there is.

The features for my app would initially include viewing balances and recent postings as well as adding a new posting.

Thanks everyone =D

John Wiegley

unread,
Jul 16, 2015, 10:54:23 AM7/16/15
to ledge...@googlegroups.com
>>>>> Leonardo Melo <leom...@gmail.com> writes:

> So my questions to the group would be: Is Ledger not being actively
> developed anymore? Should I instead choose one of the other projects and
> develop my app using one of those? Is there something like this already in
> the community that I could help improve?

It's not being actively developed, but it most certainly has not been
abandoned. If you want quick response from the maintainers, then beancount and
hledger will give you a better experience. But C++ Ledger is here to stay, as
I intend to keep using it for my finances for the rest of my life, at least
until hledger replaces its functionality to a similar degree.

John

Zack Williams

unread,
Jul 16, 2015, 11:34:11 AM7/16/15
to ledge...@googlegroups.com
On Thu, Jul 16, 2015 at 5:31 AM, Leonardo Melo <leom...@gmail.com> wrote:
> I can also try some Python

I'd probably work through the Python interface, as it's already built
in and making a http API in python isn't that difficult.

I've fiddled around with Ledger's python interface a bunch, and it's
quite workable once you recognize the rough edges - basically you have
to recurse through the data structure to generate your own balances,
as it doesn't sum sub-accounts, and frequently you'll have to convert
from balance objects to amount objects in order to perform certain
math operations:

https://github.com/zdw/ledgercalc

- Zack

Emile Cantin

unread,
Jul 16, 2015, 11:36:32 AM7/16/15
to ledge...@googlegroups.com
You mentioned node earlier, have you seen this: https://www.npmjs.com/package/ledger-cli ? It's a wrapper around the command-line tool. A proper JS parser would probably be better, though.

Emile

--

---
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.

Leonardo Melo

unread,
Jul 17, 2015, 2:54:15 AM7/17/15
to ledge...@googlegroups.com, jo...@newartisans.com


It's not being actively developed, but it most certainly has not been
abandoned. If you want quick response from the maintainers, then beancount and
hledger will give you a better experience. But C++ Ledger is here to stay, as
I intend to keep using it for my finances for the rest of my life, at least
until hledger replaces its functionality to a similar degree.

John

Thank you very much for the quick response!
It's very reassuring to know that even though C++ Ledger is not actively being developed it's still maintained =D

I would rather stick with the C++ since it's what I have and the other implementations might vary in functions slightly.
I'll do some research and find out what would be the best way to do the backend once I finish with the initial project, which is the font-end of the app. 

Leonardo Melo

unread,
Jul 17, 2015, 3:00:42 AM7/17/15
to ledge...@googlegroups.com
Le jeu. 16 juil. 2015 à 11:34, Zack Williams <zdw...@gmail.com> a écrit :
On Thu, Jul 16, 2015 at 5:31 AM, Leonardo Melo <leom...@gmail.com> wrote:
> I can also try some Python

I'd probably work through the Python interface, as it's already built
in and making a http API in python isn't that difficult.

I've fiddled around with Ledger's python interface a bunch, and it's
quite workable once you recognize the rough edges - basically you have
to recurse through the data structure to generate your own balances,
as it doesn't sum sub-accounts, and frequently you'll have to convert
from balance objects to amount objects in order to perform certain
math operations:
 
 
Thank you for the suggestion I'll keep it in mind for when the time comes. I'm not that experienced with Python but still quite like the language,
Learning a little bit more about it would also be a good thing for me.


On Thursday, 16 July 2015 16:36:32 UTC+1, Emile Cantin wrote:
You mentioned node earlier, have you seen this: https://www.npmjs.com/package/ledger-cli ? It's a wrapper around the command-line tool. A proper JS parser would probably be better, though.

Emile

Thank you! That seemed awesome, but I couldn't get it to work on this quick test a did. I'll check it out better over the weekend. I'm not quite sure what you mean by a proper parser though, do you mean a parser to the ledger file that would do basically what the other Ledgers do, but using "native" JS instead?

Emile Cantin

unread,
Jul 17, 2015, 9:20:04 AM7/17/15
to ledge...@googlegroups.com
Yes, that's exactly what I mean. That would enable us to build a completely front-end web app that does what you want. That said, it's probably achievable by compiling the current C++ back-end with emscripten. Food for thought!

Emile

--

ivstefn

unread,
Jul 17, 2015, 7:16:04 PM7/17/15
to ledge...@googlegroups.com
I posted a reply over nntp from gmane gateway but it looks it didn't get here, so I'll post again from Google Groups interface (the interface... lord help me). I apologize to the group if you get two messages.

On Thursday, July 16, 2015 at 4:32:06 PM UTC+2, Leonardo Melo wrote:
Hi everyone, not sure this is the best way to post this. Please let me know if I'm screwing this up.

I've been meaning to develop a Ledger CLI front-end hybrid web/mobile app to interact with some sort of backend web implementation but could never find a Backend implementation for it.

Looking through this Google groups I noticed that some, could I say, sibling projects of Ledger seem to have some sort of web implementation to them, eg Haskell Ledger or Beancount.

So my questions to the group would be: Is Ledger not being actively developed anymore? Should I instead choose one of the other projects and develop my app using one of those? Is there something like this already in the community that I could help improve?

A program doesn't need to be under heavy breakneck-speed development to be alive. Most reliable software I use (and like) is in maintenance mode. 

Any information regarding the matter would be great. My idea is to use the Ionic Framework to create the app and I was between using PHP or NodeJS as the backend (as PHP and Javascript are my strongest skills). I can also try some Python or as a last resort Rails implementation if that's all there is.

The features for my app would initially include viewing balances and recent postings as well as adding a new posting.
 Why do you jump straight to complicated frameworks and technologies?

Webapps, as popular as they are now in this day and age are not simple, nor they perform well, especially on low end android phones (I have one). I don't think they should be first choice.

Also, I think there is some javascript  webapp frontend for ledger, I think I found it on GitHub some time ago. The dependencies were _crazy_ I don't think I even got it to work locally. There was a demo online, and I really wasn't impressed. It was laggy, as most javascript stuff is, and also too underfeatured to be useful.


My idea (for a normal computer running real OS) is:

TCK/TK frontent might not be the most popular idea, but I think it would
be very reasonable. It looks reasonably good to me, I really don't like
overdesigned software. I like software that uses familiar looking widgets.

For examples see gitk and git-gui, that are official git GUI clients that
should be installed if you use git. You can see the code, just
vi /usr/bin/gitk (or wherever). Also /usr/share/git-gui/lib/* (or wherever).

From Tk wiki: "Bindings exist for several other languages, including
Ada (called TASH), Haskell (called HTk), Perl, Python (called Tkinter),
Ruby, Rexx, and Common Lisp. " So these languages could be used too.

TCL and Tk are in all distro repos, and available for OS X and Windows and
doing a ledger desktop GUI this way would be the most reasonable way.

As for being able to enter/see stuff on the mobile... I can see there might be some
value in that, but it's too much work just to be able to enter a
transaction or two a day. I just enter a reminder in my todo app, and
at the end of the day when I'm at my computer enter it into ledger file.
It's not the end of the world, and it doesn't make ledger useless.

As for mobile app implementation:
You might want to check out http://todotxt.com/
It is a paid app in the Play Store but it's GPL'd software with source
available on github.

It's a todo app, stores notes in a plaintext file on dropbox. I think that
might be what you're looking for. Dropbox would make it easy to get
what you want, and not care about auth (Dropbox does that),
collisions (dropbox 'should :) ' be doing that).

Sources for the both android and ios apps are on Github and I think
doing it that way would be a good start. And doing it that way you
don't need a backend -- Dropbox does that. You only need frontend.

I hope this was helpful.

--
Ivan

Leonardo Melo

unread,
Jul 23, 2015, 3:39:09 PM7/23/15
to ledge...@googlegroups.com
​Hi everyone, here is my progress so far. I made a sort of mock-up front-end mobile app as I said I wanted to. The code is on Github and to deploy the app to your phone you'll need Ionic Framework on your desktop to build the app or the Ionic View app installed on your phone (which you'll need me to send you a share link by email and an account on their website I believe).

Not sure many of you would actually be interested in this project of mine, but for anyone that is, it'd be cool to let me know as it would give me more motivation to go on and to share stuff here too.

As for the backend, I looked at all the possibilities with Node currently and decided that I'll go ahead and try to build my own native parser using Node.js. So far it doesn't do much and you'll need to require it to be able to make real use. All it does is take in a ledger file and parse it in a nice JSON format, which I believe is what I'll be dealing with through the rest of the app. Again the code is available on Github and also on npm, package name is ledger-parser.

If you decide to take a shot at any of these, let me know what you think. Soon enough I'll be adding the README files to each project with better instructions on how to use it, so feel free to wait until there as well if you want.

Thank you all very much for all the information and insight shared so far o/


A program doesn't need to be under heavy breakneck-speed development to be alive. Most reliable software I use (and like) is in maintenance mode. 
 
​Yeah, happily enough, I found out that this is also true for Ledger =D
​Yeah, I tried something like this before, I actually use Orgzly which is compatible with Org-mode
and emacs (both key parts to my workflow) but I just wanted to build something for mobile and 
with what I know so far, a hybrid app is ​what I can build.

I might actually build a native Android app at some point, as most of the stuff I want to do on a backend.
And eventually, if I get good enough on Android I might build a fully fledged Ledger app. But I find Ledger
to be very robust and not quite sure I can put the necessary effort to build something as good as the C++ version.

Sources for the both android and ios apps are on Github and I think
doing it that way would be a good start. And doing it that way you
don't need a backend -- Dropbox does that. You only need frontend.

I hope this was helpful.
 
​Yes it was, thank you very much!​

Leo Melo

David Glasser

unread,
Jul 23, 2015, 4:09:52 PM7/23/15
to ledge...@googlegroups.com

Yeah, I find todo.txt to be a pretty good way to enter informal receipts on my Android phone that I later convert into ledger. They get date stamped automatically, which is nice.

--dave

--

Martin Blais

unread,
Jul 23, 2015, 4:59:55 PM7/23/15
to ledger-cli
That's the right frame of mind IMO. Data entry on a phone is useful merely for temporary storage until you get to integrate it in your text file later on, usually only for cash transactions that won't show up in an import (e.g. from your credit card), ones that you might otherwise forget. I use little notes in Google Keep for that, but if I had (date + description + account + amount) tuples in an app that automatically spits it out in Ledger/Beancount format that could be a useful tool when on-the-go.

Keep in mind that the point of using a text file as input is in the first place to avoid having to build and update a GUI. Building a GUI for _input_ on top Ledger is sort of pointless (though it does make a lot of sense to build a GUI for outputs & reports).

Another thing that would be useful is the ability to export one's portfolio and combine it with market values so that you can monitor your trading positions during the day. I use Google Finance for that at the moment, but I will migrate to exporting to a Google Spreadsheet. I'm not sure having a custom app would make sense, since you can do that with a simple CGI script on a server that your phone accesses.


Reply all
Reply to author
Forward
0 new messages