How to automatic wirte in .beanount file specific price information?

97 views
Skip to first unread message

pannai...@gmail.com

unread,
May 15, 2018, 12:47:35 AM5/15/18
to Beancount
Hi,everyone!
    I get a problem that is when inserted those directive in .beanount file:

2018-5-14 commodity USD
    price:"CNY:yahoo/CNY=X"
    name:"US Dollar"

   and the prices information not automatic add into this file,like:



   What's wrong?What can I to do?
   Tell me thank your.

pannai...@gmail.com

unread,
May 16, 2018, 6:32:01 AM5/16/18
to Beancount
Why Not anybody reply?

在 2018年5月15日星期二 UTC+8下午12:47:35,pannai...@gmail.com写道:

Floris Kruisselbrink

unread,
May 16, 2018, 9:51:25 AM5/16/18
to Beancount
Hi!

I think you don't completely understand the way beancount works.
Nothing in beancount makes changes to the .beancount-files itself, only you do. All the beancount-tools (including bean-price) only read the file and process the information in some way.
If you want the price directives in your .beancount-file (which is totally reasonable), you have to copy-paste them in yourself.

Op dinsdag 15 mei 2018 06:47:35 UTC+2 schreef pannai...@gmail.com:

Jason Chu

unread,
May 16, 2018, 11:46:09 AM5/16/18
to bean...@googlegroups.com
A command like

bean-price file.beancount >> file.beancount

Will create new price directives and append them to your beancount file. Assuming you wrote all your commodity price metadata correctly.

Just be sure to remember both > otherwise you'll overwrite your entire beancount file. I use git to version my file so that I don't lose anything by accidental overwriting.

--
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/87879f1e-79fa-4f75-8158-bbd13a9ae30c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pannai...@gmail.com

unread,
May 16, 2018, 10:09:20 PM5/16/18
to Beancount
Is work after I'm inserted the command “bean-price file.beancount >> file.beancount -i” in .bash_profile,When start Cygwin.exe it's automatic added today price of commodities into specific .beancount-file.The solution can be fully automatic do as title say.So Think you very much!

在 2018年5月16日星期三 UTC+8下午11:46:09,Jason Chu写道:
Reply all
Reply to author
Forward
0 new messages