Here's one for getting my net worth:

#+BEGIN_SRC ledger :cmdline --price-db ~/ledger/.pricedb -V balance ^assets 
^liabilities ^investments --real :results output :exports results
!include /Users/mbhinder/ledger/personal_2016.ledger
#+END_SRC

I have this saved in my finance.org file and periodically C-c C-c on it to 
refresh the results.

Need to enable ledger in init.el:


(org-babel-do-load-languages
 'org-babel-load-languages '((python . t)
                             (ledger . t)
                             (C . t)
                             (sh . t)
                             (emacs-lisp . t)
                             ))



On Monday, August 1, 2016 at 9:35:41 AM UTC-7, Alexandre Rademaker wrote:
>
> Can you guys share examples of org-Babel and Python scripts ?! 
>
> Alexandre 
> Sent from my iPhone 
>
> On 1 de ago de 2016, at 13:29, John Wiegley <[email protected] 
> <javascript:>> wrote: 
>
> >>>>>> "CE" == Craig Earls <[email protected] <javascript:>> writes: 
> > 
> > CE> My most used reports run ledger a few times and format the output. I 
> use 
> > CE> python scripts for those. Simple reports are save in emacs modewhere 
> they 
> > CE> can be linked back to the input file. 
> > 
> > Same here; I use org-babel to save the report, rerun them, and capture 
> the 
> > output. 
> > 
> > -- 
> > John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F 
> > http://newartisans.com                          60E1 46C4 BD1A 7AC1 
> 4BA2 
> > 
> > -- 
> > 
> > --- 
> > 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 [email protected] <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to