On Thu, Dec 16, 2010 at 01:21:47PM -0700, Zack Williams wrote:
> > I just have a .ledger file, that !includes all my others. I have oh,
> > thirty now.
>
> This doesn't exist yet, but I'd love support for wildcards in the
> !include path... for example if you had things organized by year:
>
> !include ~/ledger/20*/totals.ledger
>
> Or if you had one per customer, and all customer data in a subdirectory:
>
> !include ~/customers/*/*.ledger
>
> - Zack
>
echo "Regenerating .ledger include list"
mv .ledger .ledger.old
cat .ledger.old \
| grep -v 'include \./' \
> .ledger
find . -type f -name '*.dat' \
| grep -v '\.ledger' \
| grep -v old \
| sort \
| awk '{print "!include " $1 }' \
>> .ledger
Wildcards are nice, but not required. My script separates out
transactions to .dat files based on metadata, so I regen my list frequently.
------------------------------------------------------------------
Russell Adams [email protected]
PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/
Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3