Summary: | Plugin for accessing transaction bills | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Ralf Habacker <ralf.habacker> |
Component: | importer | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | REPORTED --- | ||
Severity: | wishlist | CC: | mahueb55 |
Priority: | NOR | ||
Version: | 4.8.2 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=378937 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ralf Habacker
2018-09-26 08:19:11 UTC
The basic procedure for fetching email attachments from an IMAP server is shown in the php script of https://stackoverflow.com/questions/44801931/how-can-i-download-all-files-attachments-in-php In the KDE context this would be possible via the IMAP kioslave plugin, which can be called e.g. in the KDE4 environment with kioclient. 1. retrieve a list of emails containing '231549460-0002' in the subject line kioclient ls 'imaps://<username>@<host>/INBOX/;?SUBJECT%20231549460-0002' INBOX 45870 45871 2. downloading the e-mail concerned kioclient cat 'imaps://<username>@<host>/INBOX/;UID=45870' The imap kioslave plugin is currently not available for KF5 (see https://phabricator.kde.org/T9758) I am not sure if using a (personal) IMAP account as the source is a good idea. This will only work in single user environments. Bug 378937 contains a wishlist item to store arbitrary files and attach them to a transaction/split. Since the source is not only e-mail but could also be a website that allows downloading the invoice, I suggest to create a mechanism that allows to store the invoice files in a defined location (probably per KMyMoney file). The default for such location could be the one returned by QStandardPaths::writableLocation(AppLocalDataLocation). Anyway, it should be user configurable and supporting network drives. Attaching any file to a transaction would make a copy of that file and store it in the above mentioned location. (In reply to Thomas Baumgart from comment #2) > [...] Bug 378937 contains a > wishlist item to store arbitrary files and attach them to a > transaction/split. [...] fyi: I've been working on that and have a ~80% solution built for that (although that's currently only storing references to existing files and doesn't create copies - changing that shouldn't be that big of a deal though). Will have to find some time in the next couple of days to clean this up, rebase and submit a review request. Just thought it's worth mentioning before someone else picks this up. |