Why doesn't this transaction balance?

2016-11-13 Thread Manuel Amador (Rudd-O)
2015/12/24 * bought
Assets:Cash -$267
Assets:Coins0.15826346 BTC @ $238
Assets:Coins0.84183654 BTC @ $273

2015/12/25 * sold
Assets:Coins   -0.15826346 BTC {$238} [2015-12-24] @ $455.5
Assets:Coins   -0.84183654 BTC {$273} [2015-12-24] @ $455.5
Assets:Cash  $455.5


-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New to ledger - how to ease in from gnucash?

2016-11-13 Thread Manuel Amador (Rudd-O)
On 11/11/2016 07:54 AM, ngoonee.t...@gmail.com wrote:
>
> You could use "git-annex" as a git-based auto sync:
>
> https://git-annex.branchable.com/
> 
>
> Thanks but there doesn't seem to be much automated about git-annex.
> dvcs-autosync seems more suitable, but its mostly dead (I still use it
> myself in a legacy manner though).

Use syncthing.  It's available for Android and for Linux.


-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ledger-python freezes when journal.query() is called

2016-11-07 Thread Manuel Amador (Rudd-O)
My ledgerhelpers Python-GTK+ program `addtrans` has this code, which
runs in a separate thread:

def _harvest_accounts_and_last_commodities(self):
# Commodities returned by this method do not contain any
annotations.
accts = []
commos = dict()
print "hanging" # <- IT HANGS HERE
for post in self.journal.query(""):
print "no longer hanging" # <- IT CEASES TO HANG HERE
for post in post.xact.posts():
if str(post.account) not in accts:
accts.append(str(post.account))
comm = post.amount / post.amount
comm.commodity = comm.commodity.strip_annotations()
commos[str(post.account)] = comm
self._accounts_and_last_commodities = (accts, commos)

Why does the UI of my program *hang* when journal.query() is called,
even though it is running in a completely separate thread?  Effectively
the question is: why isn't the GTK+ mainloop active when that code runs?

Thanks in advance.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Filter transactions based on other accounts involved

2016-11-07 Thread Manuel Amador (Rudd-O)
On 11/07/2016 04:22 AM, Simon Michael wrote:
> On 11/6/16 3:47 PM, Manuel Amador (Rudd-O) wrote:
>> On 11/04/2016 06:58 AM, Martin Michlmayr wrote:
>>>
>>>> 2. The register displays all transactions that put a commodity into
>>>> or take a commodity out of an account. Can I display where the money
>>>> comes from/goes to as well? In other words, can I get the complete
>>>> transaction detail in the register?
>>> --related
>>
>> How do you see both incoming and outgoing accounts?
>
> ledger -f t.ledger print Accounts:Hub | ledger -f - print A1   ?
>
>

Huh?

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Filter transactions based on other accounts involved

2016-11-06 Thread Manuel Amador (Rudd-O)
On 11/04/2016 06:58 AM, Martin Michlmayr wrote:
>
>> 2. The register displays all transactions that put a commodity into
>> or take a commodity out of an account. Can I display where the money
>> comes from/goes to as well? In other words, can I get the complete
>> transaction detail in the register?
> --related

How do you see both incoming and outgoing accounts?


-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Ledger Hackathon next month?

2016-11-04 Thread Manuel Amador (Rudd-O)
On 11/01/2016 06:44 PM, Bradley M. Kuhn wrote:
>
> The system has however extended beyond my ability to maintain the system and
> we're looking at what to do next.  I'd like to keep using the Ledger
> codebase, but Conservancy has some concerns.)

We would definitely benefit from knowing what those concerns are, and
what our options are to improve such that those concerns are addressed.


-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Ledgerhelpers addtrans gains screenshot guide

2016-11-04 Thread Manuel Amador (Rudd-O)
Hoping this will be helpful for ledgerhelpers users:

https://github.com/Rudd-O/ledgerhelpers/blob/master/doc/addtrans.md

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: lossless ledger journal parser

2016-10-08 Thread Manuel Amador (Rudd-O)
On 09/05/2016 06:53 PM, Ryan Nowakowski wrote:
> Hey Ledger Folks,
>
> I'm building a tool for automatically categorizing transactions based 
> on regex matching certain journal fields.  It's a standard UNIX filter
> that takes a journal file from stdin, modifies it and sends it to stdout.
> I want to maintain the exact format of the journal including comments.
> I haven't figured out a way to do this with the ledger parser python lib
> so I wrote my own[1].  Does anyone else have a better way to do this?
> I'd rather not maintain my own parser.
>
> Thanks!
>
> Ryan
>
> [1] https://gist.github.com/tubaman/0e80cec388d3d5d61e3f300e2477a9ae
>


I have a robust parser for ledger files in
https://github.com/Rudd-O/ledgerhelpers , but it is missing some
features.  It is meant to preserve the exact format and comments in the
file, so nothing gets destroyed in the parsing process.

I will welcome pull requests that add those features.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Detailed Balance Sheet

2016-08-11 Thread Manuel Amador (Rudd-O)
On 06/10/2016 03:09 AM, James wrote:
> hi,
> new to ledger here.
> trying to get a tree for opening balance but I cant seem to. For
> example sake see below of the results I am getting:-
>
> |
> ledger -f myfilename_2016.ledger bal assets liabilities
>  $500.00 Assets
> $-200.00 Liabilities
>$-3.87   Accrued_and_Deferred_Liabilities
> 
> |
>
> But my chart is more detailed and has many more branches as below:-

ledger bal only outputs accounts that have nonzero values.


-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Feature idea: custom named reports!

2016-08-07 Thread Manuel Amador (Rudd-O)
On 08/05/2016 01:28 AM, Josh wrote:
> Seeing other people's input on this topic, I suppose that there are
> already lots of other good ways to achieve the same thing. Shell
> aliases, shell scripts, scripts in other languages, editor hacks, etc.
> are all far more flexible, allowing multiple commands, parsing and
> processing of the output, interactivity, and so on. Sure, they do tie
> you to a particular tool set, limiting portability, but that's true no
> matter what: any system capable of describing non-trivial reports is
> going to be so complex as to essentially be a complete programming
> language, so we might as well just each pick an existing language we like.

I think the point is to have reports that users can download / share /
immediately exploit for their own personal use, such that they do not
have to come up with much integration or trust before they can use them.

We make a mistake when we tie functionality to specific text editors or
other platforms that users do not have or feel queasy about trying.  I
know we've been burned by, e.g., the crappy reporting functionality in
GnuCash, but if we had a feature whereby people could define reports
that look nice to the eye and can be launched in a visual / printable
form (HTML?), and if those reports could be created by anyone who has
Web / GUI programming experience (but no Emacs experience), suddenly
you'd see a ton more reports flourish and be available for Ledger and
other command-line accounting tools.

Of course, the trick is to get the abstraction level right — as a person
who is using the program to query the data, I want the report and its
formatting to be mostly independent from the parameters I'm using to
gather the data.

THE most  critical improvement that the command-line accounting
community can make, is getting reporting right.  I was trying really
hard to get Ledger to give me the data via bindings so I could build an
unambiguous and error-free reporting system (both charts and textual
reports), but the crasher bugs in Ledger remain unfixed, and therefore I
cannot continue.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wrote some code to automatically sync pricedb

2016-08-07 Thread Manuel Amador (Rudd-O)
On 08/04/2016 02:47 PM, Alexandre Rademaker wrote:
> Manuel, these are two very different projects! Preet presented un iterative 
> approach for fill the buffer automatically, completely integrated with Emacs, 
> you suggest some python scripts as wrappers to the ledger cli, right? I would 
> advise you to add examples of how to use your code. 
>
> Anyway, I  prefer the Preet approach! ;-)

Understood.  The approach I chose runs as a Vixie cron job
automatically, because I do not use Emacs and I prefer price quotes to
be updated when I'm not around, so I can see nice charts of how my net
worth changes over time, daily.

It'd be nice if we could unify the code that hoovers up the price
quotes, and I'm open to collaborating in that way.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Wrote some code to automatically sync pricedb

2016-08-03 Thread Manuel Amador (Rudd-O)
On 08/01/2016 01:20 AM, Preet Bhinder wrote:
> I started using ledger for tracking investments and net worth. It was
> becoming a bit painful keeping the .pricedb file upto date so I wrote
> some code to do it automatically through Yahoo! Finance.
>
> Posting in the hopes of it being useful for somebody
> else: https://github.com/mbhinder/ledger-pricedb
>
> I taught myself a little elisp while writing this today so I'm sure
> the code is atrocious - please be gentle. Any cleanup/feature addition
> work is welcome, please submit PRs to github.

Nice project.  Can I ask you to contribute to updateprices in
https://github.com/Rudd-O/ledgerhelpers?  It would mean the world to me.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Extremely weird balance issues

2016-07-30 Thread Manuel Amador (Rudd-O)
Hello, check this out with ledger 3.0 (numbers fudged, proportions kept):

---

prices.dat:

P 2016-07-30 02:40:00 CHF$ 1.03

ledger.dat:

[user@fin ~]$ ledger bal bank
15726.82 CHF  Assets:Bank
[user@fin ~]$ ledger bal bank -V
15726.82 CHF  Assets:Bank
[user@fin ~]$ ledger bal bank -X $
  $ 9,980.93  Assets:Bank

[user@fin ~]$ ledger reg bank -X $ | tail -2
16-Jul-25 Salary Assets:Bank   $
12,206.80   $ 17,151.82
16-Jul-25 Rent   Assets:Bank$
-1,425.00   $ 15,726.82

---

Wut?  This makes zero sense to me.  Why is this thing not working correctly?

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Any VIM plugins for sorting entries by date?

2016-07-06 Thread Manuel Amador (Rudd-O)
On 07/06/2016 11:35 AM, Gavin Hughes wrote:
> In the output I use `--sort date`, but I'd like to actually sort the
> transactions in the file. Are there any VIM plugins for this?
> -- 
>
> ---
> 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+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

You can try to sort entries by date through a command execution plugin
that will feed your data file to sorttrans-cli in
https://github.com/Rudd-O/ledgerhelpers

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Charts software for ledger?

2016-04-26 Thread Manuel Amador (Rudd-O)
On 04/26/2016 02:39 PM, John Wiegley wrote:
>
> The Python bindings are indeed a weak point within the implementation of
> C++Ledger. If anyone wants to take over maintenance of that part of the code,
> they would be most welcome. Until then, I don't think that state of affairs
> will change anytime soon.
>
> You may prefer Beancount, which is implemented in Python.

For purely selfish reasons (less work for me), I would prefer the Python
bindings to be better with Ledger.  It does look like Beancount is
winning here... and in many other senses.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Charts software for ledger?

2016-04-26 Thread Manuel Amador (Rudd-O)
On 04/26/2016 02:42 PM, Martin Blais wrote:
> Thanks.  I don't want commands running through CSV files.  I want an
>
> interactive tool that has things I can poke at, which will live-update
> the graphs, show me legends, and allow me to interact with the graphs.
>
>
> BTW have you seen Fava?
> http://fava.pythonanywhere.com/

Oh.

That looks AMAZING.

Thank you!  Even better reason to move to Beancount.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Charts software for ledger?

2016-04-26 Thread Manuel Amador (Rudd-O)
On 04/22/2016 11:03 AM, Lifepillar wrote:
>
> I don't know whether this might fit what you're looking after, but the
> approach I have been using for a while (and which I am satisfied with) is
> to let Ledger output the data in tabular format, then feed the output to
> some plotting program. With some scripting, this is easily automated.
> I use R, but you may as well use whatever app able to read CSV (including
> {Libre|Open}Office). As an example, my Ledger bundle for TextMate is able
> to plot charts if R is installed
> (https://github.com/lifepillar/Ledger.tmbundle).
> TextMate is OS X only, though.
>
> To export the data in a way that I may draw nearly any imaginable plot, I
> use three formats. One for register/periodic reports, with these fields:
>
> date; year; month; month_num; wday; wday_num; week; mday; amount;
> total; payee; account
>
> which is generated with this option (one line):
>
> --format
> '%(format_date(date,\"%Y-%m-%d;%Y;%b;%m;%a;%u;%W;%d\"));%(quantity(scrub(display_amount)));%(quantity(scrub(display_total)));%(payee);%(display_account)\n'
>
>
> One for balance reports, with these fields:
>
> balance; uncleared; account; partial_account
>
> --format '%(quantity(scrub(get_at(display_total,
> 0;%(quantity(scrub(get_at(display_total,
> 1;%(account);%(partial_account)\n%/'
>
> Finally, one for budget reports, with these fields:
>
> actual; budgeted; remaining; used; account; partial_account
>
> --format '%(quantity(scrub(get_at(display_total,
> 0;%(get_at(display_total, 1) ?
> quantity(-scrub(get_at(display_total, 1))) :
> 0.0);%(get_at(display_total, 1) ? (get_at(display_total, 0) ?
> quantity(-scrub(get_at(display_total, 1) + get_at(display_total, 0)))
> : quantity(-scrub(get_at(display_total, 1 :
> quantity(-scrub(get_at(display_total, 0;%(get_at(display_total, 1)
> ? quantity(100% * (get_at(display_total, 0) ?
> scrub(get_at(display_total, 0)) : 0.0) / -scrub(get_at(display_total,
> 1))) : "na");%(account);%(partial_account)\n%/'
>
> They are horribly complicated, but they get the job done beautifully.
> I do not type them all the time, of course: I use a Vim command that
> prints a report in any of those formats.
>
> Enjoy,
> Life
>
>

Thanks.  I don't want commands running through CSV files.  I want an
interactive tool that has things I can poke at, which will live-update
the graphs, show me legends, and allow me to interact with the graphs.

Since I could not find any, I HAD started writing one just two weeks ago
(my program uses pyplot provisionally).

I have ceased development of that program, and pretty much everything
until ledger's Python bindings stop making the program segfault.

So I guess I will have to wait for a very long time, and possibly
migrate to another accounting tool that I can commit to using.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python API segmentation faults

2016-04-24 Thread Manuel Amador (Rudd-O)
On 04/21/2016 04:28 AM, John Wiegley wrote:
>>>>>> Manuel Amador (Rudd-O) <rud...@rudd-o.com> writes:
>> Old report is available as one of my pull requests in the ledger/ledger
>> Github repo. Which, by the way, remains unmerged.
> Sorry about that; merged now.

Thanks.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python API segmentation faults

2016-04-24 Thread Manuel Amador (Rudd-O)
On 04/21/2016 05:20 AM, Metin Akat wrote:
> This is a bug report that shows how/when/why it crashes: 
> http://bugs.ledger-cli.org/show_bug.cgi?id=1163
> The same thing happens (for me) when I access it via Python
> It only happens with larger files (mine has ~20k transactions).
>

YES!  This is exactly my crash.

My file has grown to about ~10K lines.  If I am to do more than one
query operation using the bindings, Ledger crashes.  Sometimes a single
query operation is enough (I can whip up some demo code, but I need to
anonymize my file).

Furthermore, I have a separate issue.  With my file, the first Python
bindings query operation returns fine, but rereading the file and
issuing the exact same query barfs, saying some records do not balance
at all (by minuscule amounts, every time).  Really problematic.  I
believe it might be because later transactions in the file increase the
precision of the U.S. dollar, so the second time around that the file is
queried / loaded, the original transactions which balanced fine (with
the precision as-it-was-known-in-their-position-in-the-file) no longer
balance correctly.  In my opinion, this should be considered broken
behavior.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Charts software for ledger?

2016-04-24 Thread Manuel Amador (Rudd-O)
On 04/22/2016 02:28 PM, Martin Blais wrote:
> On Wed, Apr 20, 2016 at 6:55 PM, Manuel Amador (Rudd-O)
> <rud...@rudd-o.com <mailto:rud...@rudd-o.com>> wrote:
>
> On 04/20/2016 09:00 PM, Craig Earls wrote:
> > Since i have never gotten python to work without segfaults i cant answer
>
> After writing a small app that iterates through Ledger
> transactions and
> plots them, it has become exceedingly clear that you were right. 
> Simply
> going over a query() result causes it to crash or to come up with
> absurd
> errors like "Year must be between 1400...1".  Furthermore, for
> some
> reason now my GUI apps that used to work throw out balance errors.
>
> Really shoddy quality.  Can't wait to switch to Beancount. 
>
>
> That's not a constructive way to help.

I wasn't trying to help.  I was venting.

Not that I am unhelpful.  On the contrary, I help the project by sending
patches of whatever stuff I /can/ code, and I also try to help the
project by writing utilities and forming an ecosystem around the project
(this is the primary way in which I try to contribute, because I /do/
like the ideas and principles behind the project).  But, as it so
happens, C++ is not one of those things I can do, and the (obviously
long-standing) bug in the Python bindings is preventing me from growing
that ecosystem I spoke of.

And, as you can see from other replies, I'm not the only one who feels
badly about the Python bindings crashing and burning.  Who knows how
many programs to support Ledger did /not/ get written because of this
quality issue?  We won't know.

But, I /do/ know I am going to cease development of my own
ecosystem-enhancing utilities until the issue is resolved (which I hope
someone else does because, as I have explained, I do not know how). 
After all, what's the point of writing a program which is going to
segfault on the user (including me)?

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Python API segmentation faults

2016-04-20 Thread Manuel Amador (Rudd-O)
On 04/20/2016 11:23 PM, Ben Finney wrote:
> "Manuel Amador (Rudd-O)"
> <rud...@rudd-o.com> writes:
>
>> On 04/20/2016 09:00 PM, Craig Earls wrote:
>>> Since i have never gotten python to work without segfaults i cant
>>> answer
> We are talking about the Python API supplied as part of the Ledger
> distribution?

Yes.

>
>> After writing a small app that iterates through Ledger transactions and
>> plots them, it has become exceedingly clear that you were right.  Simply
>> going over a query() result causes it to crash or to come up with absurd
>> errors like "Year must be between 1400...1".
> Can you direct us to the bug reports detailing these problems?
>

Old report is available as one of my pull requests in the ledger/ledger
Github repo.  Which, by the way, remains unmerged.

Sigh.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Charts software for ledger?

2016-04-20 Thread Manuel Amador (Rudd-O)
On 04/20/2016 09:00 PM, Craig Earls wrote:
> Since i have never gotten python to work without segfaults i cant answer

After writing a small app that iterates through Ledger transactions and
plots them, it has become exceedingly clear that you were right.  Simply
going over a query() result causes it to crash or to come up with absurd
errors like "Year must be between 1400...1".  Furthermore, for some
reason now my GUI apps that used to work throw out balance errors.

Really shoddy quality.  Can't wait to switch to Beancount.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger Python balances at date?

2016-04-20 Thread Manuel Amador (Rudd-O)
On 04/20/2016 09:29 PM, Martin Blais wrote:
> For plotting net worth, you don't need every day, every week or every
> month is plenty sufficient.
> And you'll have to reconcile all of these to a single currency.
>
> Given how fast Ledger is, it's conceivable to run a loop and make
> multiple invocations of the binary for each week and parse its output
> and plot in a reasonable amount of time.

It's not that fast for me, even for something weekly.

I strongly prefer direct Python API access over parsing the output of
subprocess.Popen.  Anything that looks remotely like parsing that output
is a non-starter for my needs.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ledger Python balances at date?

2016-04-20 Thread Manuel Amador (Rudd-O)
Hello!  How can I query the ledger module / the ledger Journal object
within Python, to obtain a balance at a particular date?

I would very much not rather launch a binary for every day of the past 5
years or so.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Charts software for ledger?

2016-04-20 Thread Manuel Amador (Rudd-O)
On 04/20/2016 09:00 PM, Craig Earls wrote:
> Since i have never gotten python to work without segfaults i cant answer

My trick is to load a new Journal object after a Query, otherwise it
segfaults.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Charts software for ledger?

2016-04-20 Thread Manuel Amador (Rudd-O)
On 04/20/2016 08:47 PM, Martin Blais wrote:
> On Wed, Apr 20, 2016 at 3:43 PM, Manuel Amador (Rudd-O)
> <rud...@rudd-o.com <mailto:rud...@rudd-o.com>> wrote:
>
>
> Why isn't there anything like that?  
>
>
> You mean like this?
> https://bitbucket.org/blais/beancount/src/8ac805ab793f96594871a1594e72f4039bbc2ee3/experiments/compensation/net-worth-over-time.py?at=default=file-view-default
>

Pretty much.  Does this mean I must switch to Beancount?


-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Charts software for ledger?

2016-04-20 Thread Manuel Amador (Rudd-O)
Hi!  I'm looking for a program that will help me chart my net worth and
other such things such as expenses.

The few programs I have found have deplorable installation instructions
("run this program, it will download some mystery meat from the
Internets, then put some files here, then create a configuration file")
and have questionable security practices ("then run this other program,
which starts an HTTP server on your local machine").

Nothing of the sort is necessary if a good desktop application is
written using libraries that are readily available in most Linux
distributions.  To wit, my ledgerhelpers helpers are desktop apps, they
require no configuration at all, and they work with your existing setup
(modulo a few format limitations).

Why isn't there anything like that?  How hard can it be to load data
from ledger using its Python bindings, then plot it using something like
pygtkchart or kqtquickcharts?

Anyway, just my thoughts.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Related accounts and running totals

2016-02-27 Thread Manuel Amador (Rudd-O)
On 02/14/2016 07:26 PM, Richard Lawrence wrote:
> Hi all,
>
> I have a question about related accounts.  I'm on ledger 3.1.0.  (I also
> use hledger 0.27, which I'd be happy to employ here if it can answer
> this question more easily.)
>
> Here is my use case: I keep track of expenses shared with a roommate
> under expenses:shared, and at the end of a given reporting period I want
> to be able to ask, "How much did I pay to expenses:shared, and how much
> did my roommate pay?" to see who owes money to the other.
>
> From the manual, I have gotten this far:  I can do
>
> $ ledger --related --display 'account =~ /assets:Me/' reg expenses:shared 
>
> to see transactions where I paid toward expenses shared, and similarly I
> could use assets:Roommate in the display predicate to see what my
> roommate paid.
>
> But as the manual notes, "The running total...is off, however, since a
> display expression is being used."  The running total reflects all
> transactions on expenses:shared, not just the ones that are selected by
> the display predicate.  So the above command is only useful for telling
> me the amounts of the individual transactions displayed; I must tally
> them up some other way before I can figure out who owes who, and how
> much.
>
> So my question is, is there some way to get a correct running total when
> using --related and limiting to a subset of transactions?  Perhaps by
> using --limit instead of --display, or some kind of fancy format
> string...?  Nothing I have been able to come up with seems to work.
>
> Thanks for any insights you can provide!
>
> Best,
> Richard
>

I, too, would like to find out the answer to this question.  Still
haven't been able to find a reliable answer on showing *full*
transactions of an account that give me a running balance of the
specific account being queried.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: new docs site, anyone ?

2016-02-13 Thread Manuel Amador (Rudd-O)
On 02/12/2016 11:25 PM, Martin Blais wrote:
> That's a very difficult argument to make.

It isn't really an argument, just a thing that some people believe.  I
myself, for example, don't believe that, but I still compartment Google
JavaScript to a separate VM.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Introducing: ledgerhelpers, a new way to enter Ledger data

2016-02-11 Thread Manuel Amador (Rudd-O)
On 02/11/2016 03:08 AM, Craig Earls wrote:
> This seems interesting but requires jumping through serious hoops on
> Mac Os since El Capitan won't even let root create directories under
> /usr without disabling System Integrity Protection
> 
>

The Makefile lets you specify where to install stuff:

make install BINDIR=/opt/some/dir

Should work.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Introducing: ledgerhelpers, a new way to enter Ledger data

2016-02-11 Thread Manuel Amador (Rudd-O)
On 02/11/2016 01:23 PM, Craig Earls wrote:
> There is no Makefile in the source tree that I could find. 
>

Oh shit, you're right, my mistake.  If you want to run ledgerhelpers on
a Mac OS X machine, you'll need to deploy it to a virtualenv that has
GTK+ and Python GObject Introspection -- the matter is harder than just
disabling system integrity protection.  Alternatively, you can use
distutils / setuptools to see if you can build an installable Mac OS X
package, but note that the dependencies still remain necessary.

I acknowledge that may be very complicated to accomplish on Mac OS X,
but if you manage to do that, I am super happy to incorporate your
instructions on how to do that.

-- 
Rudd-O
http://rudd-o.com/

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Multiple currencies

2013-01-29 Thread Manuel Amador (Rudd-O)
You know the bug number? How do I search for it?

John Wiegley jo...@newartisans.com wrote:

 Manuel Amador dragonf...@gmail.com writes:

 Ledger appears to break the fundamental accounting eqn when using
multiple
 currencies:

   $ 1000Capital Gains

I believe there is already a bug logged about this, and the way that
Ledger
auto-generates the Capital Gains posting mentioned above.

John

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

-- 

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.