Update gnc-commodity.cpp for finance-quote 1.63 #2033
+37
−18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A few weeks ago @bpschuck asked for help with updating
Gnucash
for recent version offinance-quote
. I hope this work a reasonable starting point.I run the following code in [
finance-quote-wrapper](https://github.com/Gnucash/gnucash/blob/05aadd0/libgnucash/quotes/finance-quote-wrapper.in#L114)
to get multiple quote sources (i.e. more than one module):Which yielded the following methods:
Then got single quote sources list using the script above, but used
@$v == 1
. Cross checked withfinance-quote/Modules-README.yml
, and tried to apply the following rules, while updating the list of modules ingnc-commodity.cpp
:While I think this work is probably a reasonable first cut, I think the following comments and questions should be at least reviewed by someone with more experience in this subject:
FinanceAPI
instead ofyahoo_json
in multiple quote sources descriptions.intiamutual
looks like a multiple quote source, but has only one source, leave as is?australia
,dutch
indiamutual
,france
, andromania
.india
,hungary
,greece
, andpoland
.aufund
be added to multiple quote sources?troweprice
has been in multiple quote sources, but it has only one module. Not sure why. Removed from multiple quote sources. Also removedtroweprice_direct
in favour oftroweprice
in the single quote sources. Added as alternative in manual.tratedate
andxetra
as they seem to use more specific URL thansinvestor
does.tsx
be renamed totmx
for Toronto Stock eXchange? The list originally hadtsx
(left it as is). Alternatively change the name to Toronto Stock eXchange (TMX), CA to highlight what TMX is.bats
- omitted in favour ofgoogleweb
. Or shall I add it, as say BATS Global Markets, US with a link in manual pointing to https://cboe.com (per Wikipedia)tradeville
- omitted in favour ofbvb
.mstaruk
- omitted, in favour ofmorningstaruk
that has already been in the list. Added as alternative in manual.hu
module, that is failing ATM, that is:bamosz
,bet
,hufund
,hustock
, andhu
. Moved section to deprecated in manual.morningstarau
- omitted, module is failing ATM.oslobors
- omitted, module is failing ATM.cse
- added, module is actually working (marked as failing inModules-README.yml
, will send a separate PR to address this).comdirect
- strictly speaking it is failing in 1.63, but fixed recently - included.There's a complimentary Gnucash/gnucash-docs#345 to update relevant tables in gnucash-docs manual.
Since the change itself doesn't affect any logic (merely updates list contents) I believe a verification I performed with
ninja check
indebian:stable
container should be sufficient.