Gnucash/AqBanking Packaging
John Ralls
jralls at ceridwen.us
Fri Sep 21 16:41:06 EDT 2012
On Sep 21, 2012, at 10:32 AM, David T. <sunfish62 at yahoo.com> wrote:
> John,
>
> If I were to volunteer for this, I think the result would not be an improvement, unfortunately.
>
> I certainly agree that adding this functionality directly into the Gnucash sphere increases the maintenance load, and I also know that I am ill-equipped to code anything much beyond a simple Applescript. However, we are currently in a situation where the tool we have selected to provide this functionality requires a lot of user work to set up, and can break quite quickly, due to the formatting of ever-changing remote sites.
>
> I took a quick look at the spec for the price DB (http://svn.gnucash.org/docs/HEAD/group__Price.html), and see that it has just six defined data elements: commodity, currency, value, time, source, and type. Source and type appear to be optional.
>
> In my brain, it seems like it should be possible to set up a mechanism
> that allows Mere Users to create and update a text profile for a given
> online price source. Said profile would define basic source info, and
> then the start/end strings that delineate the data elements we need.
> Under such a situation, it would be possible for users to repair their
> quote retrieval themselves (by changing the text file), and share these changes more generally through the
> mailing lists.
>
> I have taken some time to look at the Perl for F::Q (http://search.cpan.org/~ecocode/Finance-Quote-1.17/lib/Finance/Quote.pm), and have been reminded how much I am not a Perl programmer, as I marvel at the mystery of the code there. My ability with Perl is so limited that I am only able to say that I honestly don't know whether my hypothetical method is how F::Q already does it.
David,
OK, you can have your leg back now. ;-)
Well, we call F::Q a screen scraper, but few if any of the routines actually parse the html. Instead, most of them have a quote-download interface that uses a query URI and returns a CSV list. That makes for easier programming (see the bottom of the message for the string that one would have to parse to extract today's quote for TRGIX from TIAA-CREF, assuming one could figure out how to get to the page in the first place: Navigation is by javascript, not URI).
TIAA-CREF changed the base URI, the API, and the fund designation (now a number instead of the symbol), so the query routine had to be pretty thoroughly changed to handle the new website.
I suppose it would be possible to write a single data-driven query program that covered all of the input sources, but I'm not sure that that would enable "Mere Users" to easily work out the required data and exchange revisions.
Regards,
John Ralls
<thead><tr><td class="first"><h4>Daily NAV</h4></td><td class="MOD_sepCell contain"><div class="MOD_floatL MOD_Separator"> </div></td><td class="B"><h4>Day's Change</h4></td><td class="MOD_sepCell contain"><div class="MOD_floatL MOD_Separator"> </div></td><td class="C"><h4>Total Assets</h4></td><td class="MOD_sepCell contain"><div class="MOD_floatL MOD_Separator"> </div></td><td class="expns-ratio D"><div class="cellLiner"><h4>Gross / Net Expense Ratio</h4></div></td><td class="MOD_sepCell contain"><div class="MOD_floatL MOD_Separator"> </div></td><td class="mstar E"><div class="cellLiner"><h4>Overall Morningstar Rating</h4><span class="MOD_flyoutContainer"><span class="MOD_Sprite MOD_BlueInfoIcon MOD_trigger"> </span><div class="MOD_flyout MOD_hidden MOD_reverse Type4"><span><strong>The Overall Morningstar Rating is based on risk-adjusted return, and is a weighted average of the applicable 3-, 5-, and 10-year Ratings.</strong></span><div class="MOD_shadow"><div class="shadowClose"></div></div><span class="MOD_Sprite MOD_BlueRightChevron chevron"> </span></div></span></div></td><td class="MOD_sepCell contain"><div class="MOD_floatL MOD_Separator"> </div></td><td class="G"><h4>52 Week Range</h4></td></tr></thead><tbody><tr><td class="first">$10.92</td><td class="MOD_sepCell contain"><div class="MOD_floatL MOD_Separator"> </div></td><td class="chg-smry-delta st-Neg"><div class='chg-text value st-Neg change_negative MOD_negative negative'><div class='change_dir chg-symbol MOD_gst-Neg change_negative MOD_negative negative'></div><span class='changeAmount change_negative MOD_negative negative'>0.01</span> <span class='changePct change_negative MOD_negative negative'>(0.09%)</span></div></td><td class="MOD_sepCell contain"><div class="MOD_floatL MOD_Separator"> </div></td><td class="ttl-assets">$2.85B</td><td class="MOD_sepCell contain"><div class="MOD_floatL MOD_Separator"> </div></td><td class="expns-ratio">0.72% / 0.72%</td><td class="MOD_sepCell contain"><div class="MOD_floatL MOD_Separator"> </div></td><td class="mstar"><div class="cellLiner"><div class="morningstarRating"><h5>OVERALL</h5><span class="msRating"><span class="MOD_Sprite MOD_MorningstarActive"></span><span class="MOD_Sprite MOD_MorningstarActive"></span><span class="MOD_Sprite MOD_MorningstarActive"></span><span class="MOD_Sprite MOD_MorningstarActive"></span><span class="MOD_Sprite MOD_MorningstarInactive"></span></span><div class="outOfMorningstarFunds faintText">OUT OF 1,528 FUNDS</div></div></div></td><td class="MOD_sepCell contain"><div class="MOD_floatL MOD_Separator"> </div></td><td class="rangeDat">$8.15 - $10.93</td></tr></tbody><tfoot><tr><td class="first ht" colspan="4">As of close <span class='timestamp monthYear'>09/20/2012</span></td><td colspan="4">As of <span class='timestamp monthYear'>08/31/2012</span></td><td class="ht"><div class="cellLiner"><div class="MOD_cellOverflow">As of <span class='timestamp monthYear'>08/31/2012</span><br>Based on risk adjusted returns</div></div></td><td> </td><td><div class="quoteRangeBar contain"><div class="rngBarUpper contain rngBarBig"><div class="rangeStart rangeTxt"><span class='timestamp monthYear'>10/03/2011</span></div><div class="rangeGuts contain"><div class="MOD_rangeBar"> </div><div class="rngBarLower contain"><div class="MOD_rngBarSpacer MOD_rbrContent" style="width:87.0856115107914%;"> </div><div class="MOD_rngBarCursor MOD_rbrContent"> </div></div></div><div class="rangeEnd rangeTxt"><span class='timestamp monthYear'>09/14/2012</span></div></div></div></td></tr>
More information about the gnucash-user
mailing list