On Sun, Nov 26, 2017 at 1:07 PM, Vivek Gani <[email protected]> wrote:

> Thanks for clarifying! Right after I sent my email yesterday I discovered
> the -r option in bean-extract! My initial email was reflecting on the
> export of my importer run via nosetool tests, where the .extract is the
> same no matter how the array of entries is ordered.
>
> I slept on it and decided to switch back to reverse chronological order -
> I'm still learning beancount's toolchain so the thing I'm staring at most
> is the ledger file itself, so at least for my own needs it's felt easier to
> have an ordering of...
>
> - all account `opens` listed first as a preamble to serve as a catch-all
> reference of expense categories/etc.
> - transactions newest first, which is arguably worse in some programmatic
> respects but feels more human-readable considering all the websites I log
> into (along with some of their csv exports) present data this way.
>

Absolutely valid motivations. There's nothing better about one order vs.
the other. You should be able to organize your input file in the way that
is the most convenient for you. I happen to order my by "sections" using
org-mode as a folding/outline mode. That's how I navigate quickly within
this gigantic text file.



-Vivek
>
> On Sunday, November 26, 2017 at 7:34:06 AM UTC-8, Martin Blais wrote:
>>
>> And BTW, the only reason I say "more or less" is because the parser will
>> attach meta-data that contains the original line number to the directives;
>> but none of the processing makes use of it, other than the "bean-doctor
>> context" command, which uses it for finding the closest transaction from a
>> particular line number.
>>
>>
>> On Sun, Nov 26, 2017 at 10:32 AM, Martin Blais <[email protected]> wrote:
>>
>>> About your prior question: Beancount completely disregards order. It is
>>> more or less thrown away; all the directives are sorted by date for
>>> processing.
>>>
>>>
>>> On Sat, Nov 25, 2017 at 5:45 PM, Vivek Gani <[email protected]> wrote:
>>>
>>>> After trying to fight to have a reverse chronological order setup,
>>>>
>>>
>>> What difficulties did you encounter? There should have been none.
>>> Beancount throws away ordering (on purpose).
>>>
>>>
>>>
>>>> I ceded after realizing I'm going to be fighting how beancount ingest
>>>> outputs data - namely the order of 'entries' returned from the extract
>>>> method in an Importer is always going to be re-ordered in chronological
>>>> order. Seems to be better to go for for convention over configuration.
>>>>
>>>
>>> That's trivial to change; there's a command-line option to output the
>>> entries in reverse order.
>>> See here:
>>> https://bitbucket.org/blais/beancount/src/6292d31f5d14b4bcb2
>>> 82847241b82d9505589e0e/beancount/ingest/extract.py?
>>> at=default&fileviewer=file-view-default#extract.py-190
>>>
>>>
>>>
>>>
>>>>
>>>> As far as re-ordering my existing ledger back into chronlogical order,
>>>> you can just use bean-query 'print' to do this:
>>>> $ bean-query myLedger.beancount  print > myLedger-chronological.beancou
>>>> nt
>>>>
>>>>
>>>> On Saturday, November 25, 2017 at 1:34:51 PM UTC-8, Vivek Gani wrote:
>>>>>
>>>>> Hi! I've been learning beancount and have been really impressed with
>>>>> the thought and structure that's gone into it. I'm a bit afraid of going
>>>>> into a bikeshedding argument here, but is there any issue with using
>>>>> beancount in reverse chronological order (newest first)? So far I haven't
>>>>> seen any argument against it, though all the examples skew towards a 
>>>>> normal
>>>>> chronological order - is the rationale for that method so it's easier to
>>>>> 'append' new transactions?
>>>>>
>>>>> Cheers,
>>>>> Vivek
>>>>>
>>>> --
>>>> 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 [email protected].
>>>> To post to this group, send email to [email protected].
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/beancount/da1c17b5-aec1-47c7-8ebd-cb445933f77a%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/beancount/da1c17b5-aec1-47c7-8ebd-cb445933f77a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/beancount/da231872-5baa-4d6c-992e-7088edf516a5%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/da231872-5baa-4d6c-992e-7088edf516a5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMEB8EAL%2B-P0rAOUWgPYgL084bRkkHikmcXtfhbFSJvow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to