Hey,<br><br><div class="gmail_quote">On Sat, Sep 8, 2012 at 12:28 PM, Bogdan Bivolaru <span dir="ltr"><<a href="mailto:bogdan.bivolaru@gmail.com" target="_blank">bogdan.bivolaru@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hello,<div>I'm looking for a way to integrate my browsers (Firefox, Chormium and sometimes Rekonq) and my torrent client (Ktorrent) with Nepomuk.</div><div>I want to link a file downloaded to the site I got it from and if it is a movie or a song I would like to extract author information from the website. It is likely that the site contains in the download page some information about the performers in the downloaded movie/song and I would like to save that information to the file.</div>




<div> </div><div>I have thought of two solutions to this problem:</div><div> 1) in Firefox, make a native plugin using NPAPI (<a href="https://developer.mozilla.org/en-US/docs/Gecko_Plugin_API_Reference" target="_blank">https://developer.mozilla.org/en-US/docs/Gecko_Plugin_API_Reference</a>); I suppose other browsers also have such a native code API.</div>




<div>This is hard to do because someone has to write and maintain the plugin code for every browser in use.</div></blockquote><div><br></div><div>I was looking at this few months ago with Vishesh (unfortunately we missed the one by Sebastian), writing a NPAPI plugin is imho too much effort, so I went with standard extension[1]. Also Chrome has this new PAPI and they are going to(?) ditch the NPAPI, in turn Firefox is not going to support PAPI. Anyways, Chrome/Chromium missed the proper downloads API for extensions, so it was not possible to implement it in the same way as the firefox one.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div> 2) An easier task would be to make a http server that listens on localhost and receives and answers JSON documents.</div>




<div>I would then be able to write extensions in HTML which query and add new properties to resources. Most/all of the HTML/JS code for the extensions would run without changes on all browsers.</div></blockquote><div><br>

</div><div>Basically what we did was the extension calling a simple binary file that writes into Nepomuk, which is imho way easier than implementing/keeping running a http server. See [1].</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><br></div><div>UPDATE: </div>


<div> 3) From what I remember reading in an article about a year ago, Zeitgeist is to be integrated with Nepomuk and zeitgeist-datasources are to provide such functionality. What is the status of the integration of Zeitgeist in KDE?</div>




<div>Zeitgeist data providers (<a href="http://bazaar.launchpad.net/~zeitgeist-dataproviders/zeitgeist-datasources/git/files" target="_blank">http://bazaar.launchpad.net/~zeitgeist-dataproviders/zeitgeist-datasources/git/files</a>) support a lot of applications!</div>




<div>/UPDATE</div></blockquote><div><br></div><div>The main problem here is the Chrome/Chromium API, which didn't provide any info on downloaded files, so there you'd have to go with the PAPI plugin I guess. There was also a way to write Qt NPAPI plugins, but I haven't looked much into that.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>This second solution seems pretty easy, but I have some questions:</div><div> 4) has anyone else started such a project?</div>

<div>I have googled "Nepomuk JSON" on the net and I came out with a GWT application (<a href="https://bitbucket.org/pombredanne/webannotator/" target="_blank">https://bitbucket.org/pombredanne/webannotator/</a>), an Eclipse application (<a href="http://dev.nepomuk.semanticdesktop.org/wiki/EclipseDevelopment" target="_blank">http://dev.nepomuk.semanticdesktop.org/wiki/EclipseDevelopment</a>) and a server called <span style="color:rgb(51,51,51);font-size:12px;font-family:Verdana,Lucida,Geneva,Helvetica,Arial,sans-serif">SWIM. I have also found a dead link to the home page of a Mandriva software. So in my opinion, the existing http server software is unmantained, undocumented and/or does not do what I need.</span></div>




<div><span style="color:rgb(51,51,51);font-size:12px;font-family:Verdana,Lucida,Geneva,Helvetica,Arial,sans-serif"><br></span></div><div> 5) putting on a network a server which knows about most of the files in my user's home directory might pose a security risk, doesn't it?</div>

</blockquote><div><br></div><div>Sort of, but if it would be a write-only server, then probably a low-level one (I'm no security expert). </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div> 6) Do you have more up to date documentation? Do you have any advice?</div><div><br></div><div> 7) Querying the Nepomuk database also queries the Zeitgeist DB?</div></blockquote><div><br></div><div>AFAIK Zeitgeist pushes all data to Nepomuk and Nepomuk does not query Zeitgeist back, but I'm not sure about the current state, so might be wrong.</div>

<div><br></div><div>[1] - <a href="http://martys.typepad.com/blog/2012/02/so-you-want-to-keep-the-url-of-downloaded-file-eh.html">http://martys.typepad.com/blog/2012/02/so-you-want-to-keep-the-url-of-downloaded-file-eh.html</a></div>

<div><br></div></div>-- <br><div><span style="color:rgb(102,102,102)">Martin Klapetek | KDE Developer</span></div><br>