FatherMcGruder (OP)
|
|
July 18, 2011, 02:48:17 PM |
|
"Make it easier for users to work with alternative/non-ISO/private currencies. ( http://uservoice.com/a/35yKe)" Folks, I made the above suggestion to the GnuCash developers to include better support for currencies that do not meet ISO requirements, like the bitcoin. I hope you'll all up vote it.
|
Use my Trade Hill referral code: TH-R11519 Check out bitcoinity.org and Ripple. Shameless display of my bitcoin address: 1Hio4bqPUZnhr2SWi4WgsnVU1ph3EkusvH
|
|
|
|
FatherMcGruder (OP)
|
|
September 29, 2011, 03:31:00 AM |
|
Well, I decided to make GnuCash treat the bitcoin like a regular currency myself. I downloaded the source code and modified two files, iso-4217-currencies.scm and iso-4217-currencies.c, both in '/gnucash-2.4.7.1b/src/engine/'. To the former I added the following lines: ;; non-standard/private - Not ISO4217, but we designate it as such so that Gnucash will treat it as such.
( "Bitcoin" "bitcoin" "satoshi" "ISO4217" "BTC" "nil" 100000000 100000000 "BTC" ) ;; Would have used XBC as the mnemonic to conform with ISO4217, but it appears to have been taken.
( "Ithaca HOUR" "hour" "hour" "ISO4217" "IHR" "nil" 6 10 "" ) ";;" indicates a comment. To the latter I added: { const char *fullname = "Bitcoin"; gnc_commodity *c = gnc_commodity_new(book, CUR_I18N(fullname), "ISO4217", "BTC", "nil", 100000000);
if(!c) { PWARN("failed to create commodity for currency %s", fullname); } else { if(!gnc_commodity_table_insert(table, c)) { PWARN("failed to insert %s into commodity table", fullname); } } }
{ const char *fullname = "Ithaca HOUR"; gnc_commodity *c = gnc_commodity_new(book, CUR_I18N(fullname), "ISO4217", "IHR", "nil", 10);
if(!c) { PWARN("failed to create commodity for currency %s", fullname); } else { if(!gnc_commodity_table_insert(table, c)) { PWARN("failed to insert %s into commodity table", fullname); } } Although I'm not sure if I needed to do so. I also made sure to add the following lines to '/usr/share/xml/iso-codes/iso_4217.xml': <iso_4217_entry letter_code="BTC" numeric_code="nil" currency_name="Bitcoin"/> <iso_4217_entry letter_code="IHR" numeric_code="nil" currency_name="Ithaca HOUR"/> Then, I compiled GnuCash: sudo apt-get build-dep gnucash sudo sh configure --prefix=/opt/gnucash sudo make sudo make install That puts an executable here: /opt/gnucash/bin/gnucash Ta da! Keep in mind that I started with GnuCash 2.4.7 and that I am running it on Ubuntu 11.04. YMMV.
|
Use my Trade Hill referral code: TH-R11519 Check out bitcoinity.org and Ripple. Shameless display of my bitcoin address: 1Hio4bqPUZnhr2SWi4WgsnVU1ph3EkusvH
|
|
|
julz
Legendary
Offline
Activity: 1092
Merit: 1001
|
|
September 29, 2011, 03:40:31 AM |
|
Thanks for drawing my attention to GnuCash - I'll be giving it a whirl for sure.
Upvoted.
I hope the changes get integrated into the main builds.
|
@electricwings BM-GtyD5exuDJ2kvEbr41XchkC8x9hPxdFd
|
|
|
FatherMcGruder (OP)
|
|
September 29, 2011, 01:10:04 PM |
|
I hope the changes get integrated into the main builds. Well, if the GnuCash developers decide to do so, and I doubt they will, they won't take my route. I had to modify a system file, iso_4217.xml, after all. Furthermore, it works by pretending that the target non-ISO4217 currencies do qualify as ISO4217. That just strikes me as an undignified kludge. I doubt that the developers will update GnuCash to include the bitcoin or any non-ISO4217 currency because they've stated that they won't include currencies that ISO4217 doesn't recognize. They also seem content with forcing users to make do, rather than coding a proper feature that would users to easily define their own non-standard currencies. Someone needs to actually code the feature and submit it. If the developers reject it then we can just fork the project.
|
Use my Trade Hill referral code: TH-R11519 Check out bitcoinity.org and Ripple. Shameless display of my bitcoin address: 1Hio4bqPUZnhr2SWi4WgsnVU1ph3EkusvH
|
|
|
ne1
|
|
September 29, 2011, 04:10:27 PM |
|
Thanks for that. Awsome work.
|
|
|
|
ripper234
Legendary
Offline
Activity: 1358
Merit: 1003
Ron Gross
|
|
December 19, 2012, 10:07:04 PM |
|
Reviving thread - there's also a Bitcoin specific ticket on UserVoice, please vote.
Any other alternatives that are better suited for Bitcoin? Any of those support price import from Mt. Gox (to view an entire account that's composed of BTC & USD)?
|
|
|
|
EskimoBob
Legendary
Offline
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
|
|
January 24, 2013, 09:06:43 PM |
|
Looks like people just did not get it over at http://gnucash.1415818.n4.nabble.com/For-The-Love-Of-Bitcoin-td4348895i20.html and wasted more time on arguing about ISO or not ISO, than it have taken to write the cod and get the BTC on the currency list. FatherMcGruder, maybe you can write a batch and get it included in the next version? If you do not mind, can you please add Litecoin too (actually, add your own currency "module" is even better)
|
While reading what I wrote, use the most friendliest and relaxing voice in your head. BTW, Things in BTC bubble universes are getting ugly....
|
|
|
Sukrim
Legendary
Offline
Activity: 2618
Merit: 1007
|
|
January 24, 2013, 11:04:15 PM |
|
Please just mirror the sourcecode on github + create a branch that includes your "fix". Ideally also provide some compiled versions. Also to make the patch cleaner you might wanna look into extending GnuCash to include http://tools.ietf.org/html/draft-stanish-x-iso4217-a3-01 instead of just ISO4217, which would be the preferred solution by the BTC (BTCX) community anyways. Having a patch ready once the gnuCash developers decide to go along with that would be great. It's OpenSource after all...
|
|
|
|
bitcoinsrule
Newbie
Offline
Activity: 26
Merit: 0
|
|
January 25, 2013, 01:37:27 AM |
|
Ledger.
Do a search for "ledger" on the reddit subereddit /r/bitcoin. Works great for bitcoin, has a script that pulls spot price from mtgox and has gotten me to get off gnucash completely. Takes some getting used to but is awesome. Won't be for everyone.
|
|
|
|
EskimoBob
Legendary
Offline
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
|
|
January 27, 2013, 08:45:57 PM |
|
I am going to use FIM for LTC "place holder" because it ceased to be legal tender on 28 February 2002. I think this is a really good example why gnucash developers obsession with ISO labels is a bit strange. Yes, those labels are useful but there is no need to exclude the option for adding a custom currencies to gnucash.
|
While reading what I wrote, use the most friendliest and relaxing voice in your head. BTW, Things in BTC bubble universes are getting ugly....
|
|
|
Sukrim
Legendary
Offline
Activity: 2618
Merit: 1007
|
|
January 28, 2013, 07:44:24 PM |
|
Ledger.
Do a search for "ledger" on the reddit subereddit /r/bitcoin. Works great for bitcoin, has a script that pulls spot price from mtgox and has gotten me to get off gnucash completely. Takes some getting used to but is awesome. Won't be for everyone.
...or just use this link: http://www.ledger-cli.org/It still is actively maintained + developed ( https://github.com/ledger/ledger). Anyways, seems VERY nice, if only there would be some nice frontends for reports, graphs and stuff. Also that text file approach sounds interesting, but might not be appealing to everyone.
|
|
|
|
bitcoinsrule
Newbie
Offline
Activity: 26
Merit: 0
|
|
January 28, 2013, 09:31:28 PM |
|
...or just use this link: http://www.ledger-cli.org/It still is actively maintained + developed ( https://github.com/ledger/ledger). Anyways, seems VERY nice, if only there would be some nice frontends for reports, graphs and stuff. Also that text file approach sounds interesting, but might not be appealing to everyone. It's VERY VERY nice actually, (for me anyway). At any rate, here is the subreddit that introduced it to me, it gives out a very though explanation on how to get started and might be easier than the docs. http://www.reddit.com/r/Bitcoin/comments/155gw5/heres_how_you_use_ledger_to_account_for_bitcoin/Also, there's a link to a python script that will pull spot prices for silver, gold and BTC. As far as the frontend support goes, it supports GNUplot for graphs and such.
|
|
|
|
Rassah
Legendary
Offline
Activity: 1680
Merit: 1035
|
|
January 29, 2013, 03:48:03 PM |
|
I was totally blasting Ledger as a crappy tool only suited for Linux command-line geeks, and was using GNUCash only, but Ledger still eventually won me over. It's still a bit of a pain to have to remember some of the commands when running reports, but the text file approach does make it somewhat easier to be more precise, and so far I've been able to find every accounting function and report that I've needed from GNUCash. Currently using Ledger for Bitcoin100.org's finances.
|
|
|
|
EskimoBob
Legendary
Offline
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
|
|
January 29, 2013, 08:47:45 PM Last edit: January 29, 2013, 10:29:23 PM by EskimoBob |
|
I am going to give up on gnucash unless I find a workaround for problems I have with reports in multiple currencies. I actually got the books looking and doing what we needed in the ART project. When I wanted to generate reports, and this damn thing refused to use any of the exchange rates I had entered, I walked away. To put it politely, cnugash is a joke when it comes to multiple currencies (and do not get me started on this "no user added currencies" BS they got going there!) Rassah, thanks for the encouragement I think I am going to look in to Ledger too. We only have few transactions at the moment so this is a perfect time to test this stuff out.
|
While reading what I wrote, use the most friendliest and relaxing voice in your head. BTW, Things in BTC bubble universes are getting ugly....
|
|
|
Rassah
Legendary
Offline
Activity: 1680
Merit: 1035
|
|
January 30, 2013, 02:31:49 AM |
|
Just a tip, whenever I exchange some USD into BTC, I do something like Assets:BTCWallet ฿20 @@ $384
The @@ tells it the total you paid for the currency and calculates the exchange rate for you (I can also use just one @ to give it the exchange rate directly). Then if I run a Ledger command with a -G or something, it tells me my gains and losses on each account. A prices command will also give me a list of exchange rates for every date available.
|
|
|
|
EskimoBob
Legendary
Offline
Activity: 910
Merit: 1000
Quality Printing Services by Federal Reserve Bank
|
|
January 30, 2013, 09:31:59 AM |
|
Just a tip, whenever I exchange some USD into BTC, I do something like Assets:BTCWallet ฿20 @@ $384
The @@ tells it the total you paid for the currency and calculates the exchange rate for you (I can also use just one @ to give it the exchange rate directly). Then if I run a Ledger command with a -G or something, it tells me my gains and losses on each account. A prices command will also give me a list of exchange rates for every date available.
Lets move all Ledger related questions ad discussion here: https://bitcointalk.org/index.php?topic=139995.msg1489920Thank you
|
While reading what I wrote, use the most friendliest and relaxing voice in your head. BTW, Things in BTC bubble universes are getting ugly....
|
|
|
bitcoinsrule
Newbie
Offline
Activity: 26
Merit: 0
|
|
January 30, 2013, 06:26:59 PM |
|
Just a tip, whenever I exchange some USD into BTC, I do something like Assets:BTCWallet ฿20 @@ $384
What keystroke do you use to get "฿"?
|
|
|
|
Rassah
Legendary
Offline
Activity: 1680
Merit: 1035
|
|
January 30, 2013, 06:36:01 PM |
|
Just a tip, whenever I exchange some USD into BTC, I do something like Assets:BTCWallet ฿20 @@ $384
What keystroke do you use to get "฿"? I google searched for Thai Baht, and copy/pasted the character. Sorry
|
|
|
|
ErebusBat
|
|
January 31, 2013, 03:45:49 AM |
|
For what it's worth I spent 10 mins dinking around and think this might be possible without compiling your own version. I downloaded GnuCash and created a new book (sqlite format). Then I opened the file in my sqlite editor and ran: insert into commodities (guid, namespace, mnemonic, fullname, cusip, fraction, quote_flag, quote_source) VALUES ('11f74daa3e324da18e8c1fb4871a0f70', 'CURRENCY', 'BTC', 'Bitcoin', '', 100000000, 1, 'currency') The GUID is random, and the fraction doesn't appear to actually work as intendended; however this allows you to create accounts as BTC now. Perhaps someone smarter than me can take this farther. I used http://wiki.gnucash.org/wiki/SQL as inspiration.
|
|
|
|
|