Summary: | Add support for downloading online prices based on a date range | ||
---|---|---|---|
Product: | [Frameworks and Libraries] alkimia | Reporter: | Ralf Habacker <ralf.habacker> |
Component: | General | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 8.1.0 | ||
Target Milestone: | 8.2 | ||
Platform: | Other | ||
OS: | All | ||
Latest Commit: | https://invent.kde.org/office/alkimia/-/commit/84d49ff66156143ac2485d2ff3eb324ba3fc319a | Version Fixed In: | 8.1.72 |
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 416523 |
Description
Ralf Habacker
2021-07-02 15:01:10 UTC
(In reply to Ralf Habacker from comment #0) To support this format and additional property the current checkbox for "stripping HTML" should be converted to a "data format" combo box with supported values "HTML" and "Raw text" to which the new csv format can be added. (In reply to Ralf Habacker from comment #0) > In kmymoney this is done by connecting the WebPriceQuote::csvquote() signal > to a method, then calling the WebPriceQuote::setDate(from, to) [1] method, > followed by a call to WebPriceQuote::launch(...) which triggers the > mentioned signal. The signal returns the queried online prices in an > instance of a class known only to kmymoney. Another method would have to be > used here. > > Currently there is the following signal defined: > > void quote(const QString&, const QString&, const QDate&, const double&) > > To cover multiple values an additional signal should be added providing a > map of online prices > > void quote(const QString&, const QString&, QMap<QDateTime, double>); > > The type QDateTime was chosen to support also dates with times. [2] It turns out that such a signal is a basic requirement for retrieving rate data in csv format, which is handled by bug 474061. Adding a date range is then limited to patching the url template and filtering the retrieved values. Git commit 4715c3fa7749e41945b5d17d151e99bec516d648 by Ralf Habacker. Committed on 28/09/2023 at 15:05. Pushed by habacker into branch 'master'. Add parsing of online offers in csv format For this purpose, the "date" and "price" attributes of the online quote source are used to specify column names from which the information to be extracted is read, and the "date format" attribute is used to extract the date. It is assumed that the first line of the downloaded csv file contains the names of the columns. The column separator used is determined automatically, currently supported are [,; \t]. The extracted values are collected in a QMap and sent to the caller via the signal AlkOnlineQuote::quotes(...). Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de> M +91 -1 src/alkonlinequote.cpp M +5 -1 src/alkonlinequote.h M +4 -0 src/alkonlinequotesource.cpp M +2 -1 src/alkonlinequotesource.h M +16 -0 src/alkonlinequoteswidget.cpp https://invent.kde.org/office/alkimia/-/commit/4715c3fa7749e41945b5d17d151e99bec516d648 Git commit 84d49ff66156143ac2485d2ff3eb324ba3fc319a by Ralf Habacker. Committed on 22/12/2023 at 14:50. Pushed by habacker into branch 'master'. Add support for downloading online prices based on a date range This support has been added to the download of online prices in CSV format, as only there are several days available. FIXED-IN:8.1.72 M +12 -0 src/alkonlinequote.cpp M +7 -0 src/alkonlinequote.h https://invent.kde.org/office/alkimia/-/commit/84d49ff66156143ac2485d2ff3eb324ba3fc319a |