This weekend I was in Brno at Red Hat Developer Conference, attending Fedora's KDE SIG meeting. Besides helping these super-awesome folks getting KDE Telepathy into Fedora, I had this idea of storing the download URL of a file that you have downloaded, so you can check where you downloaded the file from. KDE Workspace already provides all that is needed to make this work. Yes, of course it's Nepomuk :)
So I pinged Vishesh Handa about this idea and we got down writing the missing bits. The idea was to simply monitor the browser downloads and add the download url to Nepomuk once the download is completed. I had no prior experience with browser plugins/extensions, but initial research showed that the best way would be to write a NPAPI plugin, which is supposed to run in all browsers, that would mean one code to maintain. However that proved rather difficult (please let me know if you have experience with this and if you think it would be better way to write) so I went the way of less resistance and I wrote Firefox extension, which is based on Plasma-notify extension. While in the process, I made the Plasma-notify work with latest Firefox too ;) Edit: This is apparently not needed anymore, in "about:config", you can set "browser.download.manager.showAlertOnComplete" to true. Thank 'theghost' for the tip.
Anyway I finished the extension while Vishesh wrote the Nepomuk part in the meantime. We decided to do this in two parts, so that the Nepomuk utility can be reused by anyone/anything else. The extension just calls the binary utility, which takes file and URL as parameters and adds the URL as ndo:copiedFrom into Nepomuk. You can then view the download URL in Dolphin's sidebar.
Without any more prolongs - here is Firemuk -- http://dl.dropbox.com/u/6761102/firemuk.xpi
Keep in mind it's version 0.1 ;) There seems to be problems with regular downloads sometime, I have no idea why. At least not yet. I plan to publish it on addons.mozilla.org once it's more tested. And for you Chrome/Chromium users - yes, I will write the extension for you too. Just hold on :) And as for Konq/Rekonq - it should be super-easy to implement this in these browsers (if the devs could contact me or Vishesh, we'd be more than happy to help). I can see this also working in KGet. KGet already does exactly this. Awesome.
Go ahead and test it and let me know how does it work for you :)
This already works with KGet. With KGet integration in Konqueror, this should work for most of your files (for some reason, Konqueror insists on saving some files itself): http://i.imgur.com/OGb7I.png
Posted by: Softwareandunicycles.wordpress.com | Sunday, 19 February 2012 at 21:21
It's nice to see Nepomuk finally picking up. I can see many use cases for this so I must say: thank you.
Posted by: Teho Openid | Sunday, 19 February 2012 at 21:23
Hey man! Thanks for joining us, it was really awesome event and awesome job you have done :) Long live FIREMUK (Christoph!!!).
Posted by: Jaroslav Reznik | Monday, 20 February 2012 at 09:57
>And for you Chrome/Chromium users - yes, I will write the extension for you too. Just hold on :) And as for Konq/Rekonq - it should be super-easy to implement this in these browsers
Hey, what about Opera users? They want it too! :)
Posted by: TZ | Monday, 20 February 2012 at 11:01
@Jaroslav Reznik - glad I could be there!! Good times.
@TZ - unfortunately I have never ever used Opera and at this time I don't know. I might try looking into it, but no promises. By this I'd like to encourage any Opera extension devs reading this. Just grab the Firefox extension (it's a zip archive), check its code and port it to Opera, should be fairly similar..hopefully :))
Posted by: Marty | Monday, 20 February 2012 at 13:21
Nice work.
Even though PlasmaNotify is not necessary anymore for Firefox. You can easily activate Download Notifications in "about:config" by settting: "browser.download.manager.showAlertOnComplete" to true
Should work since Firefox 5 ;)
Posted by: theghost | Monday, 20 February 2012 at 13:22
@theghost - thanks for the info! I'm not a firefox user myself, I just started with Firefox because I got to talk first to Firefox folks about it :)
Posted by: Marty | Monday, 20 February 2012 at 13:24
Nice! This is great to have in all browsers.
FYI, openSUSE has a Firefox extension that improves the integration with Firefox in KDE (e.g. you get a plasma popup, and KDE save dialog). Perhaps you can share/collaborate this feature, or make the firefox extension generic for all distributions. :)
Anyways, thanks a lot for taking care of these nifty details!
Posted by: Vdboor | Monday, 20 February 2012 at 17:10
@Vdboor - thanks for telling me, I might drop them an email. I'd believe they are better extension coders than I am :P
Unfortunately I found out that Chrome/Chromium does not provide API to access download stuff, so...no extension for these browser for the time being :(
Posted by: Marty | Monday, 20 February 2012 at 22:33
Brilliant. Just a heads-up: We actually already have a method in Nepomuk::Utils which does the download event creation for you: Nepomuk::Utils::createCopyEvent [1]
Obviously using storeResources the way Vishesh did is a bit more fancy and modern than the old-school approach taken there...
[1] http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk/html/namespaceNepomuk_1_1Utils.html#a8786cf980fcb3139bbedcdf0f8cf6e6f
Posted by: Trueg.wordpress.com | Tuesday, 21 February 2012 at 20:22
What would be kind of cool, if the information about the download location could trigger actions.
E.g. if I download my bank statements they should be always automatically given a certain tag(s) and the download location should be set to a certain folder.
That would be not only cool, but really useful.
Posted by: mark-wege | Sunday, 26 February 2012 at 10:28
i downloaded firefox addon and checked in my windows7 machine , but it is not working, there is no url saved with the files metadata ,is this for only mac ? :(
Posted by: Robin Jena | Tuesday, 12 March 2013 at 18:06
Linux/KDE only, sorry ;)
Posted by: Marty | Tuesday, 12 March 2013 at 18:11
thanx for the quick reply , is there any way to implement such kind of nice addon to windows ?
Posted by: Robin Jena | Tuesday, 12 March 2013 at 18:20
No idea about Windows. Use KDE! ;)
Posted by: Marty | Tuesday, 12 March 2013 at 18:44