*** empty log message ***

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2080 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-03-14 23:50:36 +00:00
parent 1e307c71df
commit 97cba07559
19 changed files with 5050 additions and 321 deletions

View File

@ -1,3 +1,23 @@
2000-03-14 Dave Peticolas <peticola@cs.ucdavis.edu>
* src/register/gnome/gnucash-sheet.c
(gnucash_register_key_press_cb): generate activate event on a
keypad enter as well as the return key.
* Docs/C/xacc-ticker.html: updated for Yahoo Europe information.
2000-03-13 Dave Peticolas <peticola@cs.ucdavis.edu>
* src/gnome/dialog-utils.c: added Yahoo Europe to the quote source
menu.
* src/quotes/Quote.pm: added method for getting Yahoo European
quotes. Also, fixed the parsing of csv data.
* src/quotes/gnc-prices: cleanup the code, less wordy output.
* src/quotes/Quote.pm (yahoo): updates from latest YahooQuote.pm
2000-03-12 Dave Peticolas <peticola@cs.ucdavis.edu>
* src/scm/c-interface.scm (gnc:error->string tag args): print a

View File

@ -426,6 +426,10 @@
<dd>for German text and euro date rework</dd>
<dt> <a href="mailto:tma@iis.fhg.de"> Herbert Thoma</a></dt>
<dd>gnome register patch</dd>
<dt> <a href="mailto:detrout@earthlink.net"> Diane
Trout</a></dt>
@ -435,6 +439,10 @@
<dd>guile and register patches</dd>
<dt> <a href="mailto:dwmw2@infradead.org"> David Woodhouse</a></dt>
<dd>Great Britain translations</dd>
<dt> <a href="mailto:gooch@ic.EECS.Berkeley.EDU"> Ken
Yamaguchi</a></dt>

View File

@ -31,14 +31,17 @@
"Security:"</li>
<li>Select a quote source from the pull-down menu. Currently
supported quote sources include <b>Yahoo</b>, <b>Fidelity
Investments</b>, <b>T. Rowe Price</b> and the <b>Vanguard
Group</b>. Note that Yahoo will provide price quotes for many
mutual funds <em>including</em> Fidelity, T.Rowe Price and
Vanguard, and that the quoted prices at Yahoo <em>
should</em> be identical to those that may be found at the
source sites. (Otherwise, somebody's reporting wrong
information!)</li>
supported quote sources include <b>Yahoo</b>, <b>Yahoo
Europe</b>, <b>Fidelity Investments</b>, <b>T. Rowe Price</b>
and the <b>Vanguard Group</b>. Note that Yahoo will provide
price quotes for many mutual funds <em>including</em> Fidelity,
T.Rowe Price and Vanguard, and that the quoted prices at Yahoo
<em> should</em> be identical to those that may be found at the
source sites (otherwise, somebody's reporting wrong
information!). If you choose Yahoo Europe, you should append the
market code for the security, such as PA for Paris, BE for
Berlin, etc. Example: 12150.PA (a Peugot security in the Paris
market).</li>
</ul>
<p> A sample image is shown below:</p>
@ -52,12 +55,11 @@
gnc-prices myaccts.xac
</pre>
<p> Running this command will print various diagnostic messages
to the screen while it loads data. It will work only when the
host computer is attached to the internet. It <em> can</em>
function in conjunction with masquerading-style firewalls, but
is not currently able to use proxy servers to get through proxy
or socks-style firewalls.</p>
<p> Running this command will print various diagnostic messages to
the screen while it loads data. It will work only when the host
computer is attached to the internet. It can function in
conjunction with masquerading-style firewalls and proxy
servers.</p>
<p> The command can be run many times in one day; however, it
will update the accounts at most once with the most recent
@ -84,4 +86,3 @@
Page.</a></p>
</body>
</html>

2
README
View File

@ -580,8 +580,10 @@ Christopher Seawood <cls@seawood.org> for XbaeMatrix core dump
Mike Simons <msimons@fsimons01.erols.com> misc configure.in patches
Richard Skelton <rich@brake.demon.co.uk> for Solaris cleanup
Henning Spruth <spruth@bigfoot.com> for German text & euro date rework
Herbert Thoma <tma@iis.fhg.de> gnome register patch
Diane Trout <detrout@earthlink.net> scheme qif import patch
Rob Walker <rob@valinux.com> guile and register patches
David Woodhouse <dwmw2@infradead.org> Great Britain translations
Ken Yamaguchi <gooch@ic.EECS.Berkeley.EDU> QIF import fixes; MYM import
... and I am sure that I have missed many others ...

2
configure vendored
View File

@ -830,7 +830,7 @@ fi
ALL_LINGUAS="fr de"
ALL_LINGUAS="fr de en_GB"
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or

View File

@ -26,7 +26,7 @@ AC_INIT(src/guile/gnucash.h.in)
AM_INIT_AUTOMAKE(gnucash,1.3.2)
dnl Set of available languages.
ALL_LINGUAS="fr de"
ALL_LINGUAS="fr de en_GB"
AC_PROG_INSTALL
AC_PROG_RANLIB

View File

@ -4,7 +4,6 @@ Makefile
Makefile.in
POTFILES
cat-id-tbl.c
gnucash.pot
pseudo-source.c
stamp-cat-id
extract-macros.perl

157
po/de.po
View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gnucash 1.3.1\n"
"POT-Creation-Date: 2000-03-12 23:14-0800\n"
"POT-Creation-Date: 2000-03-14 15:41-0800\n"
"PO-Revision-Date: 2000-03-12 15:20+0100\n"
"Last-Translator: Jan-Uwe Finck <Jan-Uwe.Finck@bigfoot.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -33,7 +33,7 @@ msgstr "Kontobezeichnung"
msgid "Date"
msgstr "Datum"
#: ../po/guile_strings.txt:6 messages-i18n.c:272
#: ../po/guile_strings.txt:6 messages-i18n.c:274
msgid "Equity"
msgstr "Nettowert"
@ -87,7 +87,7 @@ msgstr ""
msgid "Time"
msgstr "Zeit"
#: ../po/guile_strings.txt:19 messages-i18n.c:292
#: ../po/guile_strings.txt:19 messages-i18n.c:294
msgid "Memo"
msgstr "Memo"
@ -337,7 +337,7 @@ msgstr "Durchscnitt"
msgid "A_ccount Balance Tracker"
msgstr "Konten-Saldo-Beobachter"
#: ../po/guile_strings.txt:78 messages-i18n.c:280
#: ../po/guile_strings.txt:78 messages-i18n.c:282
msgid "From"
msgstr "Von"
@ -517,7 +517,7 @@ msgstr "Doppel-Modus Farben wechseln sich mit jeder Buchung ab"
msgid "General"
msgstr "Allgemein"
#: ../po/guile_strings.txt:122 messages-i18n.c:320
#: ../po/guile_strings.txt:122 messages-i18n.c:322
msgid "Security"
msgstr "Sicherheit"
@ -529,7 +529,7 @@ msgstr "Einfache Zeile"
msgid "Sub-Accounts"
msgstr "Unter-Konten"
#: ../po/guile_strings.txt:125 messages-i18n.c:288
#: ../po/guile_strings.txt:125 messages-i18n.c:290
msgid "Liability"
msgstr "Kreditkonto"
@ -565,7 +565,7 @@ msgstr "Nummer"
msgid "Show both icons and text"
msgstr "Sowohl Icons, als auch Text anzeigen"
#: ../po/guile_strings.txt:134 messages-i18n.c:296
#: ../po/guile_strings.txt:134 messages-i18n.c:298
msgid "Notes"
msgstr "Notizen"
@ -577,7 +577,7 @@ msgstr "Berichte"
msgid "Single mode active background"
msgstr "Hintergrund der aktiven Buchung im Einzelzeilen-Modus"
#: ../po/guile_strings.txt:137 messages-i18n.c:314
#: ../po/guile_strings.txt:137 messages-i18n.c:316
msgid "Register"
msgstr "Register"
@ -653,7 +653,7 @@ msgstr "Sortiere als zweite Bedingung hiernach"
msgid "Income.Salary.Taxable"
msgstr "Einkommen.Bezahlung.zu versteürn"
#: ../po/guile_strings.txt:156 messages-i18n.c:284
#: ../po/guile_strings.txt:156 messages-i18n.c:286
msgid "Income"
msgstr "Einnahme"
@ -812,7 +812,7 @@ msgstr "Das Zeichen, das Kontennamen trennt"
msgid "__gui"
msgstr "__gui"
#: ../po/guile_strings.txt:195 messages-i18n.c:332
#: ../po/guile_strings.txt:195 messages-i18n.c:334
msgid "To"
msgstr "Zu"
@ -820,7 +820,7 @@ msgstr "Zu"
msgid "smallest to largest, earliest to latest"
msgstr "kleinster zu grösstem, ältester zu jüngstem"
#: ../po/guile_strings.txt:197 messages-i18n.c:335
#: ../po/guile_strings.txt:197 messages-i18n.c:337
msgid "Type"
msgstr "Typ"
@ -880,7 +880,7 @@ msgstr "2 Wochen"
msgid "Nothing"
msgstr "Nichts"
#: ../po/guile_strings.txt:212 messages-i18n.c:274
#: ../po/guile_strings.txt:212 messages-i18n.c:276
msgid "Expense"
msgstr "Ausgabe"
@ -957,11 +957,11 @@ msgid "Reverse Credit Card, Liability, Equity, and Income Accounts"
msgstr ""
"Zeige Kreditkarten-, Schulden-, Ausgleichs- und Einkommenskonten umgedreht"
#: ../po/guile_strings.txt:230 messages-i18n.c:328
#: ../po/guile_strings.txt:230 messages-i18n.c:330
msgid "Stock"
msgstr "Depot"
#: ../po/guile_strings.txt:231 messages-i18n.c:276
#: ../po/guile_strings.txt:231 messages-i18n.c:278
msgid "Extensions"
msgstr "Erweiterungen"
@ -2105,246 +2105,255 @@ msgid "Difference"
msgstr "Diffenrenz"
#: messages-i18n.c:269
msgid "Direct Debit"
msgstr ""
#: messages-i18n.c:270
msgid "Dist"
msgstr "Spende"
#: messages-i18n.c:270
#: messages-i18n.c:271
msgid "Div"
msgstr "Dividende"
#: messages-i18n.c:271
#: messages-i18n.c:272
#, fuzzy
msgid "Duplicate"
msgstr "Datum"
#: messages-i18n.c:273
msgid "Edit"
msgstr "Bearbeiten"
#: messages-i18n.c:273
#: messages-i18n.c:275
msgid "Exit"
msgstr "Beenden"
#: messages-i18n.c:275
#: messages-i18n.c:277
msgid "Export"
msgstr "Exportieren"
#: messages-i18n.c:277
#: messages-i18n.c:279
msgid "Fee"
msgstr "Gebühr"
#: messages-i18n.c:278
#: messages-i18n.c:280
msgid "File"
msgstr "Datei"
#: messages-i18n.c:279
#: messages-i18n.c:281
msgid "Forward"
msgstr "Vorwärts"
#: messages-i18n.c:281
#: messages-i18n.c:283
msgid "GnuCash Preferences"
msgstr "GnuCash Einstellungen"
#: messages-i18n.c:282
#: messages-i18n.c:284
msgid "Help"
msgstr "Hilfe"
#: messages-i18n.c:283
#: messages-i18n.c:285
msgid "Import"
msgstr "QIF-File importieren"
#: messages-i18n.c:285
#: messages-i18n.c:287
msgid "Increase"
msgstr "Zunahme"
#: messages-i18n.c:286
#: messages-i18n.c:288
msgid "Int"
msgstr "Beteiligung"
#: messages-i18n.c:287
#: messages-i18n.c:289
msgid "Jump"
msgstr "Sprung"
#: messages-i18n.c:289
#: messages-i18n.c:291
msgid "License"
msgstr "Lizenz"
#: messages-i18n.c:290
#: messages-i18n.c:292
msgid "Loan"
msgstr "Darlehen"
#: messages-i18n.c:291
#: messages-i18n.c:293
msgid "LTCG"
msgstr "Zinsen aus langfristigen Kapitalanlagen"
#: messages-i18n.c:293
#: messages-i18n.c:295
msgid "New"
msgstr "Neu"
#: messages-i18n.c:294
#: messages-i18n.c:296
msgid "No"
msgstr "Nein"
#: messages-i18n.c:295
#: messages-i18n.c:297
msgid "(none)"
msgstr "(kein(e))"
#: messages-i18n.c:297
#: messages-i18n.c:299
msgid "Num"
msgstr "Num"
#: messages-i18n.c:298
#: messages-i18n.c:300
msgid "Ok"
msgstr "Ok"
#: messages-i18n.c:299
#: messages-i18n.c:301
msgid "Online"
msgstr "Online"
#: messages-i18n.c:300
#: messages-i18n.c:302
msgid "Open"
msgstr "Öffnen"
#: messages-i18n.c:301
#: messages-i18n.c:303
msgid "Parameters"
msgstr "Parameter"
#: messages-i18n.c:302
#: messages-i18n.c:304
msgid "Payment"
msgstr "Belastung"
#: messages-i18n.c:303
#: messages-i18n.c:305
msgid "Portfolio"
msgstr "Portfolio"
#: messages-i18n.c:304
#: messages-i18n.c:306
msgid "POS"
msgstr "Karten-Terminal"
#: messages-i18n.c:305
#: messages-i18n.c:307
msgid "Preferences"
msgstr "Einstellungen"
#: messages-i18n.c:306
#: messages-i18n.c:308
msgid "Price"
msgstr "Preis"
#: messages-i18n.c:307
#: messages-i18n.c:309
msgid "Print"
msgstr "Drucken"
#: messages-i18n.c:308
#: messages-i18n.c:310
msgid "Profits"
msgstr "Saldo Einnahmen/Ausgaben"
#: messages-i18n.c:309
#: messages-i18n.c:311
msgid "Quit"
msgstr "Beenden"
#: messages-i18n.c:310
#: messages-i18n.c:312
msgid "Rebate"
msgstr "Rabatt"
#: messages-i18n.c:311
#: messages-i18n.c:313
msgid "Receive"
msgstr "Empfangen"
#: messages-i18n.c:312
#: messages-i18n.c:314
msgid "Reconcile"
msgstr "Abstimmen"
#: messages-i18n.c:313
#: messages-i18n.c:315
msgid "Record"
msgstr "Eintragen"
#: messages-i18n.c:315
#: messages-i18n.c:317
msgid "Report"
msgstr "Bericht"
#: messages-i18n.c:316
#: messages-i18n.c:318
msgid "Reports"
msgstr "Berichte"
#: messages-i18n.c:317
#: messages-i18n.c:319
msgid "Save"
msgstr "Sichern"
#: messages-i18n.c:318
#: messages-i18n.c:320
msgid "Savings"
msgstr "Ersparnisse"
#: messages-i18n.c:319
#: messages-i18n.c:321
msgid "Scrub"
msgstr "Ausbuchen"
#: messages-i18n.c:321
#: messages-i18n.c:323
msgid "Sell"
msgstr "Verkauf"
#: messages-i18n.c:322
#: messages-i18n.c:324
msgid "Settings"
msgstr "Einstellungen"
#: messages-i18n.c:323
#: messages-i18n.c:325
msgid "Simple"
msgstr "Einfach"
#: messages-i18n.c:324
#: messages-i18n.c:326
msgid "Sold"
msgstr "Verkauft"
#: messages-i18n.c:325
#: messages-i18n.c:327
msgid "Spend"
msgstr "Ausgabe"
#: messages-i18n.c:326
#: messages-i18n.c:328
msgid "Split"
msgstr "Split"
#: messages-i18n.c:327
#: messages-i18n.c:329
msgid "STCG"
msgstr "Zinsen aus kurzfristigen Anlagen"
#: messages-i18n.c:329
#: messages-i18n.c:331
msgid "Style"
msgstr "Stil"
#: messages-i18n.c:330
#: messages-i18n.c:332
msgid "Surplus"
msgstr "Überschuß"
#: messages-i18n.c:331
#: messages-i18n.c:333
msgid "Teller"
msgstr ""
#: messages-i18n.c:333
#: messages-i18n.c:335
msgid "Today"
msgstr "Heute"
#: messages-i18n.c:334
#: messages-i18n.c:336
msgid "Total"
msgstr "Gesamt"
#: messages-i18n.c:336
#: messages-i18n.c:338
msgid "Transaction"
msgstr "Transaktion"
#: messages-i18n.c:337
#: messages-i18n.c:339
msgid "Transfer"
msgstr "Transfer"
#: messages-i18n.c:338
#: messages-i18n.c:340
#, fuzzy
msgid "Value"
msgstr "Wert"
#: messages-i18n.c:339
#: messages-i18n.c:341
msgid "WARNING"
msgstr "WARNUNG"
#: messages-i18n.c:340
#: messages-i18n.c:342
msgid "Wire"
msgstr "Telegrafische Zahlung"
#: messages-i18n.c:341
#: messages-i18n.c:343
msgid "Withdraw"
msgstr "Abhebung"
#: messages-i18n.c:342
#: messages-i18n.c:344
msgid "Yes"
msgstr "Ja"

2261
po/en_GB.po Normal file

File diff suppressed because it is too large Load Diff

157
po/fr.po
View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: gnucash 1.2.0\n"
"POT-Creation-Date: 2000-03-12 23:14-0800\n"
"POT-Creation-Date: 2000-03-14 15:41-0800\n"
"PO-Revision-Date: 2000-03-06 23:47+0200\n"
"Last-Translator: Yannick LE NY <y-le-ny@ifrance.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -33,7 +33,7 @@ msgstr "Nom du compte"
msgid "Date"
msgstr "Date"
#: ../po/guile_strings.txt:6 messages-i18n.c:272
#: ../po/guile_strings.txt:6 messages-i18n.c:274
msgid "Equity"
msgstr "Capitaux propres(Actif)"
@ -89,7 +89,7 @@ msgstr ""
msgid "Time"
msgstr "Heure"
#: ../po/guile_strings.txt:19 messages-i18n.c:292
#: ../po/guile_strings.txt:19 messages-i18n.c:294
msgid "Memo"
msgstr "Mémo"
@ -342,7 +342,7 @@ msgstr "Moyenne"
msgid "A_ccount Balance Tracker"
msgstr "Suivi du solde du compte"
#: ../po/guile_strings.txt:78 messages-i18n.c:280
#: ../po/guile_strings.txt:78 messages-i18n.c:282
msgid "From"
msgstr "Depuis"
@ -524,7 +524,7 @@ msgstr "Transactions avec couleurs altern
msgid "General"
msgstr "Général"
#: ../po/guile_strings.txt:122 messages-i18n.c:320
#: ../po/guile_strings.txt:122 messages-i18n.c:322
msgid "Security"
msgstr "Valeur"
@ -536,7 +536,7 @@ msgstr "Ligne unique"
msgid "Sub-Accounts"
msgstr "Sous-comptes"
#: ../po/guile_strings.txt:125 messages-i18n.c:288
#: ../po/guile_strings.txt:125 messages-i18n.c:290
msgid "Liability"
msgstr "Dettes(Passif)"
@ -572,7 +572,7 @@ msgstr "Num
msgid "Show both icons and text"
msgstr "Montrer ensemble les icônes et le texte"
#: ../po/guile_strings.txt:134 messages-i18n.c:296
#: ../po/guile_strings.txt:134 messages-i18n.c:298
msgid "Notes"
msgstr "Notes"
@ -584,7 +584,7 @@ msgstr "Rapports"
msgid "Single mode active background"
msgstr "Arrière-plan de la transaction active en mode simple"
#: ../po/guile_strings.txt:137 messages-i18n.c:314
#: ../po/guile_strings.txt:137 messages-i18n.c:316
msgid "Register"
msgstr "Registre"
@ -660,7 +660,7 @@ msgstr "Trier par ce second crit
msgid "Income.Salary.Taxable"
msgstr "Revenus.Salaire.Imposable"
#: ../po/guile_strings.txt:156 messages-i18n.c:284
#: ../po/guile_strings.txt:156 messages-i18n.c:286
msgid "Income"
msgstr "Revenus"
@ -825,7 +825,7 @@ msgstr "Le caract
msgid "__gui"
msgstr ""
#: ../po/guile_strings.txt:195 messages-i18n.c:332
#: ../po/guile_strings.txt:195 messages-i18n.c:334
msgid "To"
msgstr "Vers"
@ -833,7 +833,7 @@ msgstr "Vers"
msgid "smallest to largest, earliest to latest"
msgstr "du plus petit vers le plus grand, du plus ancien vers le plus récent"
#: ../po/guile_strings.txt:197 messages-i18n.c:335
#: ../po/guile_strings.txt:197 messages-i18n.c:337
msgid "Type"
msgstr "Type"
@ -893,7 +893,7 @@ msgstr "2 semaines"
msgid "Nothing"
msgstr "Rien"
#: ../po/guile_strings.txt:212 messages-i18n.c:274
#: ../po/guile_strings.txt:212 messages-i18n.c:276
msgid "Expense"
msgstr "Dépenses"
@ -970,11 +970,11 @@ msgid "Reverse Credit Card, Liability, Equity, and Income Accounts"
msgstr ""
"Inverser les comptes carte de crédit, dettes, capitaux propres, et revenus"
#: ../po/guile_strings.txt:230 messages-i18n.c:328
#: ../po/guile_strings.txt:230 messages-i18n.c:330
msgid "Stock"
msgstr "Actions"
#: ../po/guile_strings.txt:231 messages-i18n.c:276
#: ../po/guile_strings.txt:231 messages-i18n.c:278
msgid "Extensions"
msgstr "Extensions"
@ -2123,245 +2123,254 @@ msgid "Difference"
msgstr "Différence"
#: messages-i18n.c:269
msgid "Direct Debit"
msgstr ""
#: messages-i18n.c:270
msgid "Dist"
msgstr "Dist"
#: messages-i18n.c:270
#: messages-i18n.c:271
msgid "Div"
msgstr "Div"
#: messages-i18n.c:271
#: messages-i18n.c:272
#, fuzzy
msgid "Duplicate"
msgstr "Date"
#: messages-i18n.c:273
msgid "Edit"
msgstr "Afficher"
#: messages-i18n.c:273
#: messages-i18n.c:275
msgid "Exit"
msgstr "Quitter"
#: messages-i18n.c:275
#: messages-i18n.c:277
msgid "Export"
msgstr "Exporter"
#: messages-i18n.c:277
#: messages-i18n.c:279
msgid "Fee"
msgstr "Taxes/Impots"
#: messages-i18n.c:278
#: messages-i18n.c:280
msgid "File"
msgstr "Fichier"
#: messages-i18n.c:279
#: messages-i18n.c:281
msgid "Forward"
msgstr "Suivant"
#: messages-i18n.c:281
#: messages-i18n.c:283
msgid "GnuCash Preferences"
msgstr "Préférences de GnuCash"
#: messages-i18n.c:282
#: messages-i18n.c:284
msgid "Help"
msgstr "Aide"
#: messages-i18n.c:283
#: messages-i18n.c:285
msgid "Import"
msgstr "Importer"
#: messages-i18n.c:285
#: messages-i18n.c:287
msgid "Increase"
msgstr "Augmenter"
#: messages-i18n.c:286
#: messages-i18n.c:288
msgid "Int"
msgstr "Int"
#: messages-i18n.c:287
#: messages-i18n.c:289
msgid "Jump"
msgstr "Sauter"
#: messages-i18n.c:289
#: messages-i18n.c:291
msgid "License"
msgstr "Licence"
#: messages-i18n.c:290
#: messages-i18n.c:292
msgid "Loan"
msgstr "Emprunt"
#: messages-i18n.c:291
#: messages-i18n.c:293
msgid "LTCG"
msgstr "PVLT"
#: messages-i18n.c:293
#: messages-i18n.c:295
msgid "New"
msgstr "Nouveau"
#: messages-i18n.c:294
#: messages-i18n.c:296
msgid "No"
msgstr "Non"
#: messages-i18n.c:295
#: messages-i18n.c:297
msgid "(none)"
msgstr "(aucun)"
#: messages-i18n.c:297
#: messages-i18n.c:299
msgid "Num"
msgstr "Num"
#: messages-i18n.c:298
#: messages-i18n.c:300
msgid "Ok"
msgstr "Ok"
#: messages-i18n.c:299
#: messages-i18n.c:301
msgid "Online"
msgstr "En ligne"
#: messages-i18n.c:300
#: messages-i18n.c:302
msgid "Open"
msgstr "Ouvrir"
#: messages-i18n.c:301
#: messages-i18n.c:303
msgid "Parameters"
msgstr "Paramètres"
#: messages-i18n.c:302
#: messages-i18n.c:304
msgid "Payment"
msgstr "Paiement"
#: messages-i18n.c:303
#: messages-i18n.c:305
msgid "Portfolio"
msgstr "Portefeuille"
#: messages-i18n.c:304
#: messages-i18n.c:306
msgid "POS"
msgstr "DAB"
#: messages-i18n.c:305
#: messages-i18n.c:307
msgid "Preferences"
msgstr "Préferences"
#: messages-i18n.c:306
#: messages-i18n.c:308
msgid "Price"
msgstr "Cours"
#: messages-i18n.c:307
#: messages-i18n.c:309
msgid "Print"
msgstr "Imprimer"
#: messages-i18n.c:308
#: messages-i18n.c:310
msgid "Profits"
msgstr "Profits"
#: messages-i18n.c:309
#: messages-i18n.c:311
msgid "Quit"
msgstr "Quitter"
#: messages-i18n.c:310
#: messages-i18n.c:312
msgid "Rebate"
msgstr "Rabais"
#: messages-i18n.c:311
#: messages-i18n.c:313
msgid "Receive"
msgstr "Reçu"
#: messages-i18n.c:312
#: messages-i18n.c:314
msgid "Reconcile"
msgstr "Rapprocher"
#: messages-i18n.c:313
#: messages-i18n.c:315
msgid "Record"
msgstr "Enregistrer"
#: messages-i18n.c:315
#: messages-i18n.c:317
msgid "Report"
msgstr "Rapport"
#: messages-i18n.c:316
#: messages-i18n.c:318
msgid "Reports"
msgstr "Rapports"
#: messages-i18n.c:317
#: messages-i18n.c:319
msgid "Save"
msgstr "Sauvegarder"
#: messages-i18n.c:318
#: messages-i18n.c:320
msgid "Savings"
msgstr "Epargne"
#: messages-i18n.c:319
#: messages-i18n.c:321
msgid "Scrub"
msgstr "Nettoyer"
#: messages-i18n.c:321
#: messages-i18n.c:323
msgid "Sell"
msgstr "Vendre"
#: messages-i18n.c:322
#: messages-i18n.c:324
msgid "Settings"
msgstr "Paramètres"
#: messages-i18n.c:323
#: messages-i18n.c:325
msgid "Simple"
msgstr "Simple"
#: messages-i18n.c:324
#: messages-i18n.c:326
msgid "Sold"
msgstr "Vendu"
#: messages-i18n.c:325
#: messages-i18n.c:327
msgid "Spend"
msgstr "Dépenser"
#: messages-i18n.c:326
#: messages-i18n.c:328
msgid "Split"
msgstr "Répartition"
#: messages-i18n.c:327
#: messages-i18n.c:329
msgid "STCG"
msgstr "PVCT"
#: messages-i18n.c:329
#: messages-i18n.c:331
msgid "Style"
msgstr "Style"
#: messages-i18n.c:330
#: messages-i18n.c:332
msgid "Surplus"
msgstr "Excédent"
#: messages-i18n.c:331
#: messages-i18n.c:333
msgid "Teller"
msgstr "Caissier"
#: messages-i18n.c:333
#: messages-i18n.c:335
msgid "Today"
msgstr "Aujourd'hui"
#: messages-i18n.c:334
#: messages-i18n.c:336
msgid "Total"
msgstr "Total"
#: messages-i18n.c:336
#: messages-i18n.c:338
msgid "Transaction"
msgstr "Transaction"
#: messages-i18n.c:337
#: messages-i18n.c:339
msgid "Transfer"
msgstr "Transférer"
#: messages-i18n.c:338
#: messages-i18n.c:340
msgid "Value"
msgstr "Montant"
#: messages-i18n.c:339
#: messages-i18n.c:341
msgid "WARNING"
msgstr "ATTENTION"
#: messages-i18n.c:340
#: messages-i18n.c:342
msgid "Wire"
msgstr "Télétransmission"
#: messages-i18n.c:341
#: messages-i18n.c:343
msgid "Withdraw"
msgstr "Se retirer"
#: messages-i18n.c:342
#: messages-i18n.c:344
msgid "Yes"
msgstr "Oui"

2253
po/gnucash.pot Normal file

File diff suppressed because it is too large Load Diff

View File

@ -46,4 +46,5 @@ rm -rf $RPM_BUILD_ROOT
/usr/share/gnome/apps/Applications/gnucash.desktop
/usr/share/locale/de/LC_MESSAGES/gnucash.mo
/usr/share/locale/fr/LC_MESSAGES/gnucash.mo
/usr/share/locale/en_GB/LC_MESSAGES/gnucash.mo
%doc /usr/doc/gnucash

View File

@ -193,6 +193,8 @@ gnc_get_source_name(gint source)
return NONE_STR;
case SOURCE_YAHOO :
return "Yahoo";
case SOURCE_YAHOO_EUROPE :
return "Yahoo Europe";
case SOURCE_FIDELITY :
return "Fidelity";
case SOURCE_TROWEPRICE :
@ -215,6 +217,8 @@ gnc_get_source_code_name(gint source)
return NULL;
case SOURCE_YAHOO :
return "YAHOO";
case SOURCE_YAHOO_EUROPE :
return "YAHOO_EUROPE";
case SOURCE_FIDELITY :
return "FIDELITY";
case SOURCE_TROWEPRICE :

View File

@ -60,6 +60,7 @@ enum
{
SOURCE_NONE = 0,
SOURCE_YAHOO,
SOURCE_YAHOO_EUROPE,
SOURCE_FIDELITY,
SOURCE_TROWEPRICE,
SOURCE_VANGUARD,

View File

@ -773,6 +773,14 @@ gnc_register_create_tool_bar(RegWindow *regData)
0, 0, NULL
},
GNOMEUIINFO_SEPARATOR,
{
GNOME_APP_UI_ITEM,
DUPLICATE_STR, TOOLTIP_DUP_TRANS,
duplicateCB, NULL, NULL,
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_COPY,
0, 0, NULL
},
GNOMEUIINFO_SEPARATOR,
{
GNOME_APP_UI_ITEM,
BLANK_STR, TOOLTIP_BLANK_TRANS,

View File

@ -2,6 +2,7 @@
#
# Copyright (C) 1998, Dj Padzensky <djpadz@padz.net>
# Copyright (C) 1998, 1999 Linas Vepstas <linas@linas.org>
# Copyright (C) 2000 Yannick LE NY <y-le-ny@ifrance.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -27,18 +28,21 @@ require 5.000;
require Exporter;
use strict;
use vars qw($VERSION @EXPORT @ISA $YAHOO_URL $FIDELITY_GANDI_URL
$FIDELITY_GROWTH_URL $FIDELITY_CORPBOND_URL $FIDELITY_GLBND_URL
$FIDELITY_MM_URL $FIDELITY_ASSET_URL $TROWEPRICE_URL
use vars qw($VERSION @EXPORT @ISA $TIMEOUT
$YAHOO_URL $YAHOO_EUROPE_URL
$FIDELITY_GANDI_URL $FIDELITY_GROWTH_URL $FIDELITY_CORPBOND_URL
$FIDELITY_GLBND_URL $FIDELITY_MM_URL $FIDELITY_ASSET_URL
$TROWEPRICE_URL
$VANGUARD_QUERY_URL $VANGUARD_CSV_URL @vanguard_ids);
use LWP::UserAgent;
use HTTP::Request::Common;
$VERSION = '0.08';
$VERSION = '0.13';
@ISA = qw(Exporter);
$YAHOO_URL = ("http://quote.yahoo.com/d?f=snl1d1t1c1p2va2bapomwerr1dyj1&s=");
$YAHOO_EUROPE_URL = ("http://finance.fr.yahoo.com/d/quotes.csv?f=snl1d1t1c1p2va2bapomwerr1dyj1&s=");
$FIDELITY_GANDI_URL = ("http://personal441.fidelity.com/gen/prices/gandi.csv");
$FIDELITY_GROWTH_URL = ("http://personal441.fidelity.com/gen/prices/growth.csv");
$FIDELITY_CORPBOND_URL = ("http://personal441.fidelity.com/gen/prices/corpbond.csv");
@ -52,42 +56,109 @@ $VANGUARD_CSV_URL = ("http://www.vanguard.com/cgi-bin/Custom?ACTION=Download&Fil
# Don't export; let user invoke with Quote::getquote syntax.
# @EXPORT = qw(&yahoo, &fidelity);
undef $TIMEOUT;
# =======================================================================
# Grabbed from the Perl Cookbook. Parsing csv isn't as simple as you thought!
sub parse_csv
{
my $text = shift; # record containing comma-separated values
my @new = ();
push(@new, $+) while $text =~ m{
# the first part groups the phrase inside the quotes.
# see explanation of this pattern in MRE
"([^\"\\]*(?:\\.[^\"\\]*)*)",?
| ([^,]+),?
| ,
}gx;
push(@new, undef) if substr($text, -1,1) eq ',';
return @new; # list of values that were comma-separated
}
# =======================================================================
# yahoo gets quotes from the Yahoo service
# which is primarily the new york stock exchange.
sub yahoo {
sub yahoo
{
my @symbols = @_;
my($x,@q,%aa,$ua,$url,$sym);
$x = $";
$" = "+";
$url = $YAHOO_URL."@symbols";
$" = $x;
$ua = LWP::UserAgent->new;
foreach (split('\n',$ua->request(GET $url)->content)) {
@q = grep { s/^"?(.*?)\s*"?\s*$/$1/; } split(',');
$sym = $q[0];
$aa {$sym, "exchange"} = "NYSE"; # new york stock exchange
$aa {$sym, "name"} = $q[1];
$aa {$sym, "last"} = $q[2];
$aa {$sym, "date"} = $q[3];
$aa {$sym, "time"} = $q[4];
$aa {$sym, "volume"} = $q[7];
$aa {$sym, "bid"} = $q[9];
$aa {$sym, "ask"} = $q[10];
$aa {$sym, "close"} = $q[11];
$aa {$sym, "open"} = $q[12];
$aa {$sym, "eps"} = $q[15];
$aa {$sym, "pe"} = $q[16];
$aa {$sym, "cap"} = $q[20];
$ua->timeout($TIMEOUT) if defined $TIMEOUT;
$ua->env_proxy();
foreach (split('\015?\012',$ua->request(GET $url)->content))
{
@q = parse_csv($_);
$sym = $q[0];
$aa {$sym, "exchange"} = "NYSE"; # new york stock exchange
$aa {$sym, "name"} = $q[1];
$aa {$sym, "last"} = $q[2];
$aa {$sym, "date"} = $q[3];
$aa {$sym, "time"} = $q[4];
$aa {$sym, "volume"} = $q[7];
$aa {$sym, "bid"} = $q[9];
$aa {$sym, "ask"} = $q[10];
$aa {$sym, "close"} = $q[11];
$aa {$sym, "open"} = $q[12];
$aa {$sym, "eps"} = $q[15];
$aa {$sym, "pe"} = $q[16];
$aa {$sym, "cap"} = $q[20];
}
# return wantarray() ? @qr : \@qr;
return %aa;
}
# =======================================================================
# the fideility routine gets quotes from fidelity investments
# yahoo_europe gets quotes for European markets from Yahoo.
sub yahoo_europe
{
my @symbols = @_;
my($x,@q,%aa,$ua,$url,$sym);
$x = $";
$" = "+";
$url = $YAHOO_EUROPE_URL."@symbols";
$" = $x;
$ua = LWP::UserAgent->new;
$ua->timeout($TIMEOUT) if defined $TIMEOUT;
$ua->env_proxy();
foreach (split('\015?\012',$ua->request(GET $url)->content))
{
@q = parse_csv($_);
$sym = $q[0];
# $aa {$sym, "exchange"} = "NYSE";
$aa {$sym, "name"} = $q[1];
$aa {$sym, "last"} = $q[2];
$aa {$sym, "date"} = $q[3];
$aa {$sym, "time"} = $q[4];
$aa {$sym, "volume"} = $q[7];
$aa {$sym, "bid"} = $q[9];
$aa {$sym, "ask"} = $q[10];
$aa {$sym, "close"} = $q[11];
$aa {$sym, "open"} = $q[12];
$aa {$sym, "eps"} = $q[15];
$aa {$sym, "pe"} = $q[16];
$aa {$sym, "cap"} = $q[20];
}
# return wantarray() ? @qr : \@qr;
return %aa;
}
# =======================================================================
# the fidelity routine gets quotes from fidelity investments
#
sub fidelity {
sub fidelity
{
my @symbols = @_;
my(%aa,%cc,$sym, $k);
@ -169,21 +240,27 @@ sub fidelity {
}
}
}
return %aa;
}
# =======================================================================
sub fidelity_nav {
sub fidelity_nav
{
my(@q,%aa,$ua,$url,$sym, $dayte);
my %days = ('Monday','Mon','Tuesday','Tue','Wednesday','Wed',
'Thursday','Thu','Friday','Fri','Saturday','Sat','Sunday','Sun');
'Thursday','Thu','Friday','Fri','Saturday','Sat',
'Sunday','Sun');
# for Fidelity, we get them all.
$url = $_[0];
$ua = LWP::UserAgent->new;
foreach (split('\n',$ua->request(GET $url)->content)) {
@q = grep { s/^"?(.*?)\s*"?\s*$/$1/; } split(',');
$ua->timeout($TIMEOUT) if defined $TIMEOUT;
$ua->env_proxy();
foreach (split('\015?\012',$ua->request(GET $url)->content))
{
@q = parse_csv($_);
# extract the date which is usually on the second line fo the file.
if (! defined ($dayte)) {
@ -204,21 +281,27 @@ sub fidelity_nav {
$aa {$sym, "date"} = $dayte;
}
}
return %aa;
}
# =======================================================================
sub fidelity_mm {
sub fidelity_mm
{
my(@q,%aa,$ua,$url,$sym, $dayte);
my %days = ('Monday','Mon','Tuesday','Tue','Wednesday','Wed',
'Thursday','Thu','Friday','Fri','Saturday','Sat','Sunday','Sun');
'Thursday','Thu','Friday','Fri','Saturday','Sat',
'Sunday','Sun');
# for Fidelity, we get them all.
$url = $_[0];
$ua = LWP::UserAgent->new;
foreach (split('\n',$ua->request(GET $url)->content)) {
@q = grep { s/^"?(.*?)\s*"?\s*$/$1/; } split(',');
$ua->timeout($TIMEOUT) if defined $TIMEOUT;
$ua->env_proxy();
foreach (split('\015?\012',$ua->request(GET $url)->content))
{
@q = parse_csv($_);
# extract the date which is usually on the second line fo the file.
if (! defined ($dayte)) {
@ -237,19 +320,24 @@ sub fidelity_mm {
$aa {$sym, "date"} = $dayte;
}
}
return %aa;
}
# =======================================================================
sub troweprice {
sub troweprice
{
my(@q,%aa,$ua,$url,$sym);
# for T Rowe Price, we get them all.
$url = $TROWEPRICE_URL;
$ua = LWP::UserAgent->new;
foreach (split('\n',$ua->request(GET $url)->content)) {
@q = grep { s/^"?(.*?)\s*"?\s*$/$1/; } split(',');
$ua->timeout($TIMEOUT) if defined $TIMEOUT;
$ua->env_proxy();
foreach (split('\015?\012',$ua->request(GET $url)->content))
{
@q = parse_csv($_);
# extract the date which is usually on the second line fo the file.
($sym = $q[0]) =~ s/^ +//;
@ -261,16 +349,17 @@ sub troweprice {
$aa {$sym, "date"} = $q[2];
}
}
return %aa;
}
# =======================================================================
sub vanguard {
# The Vanguard Group doesn't use thier ticker symbols to look up funds.
# but we do use the ticker symbols. Therefore, we need to do a reverse lookup.
# Load the array on first use only
sub vanguard
{
# The Vanguard Group doesn't use their ticker symbols to look up funds.
# but we do use the ticker symbols. Therefore, we need to do a reverse
# lookup. Load the array on first use only
if (! @vanguard_ids ) {
push (@vanguard_ids, ("0002", "Bal Index ", "VBINX"));
push (@vanguard_ids, ("0006", "Value Idx ", "VIVAX"));
@ -395,11 +484,13 @@ sub vanguard {
# ask for a special report with these symbols in them
$url .="COLS=COL1%2C3&COLS=COL4&COLS=COL5&COLS=COL11%2C12&ACTION=Accept";
$ua = LWP::UserAgent->new;
$ua->timeout($TIMEOUT) if defined $TIMEOUT;
$ua->env_proxy();
$reply = $ua->request(GET $url)->content;
# now build the second url which will actually contain the data
undef $url;
foreach (split('\n',$reply)) {
foreach (split('\015?\012',$reply)) {
if (/FileName=V(.*)\.txt/) {
$url = $VANGUARD_CSV_URL . "V" . $1 . ".txt";
last;
@ -409,7 +500,7 @@ sub vanguard {
$reply = $ua->request(GET $url)->content;
# parse the data, stick it into the array the user will get
foreach (split('\n',$reply)) {
foreach (split('\015?\012',$reply)) {
@q = split (/,/);
($sym = $q[0]) =~ s/\W//g;
$aa {$sym, "exchange"} = "Vanguard"; # Vanguard
@ -432,15 +523,16 @@ sub vanguard {
$aa {$sym, "name"} = $fid;
}
}
return %aa;
}
# =======================================================================
__END__
1;
__END__
=head1 NAME
Finance::Quote - Get stock and mutual fund quotes from various exchanges
@ -448,19 +540,21 @@ Finance::Quote - Get stock and mutual fund quotes from various exchanges
=head1 SYNOPSIS
use Finance::Quote;
%quotes = Quote::yahoo @symbols; # Get NYSE quotes from Yahoo
%quotes = Quote::fidelity @symbols; # Get quotes from Fidelity Investments
%quotes = Quote::troweprice @symbols; # Get quotes from T. Rowe Price
%quotes = Quote::vanguard @symbols; # Get quotes from the Vanguard Group
$Finance::Quote::TIMEOUT = 60;
%quotes = Quote::yahoo @symbols; # Get NYSE quotes from Yahoo
%quotes = Quote::yahoo_europe @symbols;# Get Europe quotes from Yahoo France
%quotes = Quote::fidelity @symbols; # Get quotes from Fidelity Investments
%quotes = Quote::troweprice @symbols; # Get quotes from T. Rowe Price
%quotes = Quote::vanguard @symbols; # Get quotes from the Vanguard Group
print ("the last price was ", $quotes {"IBM", "last"} );
=head1 DESCRIPTION
This module gets stock quotes from various internet sources, including
Yahoo! Finance and Fidelity Investments. The
B<quote_yahoo> function will return a quote for each of the stock symbols
passed to it. The return value of each of the routines is an associative
array, which may include one or more of the following elements:
This module gets stock quotes from various internet sources, including
Yahoo! Finance and Fidelity Investments. The B<quote_yahoo> function
will return a quote for each of the stock symbols passed to it. The
return value of each of the routines is an associative array, which
may include one or more of the following elements:
name Company or Mutual Fund Name
last Last Price
@ -485,10 +579,37 @@ array, which may include one or more of the following elements:
nav Net Asset Value
yeild Yeild (usually 30 day avg)
You may optionally override the default LWP timeout of 180 seconds by setting
$Finance::Quote::TIMEOUT to your preferred value.
=head1 FAQ
If there's one question I get asked over and over again, it's how did
I figure out the format string? Having typed the answer in
innumerable emails, I figure sticking it directly into the man page
might help save my fingers a bit...
If you have a My Yahoo! (http://my.yahoo.com) account, go to the
following URL:
http://edit.my.yahoo.com/config/edit_pfview?.vk=v1
Viewing the source of this page, you'll come across the section that
defines the menus that let you select which elements go into a
particular view. The <option> values are the strings that pick up
the information described in the menu item. For example, Symbol
refers to the string "s" and name refers to the string "l". Using
"sl" as the format string, we would get the symbol followed by the
name of the security.
If you have questions regarding this, play around with $QURL, changing
the value of the f parameter.
=head1 COPYRIGHT
Copyright 1998, Dj Padzensky
Copyright 1998, 1999 Linas Vepstas
Copyright 2000, Yannick LE NY (update for Yahoo Europe and YahooQuote)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -496,7 +617,7 @@ the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
The information that you obtain with this library may be copyrighted
by Yahoo! Inc., and is governed by their usage license. See
by Yahoo! Inc., and is governed by their usage license. See
http://www.yahoo.com/docs/info/gen_disclaimer.html for more
information.
@ -504,6 +625,7 @@ information.
Dj Padzensky (C<djpadz@padz.net>), PadzNet, Inc.
Linas Vepstas (C<linas@linas.org>)
Yannick LE NY (C<y-le-ny@ifrance.com>)
The Finance::YahooQuote home page can be found at
http://www.padz.net/~djpadz/YahooQuote/

View File

@ -12,7 +12,7 @@
# Copyright (c) 1999-2000 Linas Vepstas
# hack alert -- this pathname should *NOT* be hard-coded.
use lib '/usr/lib/gnucash/';
use lib '/usr/lib/gnucash';
use Quote;
use gnucash;
@ -23,23 +23,26 @@ use gnucash;
sub account_flatlist
{
local ($grp) = $_[0];
local ($naccts) = gnucash::xaccGroupGetNumAccounts ($grp);
local ($n);
local (@acctlist, @childlist);
local ($children);
my $grp = $_[0];
my $naccts = gnucash::xaccGroupGetNumAccounts ($grp);
my $n;
my (@acctlist, @childlist);
my $children;
foreach $n (0..$naccts-1) {
$acct = gnucash::xaccGroupGetAccount ($grp, $n);
push (@acctlist, $acct);
$children = gnucash::xaccAccountGetChildren ($acct);
if ($children) {
@childlist = &account_flatlist ($children);
push (@acctlist, @childlist);
}
}
foreach $n (0..$naccts-1)
{
$acct = gnucash::xaccGroupGetAccount ($grp, $n);
push (@acctlist, $acct);
return (@acctlist);
$children = gnucash::xaccAccountGetChildren ($acct);
if ($children)
{
@childlist = &account_flatlist ($children);
push (@acctlist, @childlist);
}
}
return (@acctlist);
}
# --------------------------------------------------
@ -49,29 +52,32 @@ sub account_flatlist
sub checkprice
{
local ($acct) = $_[0];
local ($dayte) = $_[1];
local ($query, $datesecs, $earliest, $latest);
local ($splitlist, $i, $split, $action);
my $acct = $_[0];
my $dayte = $_[1];
my ($query, $datesecs, $earliest, $latest);
my ($splitlist, $i, $split, $action);
$datesecs = gnucash::xaccScanDateS ($dayte);
$earliest = $datesecs - 16*3600; # subtract 16 hours
$latest = $datesecs + 16*3600; # add 16 hours
$query = gnucash::xaccMallocQuery();
gnucash::xaccQueryAddAccount ($query, $acct);
gnucash::xaccQuerySetDateRange ($query, $earliest, $latest);
$splitlist = gnucash::xaccQueryGetSplits ($query);
$datesecs = gnucash::xaccScanDateS ($dayte);
$earliest = $datesecs - 16*3600; # subtract 16 hours
$latest = $datesecs + 16*3600; # add 16 hours
$query = gnucash::xaccMallocQuery();
gnucash::xaccQueryAddAccount ($query, $acct);
gnucash::xaccQuerySetDateRange ($query, $earliest, $latest);
$splitlist = gnucash::xaccQueryGetSplits ($query);
$i=0;
$split = gnucash::IthSplit ($splitlist, $i);
while ($split) {
$action = gnucash::xaccSplitGetAction ($split);
if ($action eq "Price") { return 1; }
$i++;
$split = gnucash::IthSplit ($splitlist, $i);
}
gnucash::xaccFreeQuery ($query);
0;
$i = 0;
$split = gnucash::IthSplit ($splitlist, $i);
while ($split)
{
$action = gnucash::xaccSplitGetAction ($split);
if ($action eq "Price") { return 1; }
$i++;
$split = gnucash::IthSplit ($splitlist, $i);
}
gnucash::xaccFreeQuery ($query);
return 0;
}
# --------------------------------------------------
@ -81,25 +87,26 @@ sub checkprice
sub setprice
{
local ($acct) = $_[0];
local ($dayte) = $_[1];
local ($price) = $_[2];
local ($trans, $split);
my $acct = $_[0];
my $dayte = $_[1];
my $price = $_[2];
my ($trans, $split);
$trans = gnucash::xaccMallocTransaction();
gnucash::xaccTransBeginEdit ($trans, 1);
gnucash::xaccTransSetDescription ($trans, "Price");
gnucash::xaccTransSetDateStr ($trans,$dayte);
$trans = gnucash::xaccMallocTransaction();
gnucash::xaccTransBeginEdit ($trans, 1);
gnucash::xaccTransSetDescription ($trans, "Price");
gnucash::xaccTransSetDateStr ($trans,$dayte);
$split = gnucash::xaccTransGetSplit ($trans, 0);
gnucash::xaccSplitSetSharePriceAndAmount ($split, $price, 0.0);
gnucash::xaccSplitSetAction ($split, "Price");
gnucash::xaccTransCommitEdit ($trans);
$split = gnucash::xaccTransGetSplit ($trans, 0);
gnucash::xaccSplitSetSharePriceAndAmount ($split, $price, 0.0);
gnucash::xaccSplitSetAction ($split, "Price");
gnucash::xaccTransCommitEdit ($trans);
gnucash::xaccAccountBeginEdit ($acct, 1);
gnucash::xaccAccountInsertSplit ($acct, $split);
gnucash::xaccAccountCommitEdit ($acct);
1;
gnucash::xaccAccountBeginEdit ($acct, 1);
gnucash::xaccAccountInsertSplit ($acct, $split);
gnucash::xaccAccountCommitEdit ($acct);
return 1;
}
# --------------------------------------------------
@ -107,7 +114,7 @@ sub setprice
die "Usage: $0 <gnucash-filename>" if $#ARGV < 0;
# open the file, read all of the accounts
print "Info: Opening file $ARGV[0]\n";
print "Opening file $ARGV[0]\n";
$sess = gnucash::xaccMallocSession ();
$grp = gnucash::xaccSessionBeginFile ($sess,$ARGV[0]);
@ -117,58 +124,78 @@ die "failed to read file $ARGV[0], maybe its locked? " if (! $grp);
@acctlist = &account_flatlist ($grp);
# loop over the accounts, look for stock and mutual funds.
ACCTLOOP:
foreach $acct (@acctlist) {
$name = gnucash::xaccAccountGetName ($acct);
print "Info: Found account $name\n";
$type = gnucash::xaccAccountGetType ($acct);
foreach $acct (@acctlist)
{
$name = gnucash::xaccAccountGetName ($acct);
$type = gnucash::xaccAccountGetType ($acct);
if (($type == $gnucash::STOCK) ||
($type == $gnucash::MUTUAL))
if (($type == $gnucash::STOCK) ||
($type == $gnucash::MUTUAL))
{
print "$name: ";
$security = gnucash::xaccAccountGetSecurity ($acct);
$accinfo = gnucash::xaccAccountGetAccInfo ($acct);
$invacct = gnucash::xaccCastToInvAcct ($accinfo);
if ($invacct)
{
$security = gnucash::xaccAccountGetSecurity ($acct);
$accinfo = gnucash::xaccAccountGetAccInfo ($acct);
$invacct = gnucash::xaccCastToInvAcct ($accinfo);
if ($invacct) {
$quotesrc = gnucash::xaccInvAcctGetPriceSrc ($invacct);
print "Info: will use $quotesrc for $name price quotes\n";
undef $price; # undef to make sure later if($price) not broken
QUOTE: {
if ("YAHOO" eq $quotesrc) {
%quotes = &Quote::yahoo ($security);
$price = $quotes {$security, "last"};
last QUOTE;
}
if ("FIDELITY" eq $quotesrc) {
%quotes = &Quote::fidelity ($security);
$price = $quotes {$security, "nav"};
last QUOTE;
}
if ("TRPRICE" eq $quotesrc) {
%quotes = &Quote::troweprice ($security);
$price = $quotes {$security, "nav"};
last QUOTE;
}
if ("VANGUARD" eq $quotesrc) {
%quotes = &Quote::vanguard ($security);
$price = $quotes {$security, "nav"};
last QUOTE;
}
next ACCTLOOP; # no quote available, go to next account
}
$dayte = $quotes {$security, "date"};
$prodname = $quotes {$security, "name"};
if ($price) {
print "Info: $security $prodname last price = $price at $dayte\n";
# This || construction will store the price if its not already
# stored (in the 28 hour period surrounding "dayte")
&checkprice ($acct, $dayte) || &setprice ($acct, $dayte, $price);
}
print "\n";
$quotesrc = gnucash::xaccInvAcctGetPriceSrc ($invacct);
unless ($quotesrc)
{
print "no quote source found\n";
next;
}
}
undef $price; # undef to make sure later if($price) not broken
if ("YAHOO" eq $quotesrc)
{
%quotes = &Quote::yahoo ($security);
$price = $quotes {$security, "last"};
}
elsif ("YAHOO_EUROPE" eq $quotesrc)
{
%quotes = &Quote::yahoo_europe ($security);
$price = $quotes {$security, "last"};
}
elsif ("FIDELITY" eq $quotesrc)
{
%quotes = &Quote::fidelity ($security);
$price = $quotes {$security, "nav"};
}
elsif ("TRPRICE" eq $quotesrc)
{
%quotes = &Quote::troweprice ($security);
$price = $quotes {$security, "nav"};
}
elsif ("VANGUARD" eq $quotesrc)
{
%quotes = &Quote::vanguard ($security);
$price = $quotes {$security, "nav"};
}
else
{
print "unknown quote source: $quotesrc\n";
next;
}
print "using $quotesrc\n";
print "$name: ";
$dayte = $quotes {$security, "date"};
$prodname = $quotes {$security, "name"};
if ($price)
{
print "$security $prodname last price = $price at $dayte\n";
# This || construction will store the price if its not already
# stored (in the 28 hour period surrounding "dayte")
&checkprice ($acct, $dayte) || &setprice ($acct, $dayte, $price);
}
}
}
}
gnucash::xaccSessionSave ($sess);
gnucash::xaccSessionEnd ($sess);

View File

@ -2546,6 +2546,7 @@ gnucash_register_key_press_cb(GtkWidget *widget, GdkEventKey *event,
switch (event->keyval) {
case GDK_Return:
case GDK_KP_Enter:
gtk_signal_emit_by_name(GTK_OBJECT(reg),
"activate_cursor");
return TRUE;

View File

@ -239,6 +239,9 @@ configAction (SplitRegister *reg)
xaccAddComboCellMenuItem ( reg->actionCell, ONLINE_STR);
xaccAddComboCellMenuItem ( reg->actionCell, ACH_STR);
xaccAddComboCellMenuItem ( reg->actionCell, WIRE_STR);
xaccAddComboCellMenuItem ( reg->actionCell, CREDIT_STR);
xaccAddComboCellMenuItem ( reg->actionCell, DIRECTDEBIT_STR);
xaccAddComboCellMenuItem ( reg->actionCell, TRANSFER_STR);
break;
case CASH_REGISTER:
xaccAddComboCellMenuItem ( reg->actionCell, BUY_STR);