Hello, I've installed beancount on my openSUSE Tumbleweed machine in order
whether I could migrate to it from ledger-cli.
I understand there are some syntax differences between the two, but wonder if
there is some way to (easily) convert from one to the other?
I tried loading my current ledger-cli file, but it looks that the problem is
lack of Unicode support in Beancount since I got many Lexer/Syntax errors?
I'm not such a heave ledger-cli user and having web-view along with some
other beancount-goodies could be nice...tried hledger while using Debian, but
since I moved to openSUSE I did not want to fiddle with installing Haskell
deps. Very soon I plan to move to Free/PC-BSD and there are no ports
either for hledger nor for Beancount, but considering I plan to jump into
Python (migrating to Python-powered static-site-generator) and do not
consider learning Haskell in this lifetime, Beancount sounds as better option
- after it gets proper Unicode support - providing there is easy way to
fallback to Ledger if required.
Any hints?
--
Those who are on this path are resolute in purpose,
and their aim is one. O beloved child of the Kurus,
the intelligence of those who are irresolute is many-branched.
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/87fv6pc9tp.fsf%40atmarama.ddns.net.
For more options, visit https://groups.google.com/d/optout.
Martin Blais <bl...@furius.ca> writes:
> There is an easy way to convert from Beancount to Ledger: bean-report has a
> command to do that:
>
> bean-report <filename> ledger
It does not work here, iow. I get:
gour@atmarama ~/financije> bean-report count.ledger ledger
/home/gour/financije/count.ledger:5: syntax error, unexpected ERROR
/home/gour/financije/count.ledger:5: Lexer error; erroneous token: 'Opening'
/home/gour/financije/count.ledger:5: Lexer error; erroneous token: 'Balances'
/home/gour/financije/count.ledger:7: Lexer error; erroneous token: ':eur'
/home/gour/financije/count.ledger:8: Lexer error; erroneous token: ':hrk'
[...]
and the head (line #s added by me) of my count.ledger looks as follows:
#1 ; year 2015
#2
#3 ;include directives.ledger
#4
#5 2014/12/31 * Opening Balances
#6 Assets:ENC 59.48 HRK
#7 Assets:Gotovina:eur 1088.60 EUR
#8 Assets:Gotovina:hrk 1,470.95 HRK
#9 ...
> Converting the other way has to be done manually so far.
> It might be worthwhile searching the mailing-list for hints on what others
> have done.
OK.
> Beancount does not currently support Unicode.
> I want to do it someday, but it'll require a lexer rewrite, and it's a low
> priority item.
Too bad. It seems it's showstopper for me since I annotate my ledger by using
native (Croatian) characters...
Martin Blais <bl...@furius.ca> writes:
> There is an easy way to convert from Beancount to Ledger: bean-report has a
> command to do that:
>
> bean-report <filename> ledger
It does not work here, iow. I get:
gour@atmarama ~/financije> bean-report count.ledger ledger
/home/gour/financije/count.ledger:5: syntax error, unexpected ERROR
/home/gour/financije/count.ledger:5: Lexer error; erroneous token: 'Opening'
/home/gour/financije/count.ledger:5: Lexer error; erroneous token: 'Balances'
/home/gour/financije/count.ledger:7: Lexer error; erroneous token: ':eur'
/home/gour/financije/count.ledger:8: Lexer error; erroneous token: ':hrk'
[...]
and the head (line #s added by me) of my count.ledger looks as follows:
It seems like you are running bean-report on a ledger file. You can use bean-report only on a beancount file, to convert it to ledger (Martin said this too, but it seems to have been lost in communication). You seem to be trying the opposite, from what I can tell.
Sincerely,
Gour
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/480a3c6e-d24c-48a2-8417-02bd43f9f6d7%40googlegroups.com.
Martin Blais <bl...@furius.ca> writes:
> Someone just needs to use the Ledger Python bindings to write out a
> Beancount-compatible data structure. It should rename things where
> necessary (e.g. $ -> USD or other, remove spaces in account names, etc.),
In my case, I'm using HRK/EUR and not symbols, but would have to add dashes
for spaces in some accounts, which is, anyway, a good practice.
> but one of the issues is how to decide whether a conversion is intended to
> be made at-cost or by price, because in Beancount the semantics are
> different. Creative thinking will be required to do this, I think that the
> converter would need to be provided hints to carry out the translation
> properly. Ideally this should be all automatic.
I believe that I'll proceed 'manually' by using editor's (Emacs) features to
do the needful.
Otoh, Beancount seems to allow more logical organization of the COA, so
automatic conversion would have to be pretty smart. :-)
Otoh, it's one-time-only task - if I stay with Beancount, there is no need
for further work and if something would happen with the project there is,
fortunately, ability to switcb back by using 'ledger' export.
Now, I wonder whether I should convert just my present 2015.ledger counting
that Beancount will be able to include (old) files in the future or I its
performance should not be the problem so one is safe to keep everything
within single file?
Here is the stats of the single file which I have - not quite up-to-date, but
pretty close:
Time period: 10-Oct-31 to 15-Dec-17 (1873 days)
Files these postings came from:
/home/gour/financije/financije.ledger.org
Unique payees: 2681
Unique accounts: 151
Number of postings: 9026 (4.8 per day)
Uncleared postings: 126
Days since last post: -206
Posts in last 7 days: 30
Posts in last 30 days: 52
Posts seen this month: 8
Sincerely,
Gour
--
But for one who takes pleasure in the self, whose human life
is one of self-realization, and who is satisfied in the self only,
fully satiated — for him there is no duty.
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/87vbfhdunu.fsf%40atmarama.ddns.net.