Here's a sample of my directory structure for inspiration. Might be
overkill for some, but it really works well for me.

At the top level I have:

   - documents - for pdfs, etc. The subdirectory structure mirrors the
   account structure.
   - example_queries.txt - Some sample queries I use for various data
   aggregation. Just for my own reference.
   - importers - This includes the python code for extractors and filers
   - includes - I have all the real data here. accounts.beancount and
   commodities.beancount only have the declaration statements, not any real
   data. events.beancount has life events (travel, marriage, child birth etc).
      - the journals subfolder has the actual journal data
      - past_years is where i archive files at the end of the year and
      start with fresh, blank files
      - prices.beancount has the price records for stocks, home value, etc
   - personal.beancount - has "option" and "plugin" declaration. The rest
   of the file just does an "include" on all the files in the includes
   subfolder
   - personal.import - has the config for extractors/filers
   - plugins - this subfolder has some 3rd party plugins I use and some
   I've written myself
   - price_sources - I have some code here that gets data for crypto (
   https://github.com/aamerabbas/beancount-coinmarketcap)


.
├── README
├── documents
│   ├── ...
├── downloads
├── example_queries.txt
├── importers
│   ├── __init__.py
│   ├── capital_one_card_extract
│   │   ├── ...
│   ├── capital_one_card_file
│   │   ├── ...
├── includes
│   ├── accounts.beancount
│   ├── commodities.beancount
│   ├── events.beancount
│   ├── journals
│   │   ├── banks
│   │   │   ├── wells_fargo.beancount
│   │   │   └── ...
│   │   ├── cards
│   │   │   ├── amex.beancount
│   │   │   └── ...
│   │   ├── cash.beancount
│   │   ├── crypto.beancount
│   │   ├── gift_cards.beancount
│   │   ├── pending.beancount
│   │   ├── real_estate.beancount
│   │   ├── retirement.beancount
│   │   ├── rsu.beancount
│   │   └── stocks.beancount
│   ├── past_years
│   │   └── 2019
│   │       ├── events.beancount
│   │       ├── journals
│   │       │   ├── banks
│   │       │   │   ├── wells_fargo.beancount
│   │       │   │   └── ...
│   │       │   ├── cards
│   │       │   │   ├── amex.beancount
│   │       │   │   └── ...
│   │       │   ├── cash.beancount
│   │       │   ├── crypto.beancount
│   │       │   ├── gift_cards.beancount
│   │       │   ├── pending.beancount
│   │       │   ├── real_estate.beancount
│   │       │   ├── retirement.beancount
│   │       │   ├── rsu.beancount
│   │       │   └── stocks.beancount
│   │       └── prices.beancount
│   └── prices.beancount
├── personal.beancount
├── personal.import
├── plugins
│   ├── __init__.py
│   ├── validate_unused_accounts.py
│   └── ...
└── price_sources
    ├── __init__.py
    └── coinmarketcap.py

On Mon, May 18, 2020 at 9:47 AM Martin Michlmayr <[email protected]> wrote:

> * Runar Petursson <[email protected]> [2020-05-17 11:00]:
> > My real mental block was around how to organize my beans.  Single file?
>
> My impression is that most people here have a single file or one file
> per year.
>
> I split per year and also per account.  I have one file for each
> account and then I have one journal for cash expenses.  This works
> for me and I don't see the attraction of putting everything into
> a single file.
>
> > Where do I put new transactions?
>
> At the end of the respective file in my case... really easy.
>
> All individual files have to be date ordered and I use the
> "file_ordering.py" plugin to verify that's the case:
> https://github.com/zacchiro/beancount-plugins-zack/
>
> I found a number of date errors because of this already. (Usually cut &
> paste errors)
>
> > What about other entities (wholly owned companies, partially owned
> companies).
>
> You'd probably show them at cost.  In theory you could do a
> consolidation according to IFRS, but do you really want to go
> there...?
>
> > How would I track passive income, trading income etc.
>
> It's just income for beancount.  I guess what you're really asking
> here is what kind of reports would make sense on a *reporting* level.
> e.g. passive income as a percentage of total income, passive income
> as a percentage of your target annual income for financial
> independence, etc.
>
> I think that's an interesting idea and I think some fava plugins would
> be best for that.  Maybe additions to
> https://github.com/redstreet/fava-investor
>
> > I was able to start thinking about auto-tagging/matching in a more
> > robust fashion.  To that regard I'm building a regular expression
> > rules engine.  This is a similar path that many people seem to have
> > gone down.  Finding the magic sweet-spot between learning from
> > existing transactions, having matching rules and a neural network/AI
> > :-).  I'm quite simple, so I just read a "rules.yaml" and modify the
> > existing entries, applying the account modifications.
>
> For the record, I've recently developed a similar "rules-importer" for
> Software in the Public Interest, Inc, a non-profit that moved from
> ledger to beancount.  Runar's code does pretty much the same my code
> does.  It would probably be best to agree on one code base and get
> this into into beancount.
>
> > I also haven't quite figured out how best to handle assets held in
> > companies.  While it seems obvious that a separate legal entity
> > needs its own set of books (and files its own taxes), I have several
> > companies where I'd like to integrate portions of the balance
> > sheet/expenses into my personal bean file.  An example is a legal
> > entity that manages an AirBnB and owns the property.
>
> You could look at how consolidations are done in IFRS (or another
> accounting standard).
>
> I wonder if a plugin could be written for that, hmm...
>
> > - VIM -- I've started some tools on this front, would like to be
> > able to do most common tasks from within vim, like merging files,
> > applying rules, and intelligently modifying entries.  Seems that
> > most of the python hooks are already in beancount (like parsing
> > single entry etc.). I'm already using the existing VIM plugin, but
> > would like to do so much more.
>
> Sounds interesting.  (And yes, Martin, please still use vim ;)
>
> --
> Martin Michlmayr
> https://www.cyrius.com/
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/20200518064717.GE5179%40jirafa.cyrius.com
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAOHSxbkU_yy0RFTJmyqzrBSw95uPkKO5ZL52iJFt%2BYWsfa1Zjg%40mail.gmail.com.

Reply via email to