tag:blogger.com,1999:blog-304272492024-03-23T11:10:39.580-07:00kemistry desktop environmentEgon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.comBlogger31125tag:blogger.com,1999:blog-30427249.post-33881957345465512732008-11-14T23:52:00.000-08:002008-11-15T13:17:43.896-08:00Help! Unsolved problems with maximized Kubuntu Intrepid windowsAfter quite happily having upgraded to <a href="https://wiki.kubuntu.org/KubuntuIntrepidVersion">Intrepid</a> on two machines (a laptop and a desktop), I started upgrading a second laptop. By now, I had <a href="http://ubuntuforums.org/showthread.php?p=6058308">apt-p2p</a> installed on my first laptop, and <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=481243">with the help of Cameron hacked apt-p2p</a> to allow my laptop use the apt-p2p installation of my already migrated laptop. The download went rather smoothly. Anyway, that's not important to my problem.<br /><br />The problem I encountered with my second laptop, after fixing the ATI-driver problem (I had to replace to old ATI drivers with the new opensource driver package to get X11 working again), was that all windows automatically maximized:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs-7ivn-xboXeowqj86lPpw62lljpj1sP0uGokxmIMXJa4TH7_6G-3OLklDnw4lNrTLN8Wi2F5D7u0vGD3z1bFClVDueLyH8Pzt6PZm_qUFPB1_WPv-Ui87xQZqKM2-uJRwtJxxg/s1600-h/maxKwinBug.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs-7ivn-xboXeowqj86lPpw62lljpj1sP0uGokxmIMXJa4TH7_6G-3OLklDnw4lNrTLN8Wi2F5D7u0vGD3z1bFClVDueLyH8Pzt6PZm_qUFPB1_WPv-Ui87xQZqKM2-uJRwtJxxg/s400/maxKwinBug.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5268794186662339906" /></a> When I minimize the window, it does, but does not have any decoration:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicxO0uxkHwFVOc1aa82n3xNvTKHB3LW77WvnJbBY27n4L1zEIip5fIIOnqKRRsv9TC9bJf-rsqr9WMNjpeSshmuBbhQwGIXGPIBvOWLfz1KOu62FvYC10Ev49AnKdhi0ltZ-tvnw/s1600-h/maxKwinBug2.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicxO0uxkHwFVOc1aa82n3xNvTKHB3LW77WvnJbBY27n4L1zEIip5fIIOnqKRRsv9TC9bJf-rsqr9WMNjpeSshmuBbhQwGIXGPIBvOWLfz1KOu62FvYC10Ev49AnKdhi0ltZ-tvnw/s400/maxKwinBug2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5268794785953477858" /></a> There is little to find with Google, except for <a href="http://ubuntuforums.org/archive/index.php/t-940041.html">this closed thread on ubuntuforums</a>. I followed hints.<br /><br />I removed my <i>.kde</i> folder, made sure I was using kwin, checked window size settings (but it even maximizes dialogs!), and <a href="http://www.kdedevelopers.org/blog/57">Riddel</a> was kind enough to make some suggestions, which unfortunately did not help either. Worse, I rebooted my already migrated laptop, and now I have the problem on both laptops :(<br /><br />So, at least the problem is not hardware related. Also, the most recent updated laptop showed the problem with both KDE 4.1.2 and 4.1.3, so that does not seem to be the problem either. A reboot triggered the problem of my first migrated laptop, which was last booted 4 days ago. So, it seems to have to do with a package I installed upon the upgrade of the second machine, and which I installed in the last 4 days... does aptitude keep a log by now?<br /><br />The problem is rather annoying, and makes the desktop quite unusable... I don't want to reinstall Intrepid from scratch... I <a href="https://bugs.launchpad.net/ubuntu/+source/kdebase-workspace/+bug/298307">filed a bug report</a> with some extra details. so, if you have any suggestion, any, I am likely going to try it. Any suggestion on how to debug the problem is also most welcome...<br /><br /><b>Update:</b> problem could be fixed with: <i>aptitude remove devilspie</i>. Thanx to all who replied!Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com11tag:blogger.com,1999:blog-30427249.post-38275875860248511262008-06-07T23:24:00.000-07:002008-06-07T23:35:23.665-07:00Fish: my next generation sh?Casper <a href="http://www.screenage.de/blog/2008/06/05/my-package-of-the-day-fish-the-friendly-interactive-shell/">introduced</a> me to <a href="http://www.fishshell.org/">fish</a> in a nice write up of functionality. Nice tip! I have been using BASH for a long time now, before which I used csh, IIRC. Oi, that was on the old Solaris days. Anyway, default settings are quite nice, but one thing I don't like so much is the abbreviated <i>pwd</i> in the prompt. At least, not for the full prompt. It would suite me best of the last two or three directories were not abbreviated, but could not find an option for that.<br /><br />Workaround is to simply define a new prompt in <i>~/.config/fish/config.fish</i>, where I changed it default prompt to use <i>pwd</i> instead of <i>prompt_pwd</i>.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMhX-pHQIqaKIi4ksejaiDeIL5lQJp6URbmNJcgMM7fvktbfrECGuY3ncletqhSL9XF3ln5NwOb4riIJJKupU8M_EGFOiVRPZmlfQPvuJa87t4NOCKOGPTeCzNhxUOKZzeCROn9A/s1600-h/fishPrompt1.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMhX-pHQIqaKIi4ksejaiDeIL5lQJp6URbmNJcgMM7fvktbfrECGuY3ncletqhSL9XF3ln5NwOb4riIJJKupU8M_EGFOiVRPZmlfQPvuJa87t4NOCKOGPTeCzNhxUOKZzeCROn9A/s400/fishPrompt1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5209395397451874354" /></a>Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com5tag:blogger.com,1999:blog-30427249.post-33504359964086122142008-05-12T02:19:00.000-07:002008-05-12T02:43:35.471-07:00Tagging email with Nepomuk?<a href="http://www.kdedevelopers.org/blog/2904">Trueg</a> is the <a href="http://nepomuk.kde.org/">KDE-Nepomuk</a> dude, and has been running a few cool blogs, for example about <a href="http://www.kdedevelopers.org/node/3443">Nepomuk Virtual Folders - The Next Level</a>, <a href="http://www.kdedevelopers.org/node/3426">We Don't Search...</a> and <a href="http://www.kdedevelopers.org/node/3274">Fetch, Nepomuk, fetch!</a><br /><br />Tagging is the future. Overcoming typos in tags, synonyms is a conflicting feature, but does not limit the wide applicability of being able to tie information together. Now, Nepomuk is a bit strict on the type of metadata allowed, which is why <a href="http://strigi.sf.net/">Strigi</a> has a super ontology (as in super set), to which we can add chemistry bits.<br /><br />I have yet to install KDE 4.1, assuming that a good deal of truegs work found its way into that. At least, the virtual folders bit, I hope. But just imagine tying together PDFs, PDB entries, etc, I have on my desktop, all belonging to a diabetes, by just typing this URL: <i>nepomuksearch:/diabetes</i>.<br /><br />On a different note, this tagging if available in <a href="http://kontact.kde.org/kmail/">Kmail</a> would provide a powerful approach to organize the processing of my inbox; I can tag emails with <i>todo</i>, <i>toreply</i>, <i>toread</i>, <i>toarchive</i>, ...<br /><br />Oh, and let me squeeze in this statement too (sorry, <a href="http://www.kdedevelopers.org/blog/57">jriddel</a>) : <a href="http://www.kubuntu.org/">Kubuntu</a> 8.04 has required me to tweak to work around bugs than any other previous Kubuntu release. Things tend to be encountered by others earlier, so that Googling generally helps sufficiently. But missing dependencies is a bit ugly (sorry, forgot which program it was, so can't link to the bug report). And, still am a happy Kubuntu user!Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com2tag:blogger.com,1999:blog-30427249.post-37555237252712995562008-02-02T00:49:00.000-08:002008-02-02T01:07:13.854-08:00Synchroning KDE settings; Plasma updatesFirst of all, thanx to all who gave replied to my previous blog item <a href="http://kemistry-desktop.blogspot.com/2008/01/kde-400-no-yukuake-for-kubuntu.html">KDE 4.0.0: no Yukuake for Kubuntu?"</a>! I got my desktop machine run KDE4 now, <i>with</i> Yakuake and <i>with</i> being able to lock the screen.<br /><br />Now, regarding the taskbar; I haven't placed it on top of my screen, as I could not find those coordinates adz21c was talking about. That's really a minor thing. Now, the Plasma taskbar has seen many improvements over the last days, like the two row taskbar, and the <a href="http://vizzzion.org/?blogentry=806">ability to make is somewhat smaller</a>.<br /><br />Riddel wrote a tool <a href="http://www.kdedevelopers.org/node/3244">to synchronize KDE settings between machines</a>. It's actually amazing that in the era where KDE is able to have a central architecture for 'personal information' (<a href="http://conference2006.kde.org/conference/talks/9.php">Akonadi</a>), and we have technologies like bzr, svn, that we still have to hack workarounds to synchronize our desktop environments. Of course, I already have the data of my desktop synchronized via repositories, but things as far from automatically done...<br /><br />The tool made by Riddel is such a workaround, a really promising one (looking forward to the Kubuntu package! BTW, does it support both KDE3 and KDE4?), but it is surprising that it is not the default yet.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com3tag:blogger.com,1999:blog-30427249.post-46235488121034807952008-01-19T05:44:00.000-08:002008-01-19T06:25:46.667-08:00KDE 4.0.0: no Yukuake for Kubuntu?Last week I installed the <a href="http://kubuntu.org/announcements/kde-4.0.php">Kubuntu gutsy packages</a> for <a href="http://www.kde.org/announcements/4.0/">KDE 4.0.0</a>, and was delighted about the result (see the <a href="http://www.kde.org/announcements/4.0/guide.php">visual guide</a>). Surely, I have some things I got so much used too, which do not seem 4.0.0 material:<ul><li>taskbar at the top of the desktop</li><li>option to resize the taskbar</li><li>searching files with I <a href="http://liquidat.wordpress.com/2007/06/19/screencast-dolphins-nepomuk-integration/">tagged/rated with Dolphin/Nepomuk</a></li><li>Strigi still does not have PDF support (and I'm not that fluent in C++)</li></ul>And, there are many things which showed up in blogs over the past year, which do not have made it into 4.0.0:<ul><li>strigi search in Alt-F2 or in the KDE menu (mentioned <a href="http://rackit.gartnerwebdev.com/2008/01/11/kde-40-the-grand-unified-desktop/">here</a>)</li><li>cool plasma widgets (e.g. <a href="http://nookie.kbfx.org/?p=5">this calendar</a>, or <a href="http://www.kde.org/announcements/4.0/desktop.php">the RSS feed widget in one of the screenshots here</a>); the set in the Kubuntu debs seems limited</li></ul>On the other hand, maybe I just forgot to install some packages, though I installed the extragear-plasma.<br /><br /><b>Yakuake</b><br />Though I very much like the new Konsole, I got so used to <a href="http://www.kde-apps.org/content/show.php?content=29153">Yakuake</a>, this will keep me running a KDE3 for just now. KDE4 capable packages are reported (version 2.9b1) but I failed to compiled these on Kubuntu Gutsy:<pre>cd /tmp<br />cp ~/Desktop/yakuake-2.9-beta1.tar.bz2 .<br />tar xvjf yakuake-2.9-beta1.tar.bz2<br />cd yakuake-2.9-beta1/<br />cd build/<br />sudo aptitude install build-essential cmake kdebase-workspace-dev<br />cmake -DCMAKE_INSTALL_PREFIX=/usr/lib/kde4 ..<br /></pre>After which I am stuck with this error message, I have no idea of how to solve in gutsy:<pre>CMake Error: Qt compiled without support for -fvisibility=hidden. This will break<br />plugins and linking of some applications. Please fix your Qt installation.<br />-- Configuring done<br /></pre><br />Anyway, congratulation to the KDE developers, and looking forward to <a href="http://liquidat.wordpress.com/2008/01/18/kde-41-release-team-aims-at-july-2008/">the upcoming dotdot releases and KDE4.1 this summer</a>! If not just for the planned <a href="http://strigi.sourceforge.net/?q=strigi_metting_summary">better Strigi/Nepomuk/KDE integration</a>.<br /><br /><b>P.S.</b>: I just discovered the <a href="http://www.kde-look.org/index.php?xcontentmode=70">plasmoid section on kde-look.org</a>, which I'm going to browse right now.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com8tag:blogger.com,1999:blog-30427249.post-30798700128549933382007-11-16T00:51:00.000-08:002007-11-16T01:03:59.716-08:00Friend-of-a-Friend (FOAF) support in StrigiLast week I have been hacking on a <a href="http://strigi.sourceforge.net/">Strigi</a> plugin for <a href="http://www.foaf-project.org/">FOAF</a> files. Now, one will not expect FOAF files on ones desktop soon... unless, you start indexing your <a href="http://www.konqueror.org/">Konqueror</a> history. I have not seen that feature yet, but not overly difficult to implement for a skilled Konqueror developer (just use the dbus interface for Strigi).<br /><br />However, HTML files may have this line in the <head> element:<pre><link href='http://blueobelisk.sourceforge.net/people/egonw/foaf.xrdf'<br />rel='meta' title='FOAF' type='application/rdf+xml'/></pre><br />This could be the trigger for a Strigi plugin, to download this file and provide that as substream for the HTML file. I am aware for security issues at immediately pop up, but that is something we can surely deal with.<br /><br />Using this approach the whole semantic desktop takes shape. Say, I am searching what I have on my desktop on some topic, then, additionally, Strigi will make me aware that I recently read the blog from someone who showed interest in that topic too. Moreover, it will even allow Strigi to tell me which projects on SourceForge are related to this topic.<br /><br />Far fetched? No, it's really just around the corner. If interested, you may find the source code in KDE SVN under <a href="http://websvn.kde.org/trunk/playground/utils/strigi-foaf/">trunk/playground/utils/strigi-foaf</a>. The Konqueror history hack is not implemented yet, as I need to know first what efforts are ongoing in that respect.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-8528549344790940282007-10-13T05:21:00.000-07:002007-10-13T05:25:06.656-07:00Alexandr interviewed on Strigi/Chemistry GSoC project<a href="http://neksa.blogspot.com/">Alexandr</a> gave an <a href="http://behindkde.org/people/soc2007-four/">interview with KDE's Dot</a> on his Google Summer of Code project on <a href="http://neksa.blogspot.com/2007/05/introduction.html">the use of Strigi to search chemical documents on the desktop</a>.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-60834235959209377062007-08-22T04:25:00.001-07:002007-08-22T04:32:36.182-07:00MDL SD files as folders: opening a single molfile<a href="http://neksa.blogspot.com/">Alexandr</a>s Google Summer of Code <a href="http://code.google.com/soc/2007/kde/appinfo.html?csaid=460DE348DCF58C78">project</a> is over, and he is wrapping up his code and blogging about his resource. He just blogged about one of his achieved goals: opening SD file as folders using <a href="http://strigi.sf.net/">Strigi</a>'s jstream technology. It provides tight support of chemistry on the <a href="http://www.kde.org">KDE</a> desktop: browse a SD file as a folder, open a single MDL molfile entry from the SD file with the FileOpen dialog, all in addition to finding a specific molecule by InChI in the SD file. Check the screenshots that Alexandr put online.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-63604529208027638792007-08-09T15:04:00.000-07:002007-08-09T15:54:29.486-07:00Strigi now understands Xesam queries<a href="http://www.flavio.castelli.name/">Flavio</a> wrote about Strigi <a href="http://www.flavio.castelli.name/query_strigi_using_xesam">getting Xesam query support</a>, which is cool and allows me to look up <a href="http://chem-bla-ics.blogspot.com/2007/06/finding-email-with-strigi-in-tar.html">email from me to a friend</a> using this query:<pre><request><br /> <query><br /> <and><br /> <equals><br /> <field name="email.to"/><br /> <string>Christoph</string><br /> </equals><br /> <equals><br /> <field name="email.from"/><br /> <string>Egon</string><br /> </equals><br /> </and><br /> </query><br /></request></pre><br />So that, after having saved the above as query.xml, I can then issue a strigicmd call:<pre>strigicmd xesamquery -t clucene -d index/ -q query.xml</pre><br />Now, with proper nesting and all functional (see the full <a href="http://www.freedesktop.org/wiki/XesamQueryLanguage">query language specification</a>), I can do all sorts of nice queries:<pre><request><br /> <query><br /> <equals><br /> <field name="xml.usesNamespace"/><br /> <string caseSensitive="true">http://www.xml-cml.org/schema</string><br /> </equals><br /> </query><br /></request></pre><br />Possibly embedded in XHTML (or vice versa):<pre><request><br /> <query><br /> <and><br /> <equals><br /> <field name="xml.usesNamespace"/><br /> <string caseSensitive="true">http://www.xml-cml.org/schema</string><br /> </equals><br /> <equals><br /> <field name="xml.usesNamespace"/><br /> <string caseSensitive="true">http://www.w3.org/1999/xhtml</string><br /> </equals><br /> </and><br /> </query><br /></request></pre><br />And, after having installed <a href="http://websvn.kde.org/trunk/playground/utils/strigi-chemical/">strigi-chemical</a> currently developed by <a href="http://neksa.blogspot.com/">Alexandr</a>, the GSoC student on chemistry support for Strigi, chemical queries. For example, to get all molecules with a certain mass range, I can find all files that use a CML namespace:<pre><request><br /> <query><br /> <and><br /> <greaterThan><br /> <field name="chemistry.molecular_weight"/><br /> <float>50</float><br /> </greaterThan><br /> <lessThan><br /> <field name="chemistry.molecular_weight"/><br /> <float>59</float><br /> </lessThan><br /> </and><br /> </query><br /></request></pre><br />Or, give me all chemical files which contains a molecule with 'butane' in the name:<pre><request><br /> <query><br /> <and><br /> <contains><br /> <field name="content.mime_type"/><br /> <string>chemistry</string><br /> </contains><br /> <contains><br /> <field name="chemistry.name"/><br /> <string>butane</string><br /> </contains><br /> </and><br /> </query><br /></request></pre>Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-58430664970647947062007-07-26T07:21:00.000-07:002007-07-26T07:27:00.096-07:00Small script for ignoring files in SubversionSubversion takes a slightly different, and more general approach to ignoring files and directories. Unlike the .cvsignore with CVS, SVN uses its property mechanism. I just wrote a small script to help me add ignores:<pre><br />#!/bin/bash<br /><br />TMPFILE=.newcvsignore<br /><br />rm -f ${TMPFILE}<br /><br /># add whatever already is ignored<br />for i in `svn propget svn:ignore`; do<br /> echo "Adding $i"<br /> echo $i >> ${TMPFILE}<br />done<br /><br /># add new things to ignore<br />for i in $*; do<br /> echo "Adding $i"<br /> echo $i >> ${TMPFILE}<br />done<br /><br />svn propset svn:ignore -F ${TMPFILE} .<br /><br />rm -f ${TMPFILE}<br /></pre><br />There might be an easier trick to do this, but now at least I have this nice one-liner:<pre><br />svnignore somefile<br /></pre>Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com4tag:blogger.com,1999:blog-30427249.post-56280324093260188722007-06-01T23:43:00.000-07:002007-06-01T23:50:25.621-07:00The GSoC has started: towards a chemical desktopThis Thursday the GSoC students started to work, and Alexandr posted <a href="http://neksa.blogspot.com/2007/05/introduction.html">his plans</a> for the <a href="http://kemistry-desktop.blogspot.com/2007/04/chemical-semantic-desktop.html">chemical semantic desktop</a>. Alexandr's work will be based on the Strigi/Nepomuk framework, and Liquidat just wrote a very nice <a href="http://liquidat.wordpress.com/2007/05/31/semantic-desktop-and-kde-4-state-and-plans-of-nepomuk-kde/">status report</a> about it.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-3891239675038278992007-04-27T06:15:00.000-07:002007-04-27T06:34:46.977-07:00GSoC Meeting with AlexandrYesterday I met with <a href="http://neksa.blogspot.com/">Alexandr</a> to discuss things around <a href="http://kemistry-desktop.blogspot.com/2007/04/chemical-semantic-desktop.html">his GSoC project</a>, like time schedule etc. During the mentors meeting to work out the final rankings, one fellow mentor argued that this project is too specialized for KDE. We, therefore, discussed how we can maximize the effect on the rest of the KDE project, and ideas that came up include a dedicated query tool for complex data (such as chemical data). Anyway, this will be discussed in our blogs soon.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJzJhixu416nSFgueGR9t8BYHldJEig6RKxafrsl0-QWvTXrHu4HSlih5wVy1ZXkXtpY113EtyR4fb2TcbZjZHY2QeqF0O0Ax5kEUO8Xcg9hiEj6dtdnyY4UURh5FCyL-QiYTyAQ/s1600-h/DSCI0168.JPG"><img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJzJhixu416nSFgueGR9t8BYHldJEig6RKxafrsl0-QWvTXrHu4HSlih5wVy1ZXkXtpY113EtyR4fb2TcbZjZHY2QeqF0O0Ax5kEUO8Xcg9hiEj6dtdnyY4UURh5FCyL-QiYTyAQ/s320/DSCI0168.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5058100419983407010" /></a><br /><br />Meanwhile, I have registered to the new <a href="http://planet-soc.com/">Planet SoC</a> which was announced on the <a href="http://googlesummerofcode.blogspot.com/">Summer of Code Blog</a>.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-35220685325216529762007-04-14T04:20:00.000-07:002007-04-14T07:01:43.747-07:00GSoC: towards a chemical semantic desktopNow that I am officially a Google Summer of Code mentor for <a href="http://code.google.com/soc/kde/about.html">KDE's participation</a>, it was more than time to get my KDE4 install up to date. Meanwhile, <a href="http://www.kdedevelopers.org/blog/268">Jos</a>' <a href="http://strigi.sourceforge.net/">Strigi</a> toolkit is well integrated already, and <a href="http://pansanel.blogspot.com/">Jerome</a> has updated the <a href="http://www.englishbreakfastnetwork.org/apidocs/apidox-playground/utils-apidocs/kfile-chemical/STRIGI/src/html/index.html">chemical kfile plugins</a> to the new Strigi based architecture.<br /><br />I was talking to Phreedom on IRC about ontologies used by Strigi, and added <a href="http://websvn.kde.org/trunk/kdesupport/strigi/src/streamanalyzer/fieldproperties/strigi_chemistry.fieldproperties?revision=653818&view=markup">one for chemistry</a>. It currently has the fields <i>chemistry.inchi</i>, <i>chemistry.molecular_formula</i>, <i>chemistry.molecular_weight</i>, <i>chemistry.pdbid</i>, and <i>chemistry.xray_resolution</i>, but more are expected to be added. I already updated kfile_chemical to make use of these fields, and updated it for a few fields from the more generic ontologies in Strigi.<br /><br /><b>Extracted metadata</b><br />Strigi currently focusses on metadata only, as do the kfile_chemical plugins: they extract metadata from the file, and do not generally <i>create</i> metadata based on the file (actually, Strigi calculates <a href="http://en.wikipedia.org/wiki/SHA-1">sha1</a> hashes). These are typically fields like molecular formula, title, X-Ray resolution (in case of PDB files), identifiers (e.g. InChI, PDB id), etc. However, there can be a lot more interesting information in those files, which require some more tought. For example, PDB files cite one or more publications, which might be present at ones hard disk too. The idea is here, that Strigi actually links the PDF with the publication and the PDB file. This is where <a href="http://nepomuk-kde.semanticdesktop.org/xwiki/bin/view/Main/">Nepomuk</a> comes in, and where Strigi is currently disabled. Similarly, any general organic chemistry publication will mention many molecules, each of which might have other publications discussing them, or even have 3D coordinates or other properties defined. <br /><br /><b>Created metadata</b><br />Another interesting thing one can do for chemical documents, is calculate metadata: for example, calculate <a href="http://www.iupac.org/inchi/">InChI</a>'s for mol/xyz/hin/... files, using <a href="http://openbabel.sf.net/">OpenBabel</a>. Or <a href="http://en.wikipedia.org/wiki/Lipinski's_Rule_of_Five">Rule-of-Five</a> properties, e.g. using the <a href="http://cdk.sf.net/">CDK</a>. This is where the GSoC project comes in which I am mentoring, and on which <a href="http://neksa.blogspot.com/">Alexandr</a> (a former <a href="http://www.cubic.uni-koeln.de/">CUBIC</a> student) is going to work.<br /><br />Oh, and like most desktop search tools, it can simply work on your HTML cache too, so that all these cool things will work on the webpages you search too. That should trigger some more ideas :) It does for me at least.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com2tag:blogger.com,1999:blog-30427249.post-8787526821321081322007-04-07T03:26:00.000-07:002007-04-07T03:43:45.683-07:00A Chemical KDE desktop: the Google SoCTwo <a href="http://code.google.com/soc/">Google Summer of Code</a> ideas have been <a href="http://techbase.kde.org/Projects/Summer_of_Code/2007/Ideas">written up for the KDE project</a>, and students wrote 10 applications based on those. Today is an important day, as the final ranking will be determined which is send of to Google. See <a href="http://chem-bla-ics.blogspot.com/2007/03/acs-chicago-day-3.html">my bits on this some days ago</a>, and <a href="http://kemistry-desktop.blogspot.com/2007/03/chemical-kde-gsoc-projec-ideas.html">earlier in this blog</a>. Both ideas have a reasonable chance of getting one student accepted, but the final decisions will <a href="http://code.google.com/support/bin/answer.py?answer=60325&topic=10729">not be clear and made public before 11 April</a>.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-69855614970796245972007-03-08T09:51:00.000-08:002007-03-08T10:10:57.898-08:00Chemical KDE GSoC Project IdeasVery likely <a href="http://www.kde.org/">KDE</a> will participate again in the <a href="http://code.google.com/soc/">Google Summer of Code</a>. At this moment two project ideas are written up related to chemistry:<ul><li><a href="http://techbase.kde.org/Projects/Summer_of_Code/2007/Ideas#A_3D_Molecular_Editor">A 3D Molecular Editor</a></li><li><a href="http://techbase.kde.org/Projects/Summer_of_Code/2007/Ideas#Strigi:_chemistry_and_biology_support">Strigi: chemistry and biology support</a></li></ul> The second is my personal favorite, and I have <a href="http://kemistry-desktop.blogspot.com/2006/07/overview-of-earlier-blogs.html">worked on this topic</a> in the past myself. See also <a href="http://cniehaus.livejournal.com/33639.html">Carsten's post on this</a>.<br /><br />The only thing I really miss in the <a href="http://techbase.kde.org/Projects/Summer_of_Code/2007/Ideas">full list of ideas</a>, is the idea of completing a <a href="http://kemistry-desktop.blogspot.com/2007/01/new-konqueror-userscript-plugin.html">Greasemonkey plugin for Konqueror</a>. I could not mentor a project like this, and, therefore, cannot put it up on the idea list :(Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com3tag:blogger.com,1999:blog-30427249.post-63365352497746621382007-02-23T01:03:00.000-08:002007-02-23T01:11:50.016-08:00KDE GUI's for OpenBabel's chemical file conversion<a href="http://pansanel.blogspot.com/">Jerome Pansanel</a> has written <a href="http://pansanel.blogspot.com/2007/02/kopenbabel-new-bricks-towards-chemistry.html">Qt and KDE based GUI's</a> around <a href="http://openbabel.sourceforge.net/">OpenBabel</a>, allowing file conversion of chemical documents. You can download it <a href="">here</a>.<br /><br />Together with the chemical mime type package, and <a href="http://chem-bla-ics.blogspot.com/2006/06/kde-desktop-search-kat-strigi-and.html">chemistry indexing support</a> in strigi, this should make KDE a perfect desktop for handling molecular data. I won't be able to make <a href="http://www.fosdem.org/2007/">FOSDEM</a> once more, but looking forward to the transcripts.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-1168692209193276032007-01-13T03:43:00.000-08:002007-01-13T04:43:29.256-08:00New: a Konqueror userscript pluginMaybe <a href="http://www.kde-apps.org/usermanager/search.php?username=neofreko">neofreko</a> read my blog item about <a href="http://kemistry-desktop.blogspot.com/2007/01/firefox-userscripts-for-chemistry-new.html">userscripts for chemistry</a> about a week ago, but he started working on <a href="http://www.kde-apps.org/content/show.php?content=51482">userscript support in Konqueror</a>. He seems to aim at Greasemonkey compatibility, and writes:<ul><i>Looking at the quality of my code, it's obvious that my C++/Qt/KDE skill is .. questionable :D. Thus, help from others would be definitely warmly accepted :)</i></ul><br />I have not compiled it yet, but comments have been positive, but will do so soon to test the <a href="http://chem-bla-ics.blogspot.com/2006/12/chemistry-in-html-greasemonkey-again.html">chemistry userscripts</a> I wrote. Cheers, neofreko!Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com4tag:blogger.com,1999:blog-30427249.post-1168197176205555542007-01-07T10:49:00.000-08:002007-01-07T11:12:56.730-08:00Firefox userscripts for chemistry, new chemical mime types, OpenBabel builds and EigenI has been some time since I blogged on this channel, as I had little to mention lately. Last two weeks have been interesting, however. With <a href="http://cniehaus.livejournal.com/23010.html">3D molecules in Kalzium</a> (and other things) in mind, <a href="http://eigen.tuxfamily.org/">Eigen</a> was developed, which saw its <a href="http://bjacob.livejournal.com/2410.html">1.0 release this week</a>. Carsten put <a href="http://cniehaus.livejournal.com/30033.html">OpenBabel 2.1 in Novell's RPM build service</a>, bringing important chemoinformatics algorithms to ones desktop. Chemical awareness of our desktop environments is further tightened now that Daniel made a new release of the chemical mime types package, and now also provides a <a href="http://chemical-mime.sourceforge.net/">webpage with known chemical mime types</a>.<br /><br />If you consider <a href="http://getfirefox.com/">Firefox</a> to be part of a desktop, then I hope to have thrown in some interesting developments too. In the last few weeks I worked on <a href="http://chem-bla-ics.blogspot.com/2006/12/including-smiles-cml-and-inchi-in.html">semantic markup of chemical compounds in web pages</a>, and <a href="http://chem-bla-ics.blogspot.com/2006/12/chemistry-in-html-greasemonkey-again.html">corresponding Greasemonkey</a> and <a href="http://chem-bla-ics.blogspot.com/2007/01/chemistry-in-html-javascript-from.html">server side JavaScripts</a> to handle this semantic markup. Both scripts automatically link to Google search and PubChem to increase the chemical integration of your desktop. Now, big questions: is there a Konqueror equivalent for userscripts? At least the server side version works.<br /><br /><div style="font-size: 9pt;"><a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com">Technorati</a> tags: <a title="chemistry" href="http://technorati.com/tag/chemistry" rel="tag">chemistry</a> <a title="KDE" href="http://technorati.com/tag/KDE" rel="tag">KDE</a> <a title="Eigen" href="http://technorati.com/tag/Eigen" rel="tag">Eigen</a> <a title="mathematics" href="http://technorati.com/tag/mathematics" rel="tag">mathematics</a> <a title="chemoinformatics" href="http://technorati.com/tag/chemoinformatics" rel="tag">chemoinformatics</a> <a title="OpenBabel" href="http://technorati.com/tag/OpenBabel" rel="tag">OpenBabel</a> <a title="semantic" href="http://technorati.com/tag/semantic" rel="tag">semantic</a> <a title="web" href="http://technorati.com/tag/web" rel="tag">web</a> <a title="mime" href="http://technorati.com/tag/mime" rel="tag">mime</a> <a title="types" href="http://technorati.com/tag/types" rel="tag">types</a> </div>Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-1164811560713327402006-11-29T06:20:00.000-08:002006-11-29T06:46:09.586-08:00MathML support in Konqueror and Java?<a href="http://wiki.cubic.uni-koeln.de/blog/index.php">Christoph Steinbeck</a> used <a href="http://www1.chapman.edu/~jipsen/mathml/asciimath.html">ASCIIMathML</a> to extend <a href="http://www.w3.org/Talks/Tools/Slidy/">HTML Slidy</a> (see <a href="http://chem-bla-ics.blogspot.com/2006/09/chemoblogs-1.html">previous blog</a>), to <a href="http://wiki.cubic.uni-koeln.de/blog/pivot/entry.php?id=13">embed mathematical equations in his slides</a>. <br /><br />And it works like a charm... in a <a href="http://www.w3.org/Math/">MathML</a> supporting web browser like <a href="http://www.getfirefox.com/">Firefox</a>. The trick that ASCIIMathML uses, is that it converts a LaTeX-like syntax to MathML and let the browser handle that. Actually, the website mentions a true LaTeX syntax to MathML version too.<br /><br /><span style="font-weight:bold;">Konqueror?</span><br /><br />Now, <a href="http://www.konqueror.org/">Konqueror</a> does not support MathML (yet), and, therefore, cannot be used. The Konqueror website does <a href="http://www.google.com/search?hl=en&lr=UTF-8&oe=UTF-8&q=site%3Awww.konqueror.org+MathML">not even mention MathML</a>, though there were <a href="http://lists.kde.org/?t=104767804900005&r=1&w=2">rumours about MathML in KHTML quite some time ago</a>. Alfredo Beaumont implemented <a href="http://dot.kde.org/1157452184/">better MathML support in KFormula</a> during <a href="http://code.google.com/soc/">this summer's Google Summer of Code</a>. Is anyone actually embedding that into KHTML?<br /><br /><span style="font-weight:bold;">JGecko?</span><br /><br /><a href="http://kennke.org/blog/">Roman Kennke</a> is a <a href="http://www.gnu.org/software/classpath/">Classpath</a> developer and is currently doing an excellent job <a href="http://kennke.org/blog/?p=32">extending it with HTML rendering support</a>. Are there opensource Java MathML renderers at all? And what are the chances seeing that embedded in the free Java HTML renderers? That is, can I expect JGecko to support MathML any soon?<br /><br /><div style="font-size: 9pt;"><a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com">Technorati</a> tags: <a title="HTML" href="http://technorati.com/tag/HTML" rel="tag">HTML</a> <a title="Slidy" href="http://technorati.com/tag/Slidy" rel="tag">Slidy</a> <a title="MathML" href="http://technorati.com/tag/MathML" rel="tag">MathML</a> <a title="Firefox" href="http://technorati.com/tag/Firefox" rel="tag">Firefox</a> <a title="Konqueror" href="http://technorati.com/tag/Konqueror" rel="tag">Konqueror</a> <a title="JGecko" href="http://technorati.com/tag/JGecko" rel="tag">JGecko</a> <a title="Classpath" href="http://technorati.com/tag/Classpath" rel="tag">Classpath</a> </div>Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com4tag:blogger.com,1999:blog-30427249.post-1162564667042456072006-11-03T06:20:00.000-08:002006-11-03T06:37:47.056-08:00Searching database from within Konqueror<a href="http://resal.atspace.com/">Resal</a>, who earlier released a <a href="http://kemistry-desktop.blogspot.com/2006/10/kde-interface-for-gromacs.html">KDE based GUI for GROMACS</a>, described <a href="http://www.kde-apps.org/content/show.php?content=48118">a recipe</a> on how biochemical databases can be added to the search bar in Konqueror:<pre><br />Click on the left side of Konq search box, a menu appears. At the bottom of this menu there is an option saying:<br />"Select search engines..." <br />click it and when the search engine dialog appears, select "New" and enter:<br /><br />Search Provider Name: PDB<br />Search URI: http://www.rcsb.org/pdb/search/navbarsearch.do?newSearch=yes&isAuthorSearch=no&radioset=All&inputQuickSearch=\{@}&image.x=10&image.y=6&image=Search<br />URI Shortcut: pdb<br /><br />Press Ok and again click "New" and these :<br />Search Provider Name: Entrez<br />Search URI: http://www.ncbi.nlm.nih.gov/gquery/gquery.fcgi?term=\{@}<br />URI Shortcut: ent<br /><br />Press OK and then check the boxes at the right of PDB and Entrez in the search engine dialog to add them<br />to your Konq current list of search engines.<br /><br />Hope to be useful<br />Reza Salari<br /><br />http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=PubMed&cmd=search&term=1hhb<br /></pre><br />(These above bits are licensed GPL, with copyright by Reza Salari.)<br /><br /><h3>An Alternative: Web Shortcuts</h3><br />An alternative would be to use <a href="http://www.konqueror.org/">Konqueror</a>'s Web Shortcuts technology, to allow you to just type in the URL bar <i>pdb:1CRN</i> for the PDB database, or <i>ent:1CRN</i> for Entrez. To do this, click in Konqueror's menu <i>Settings</i>, and then <i>Configure Konqueror...</i>. Click the 'Web Shortcuts' icon in the left list, and click the <i>New...</i> button that then appears on the right. The shortcut is the 'pdb' or 'ent' used in the earlier crambin example. The URI is exactly the same as those given in Reza's write up.<br /><br /><div style="font-size: 9pt;"><a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com">Technorati</a> tags: <a title="Konqueror" href="http://technorati.com/tag/Konqueror" rel="tag">Konqueror</a> <a title="search" href="http://technorati.com/tag/search" rel="tag">search</a> <a title="engine" href="http://technorati.com/tag/engine" rel="tag">engine</a> <a title="web" href="http://technorati.com/tag/web" rel="tag">web</a> <a title="shortcut" href="http://technorati.com/tag/shortcut" rel="tag">shortcut</a> <a title="PDB" href="http://technorati.com/tag/PDB" rel="tag">PDB</a> <a title="Entrez" href="http://technorati.com/tag/Entrez" rel="tag">Entrez</a> <a title="PubMed" href="http://technorati.com/tag/PubMed" rel="tag">PubMed</a> </div>Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-1162047401657659142006-10-28T07:29:00.000-07:002006-10-28T07:56:41.983-07:00KDE interface for GROMACS<a href="http://www.kde-apps.org/usermanager/search.php?username=resal">S. Reza</a> is writing a KDE interface to <a href="http://www.gromacs.org/">GROMACS</a> [<a title="Wikipedia" href="http://en.wikipedia.org/">wp</a>:<a title="GROMACS" href="http://en.wikipedia.org/wiki/GROMACS" rel="tag">GROMACS</a>], simply called <a href="http://www.kde-apps.org/content/show.php?content=47665">Gromacs GUI</a> (GPL, currently at version 0.2). I have not tried it yet, but <a href="http://www.kde-apps.org/usermanager/search.php?username=resal">comments</a> have been positive.Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-1160169541162689572006-10-06T14:06:00.000-07:002006-10-06T14:20:43.006-07:00Kaffeine Wallpaper was missing the InChIOver at <a href="http://www.kde-look.org/">kde-looks.org</a> <a href="http://www.kde-look.org/usermanager/search.php?username=uveuve">uveuve</a> uploaded <a href="http://www.kde-look.org/content/show.php?content=46504">a nice caffeine wallpaper</a>, which refers to a multimedia player for KDE called <a href="http://kaffeine.sourceforge.net/">Kaffeine</a>. But I just had to add the InChI to it:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/1868/1736/1600/kaffeine_original.jpg"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/1868/1736/320/kaffeine_original.jpg" border="0" alt="" /></a><br />It's in the bottom right corner. You can <a href="http://www.kde-look.org/content/show.php?content=46863">download the wallpaper here</a> (GPL license).<br /><br /><div style="font-size: 9pt;"><a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com">Technorati</a> tags: <a title="KDE" href="http://technorati.com/tag/KDE" rel="tag">KDE</a> <a title="wallpaper" href="http://technorati.com/tag/wallpaper" rel="tag">wallpaper</a> <a title="caffeine" href="http://technorati.com/tag/caffeine" rel="tag">caffeine</a> <a title="InChI=1/C8H10N4O2/c1-10-4-9-6-5(10)7(13)12(3)8(14)11(6)2/h4H,1-3H3" href="http://technorati.com/tag/InChI=1/C8H10N4O2/c1-10-4-9-6-5(10)7(13)12(3)8(14)11(6)2/h4H,1-3H3" rel="tag">InChI=1/C8H10N4O2/c1-10-4-9-6-5(10)7(13)12(3)8(14)11(6)2/h4H,1-3H3</a> </div>Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-1158648332339982552006-09-18T23:39:00.000-07:002006-09-18T23:45:32.350-07:00Chemical MIME types hit DebianDaniel Leidert <a href="http://www.wgdd.de/?p=14">reported</a> that the chemical-mime-data deb package <a href="http://packages.debian.org/unstable/misc/chemical-mime-data">has hit Debian</a>. This package makes the <a href="http://www.ch.ic.ac.uk/chemime/">chemical MIME types</a> known to desktop environments like <a href="http://www.gnome.org/">Gnome</a> and <a href="http://www.kde.org/">KDE</a>. Daniel, cheers!<br /><br /><div style="font-size: 9pt;"><a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com">Technorati</a> tags: <a title="chemistry" href="http://technorati.com/tag/chemistry" rel="tag">chemistry</a> <a title="MIME" href="http://technorati.com/tag/MIME" rel="tag">MIME</a> <a title="Debian" href="http://technorati.com/tag/Debian" rel="tag">Debian</a> <a title="KDE" href="http://technorati.com/tag/KDE" rel="tag">KDE</a> <a title="Gnome" href="http://technorati.com/tag/Gnome" rel="tag">Gnome</a> </div>Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com0tag:blogger.com,1999:blog-30427249.post-1158241021288265962006-09-14T06:11:00.000-07:002006-09-14T06:37:01.330-07:00KDE/Ruby CMake magic?I have commited my <a href="http://websvn.kde.org/trunk/playground/utils/whatsthisabout/">what's this about??</a> keyword cloud thingy to SVN into <a href="http://websvn.kde.org/trunk/playground/utils/whatsthisabout/">trunk/playground/utils/whatsthisabout</a>. today. I am trying to use <a href="http://www.cmake.org/">CMake</a> as a build tool, but ran into a number of problems, one being the lack of a good example. After asking around on #kde-ruby it turned out that there is no known example.<br /><br />OK, no problem. I'm a hacker, right? Jerome Pansanel pointed me to the <a href="http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/">KDE cmake modules</a>. FindRUBY.cmake was there, so that's one step. Something that was missing was a module to detect the <a href="http://rubyforge.org/projects/korundum">Korundum</a> KDE/Ruby bindings, so I added <a href="http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/FindKorundum.cmake">FindKorundum.cmake</a>. Since I am not a CMake experienced hacker, things might be off; comments most welcome!<br /><br />However, when I add a <i>find_package(KDE3)</i>, I get the error:<pre>CMake Error: KDE3_DIR is not set. It must be set to the directory containing KDE3Config.cmake in order to use KDE3.<br /></pre> And I have no idea on how to address that.<br /><br />Additionally, I have struggle with the FindRUBY.cmake. I would expect ${RUBY_LIBRARY} to point to the directory where Ruby libraries are installed. But it points to /usr/lib, which is returned by <i>puts Config::CONFIG["libdir"]</i>. Tips most welcome here too.<br /><br /><div style="font-size: 9pt;"><a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com">Technorati</a> tags: <a title="KDE" href="http://technorati.com/tag/KDE" rel="tag">KDE</a> <a title="Ruby" href="http://technorati.com/tag/Ruby" rel="tag">Ruby</a> <a title="Korundum" href="http://technorati.com/tag/Korundum" rel="tag">Korundum</a> <a title="CMake" href="http://technorati.com/tag/CMake" rel="tag">CMake</a> </div>Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com3tag:blogger.com,1999:blog-30427249.post-1158001828533439412006-09-11T12:01:00.000-07:002006-09-11T12:45:54.603-07:00KDE::HTMLPart GUI for tagging cloudEveryone seems to blog about Ruby. Well, now do I too. Today I wrote three Ruby scripts to that allow me to tag my PDFs, just like I do with webpages using <a href="http://del.icio.us/egonw/">my del.icio.us account</a>, something I wanted to do for some time already. In <a href="http://chem-bla-ics.blogspot.com/2006/06/kde4-keyword-support-mockups.html">KDE4 keyword support mockups</a> I suggested to do this with xattr, so I did. This is using a <a href="http://www.nbtsc.org/~aredridel/projects/ruby/ruby-xattr">ruby xattr wrapper</a>.<br /><br /><h3>thisisabout</h3><br />The first script allows adding a keyword. It is a simple script and allows adding one keyword per call. Syntax: thisisabout [tag] [file]. The code:<br /><div class="typocode"><pre><br />#!/usr/bin/ruby<br /><br /># Copyright (C) 2006 Egon Willighagen<br /># License: GPL<br /><br />require 'xattr'<br /><br />tag = ARGV[0]<br />file = ARGV[1]<br /><br />if (file == nil)<br /> p "syntax: thisisabout [TAG] [FILE]"<br /> exit<br />else<br /> description = File.get_attr(file, "keywords")<br /> if (description != nil)<br /> words = description.split<br /> if (words.include?(tag))<br /> p file + " already has the tag " + tag<br /> else<br /> description = description + " " + tag<br /> end<br /> else<br /> description = tag<br /> end<br /> File.set_attr(file, "keywords", description)<br />end<br /></pre></div><br /><h3>thisisnotabout</h3><br />Removing a tag is done with a similar script:<br /><div class="typocode"><pre><br />#!/usr/bin/ruby<br /><br /># Copyright (C) 2006 Egon Willighagen<br /># License: GPL<br /><br />require 'xattr'<br /><br />tag = ARGV[0]<br />file = ARGV[1]<br /><br />if (file == nil)<br /> p "syntax: thisisnotabout [TAG] [FILE]"<br /> exit<br />else<br /> description = File.get_attr(file, "keywords")<br /> newdescription = ""<br /> if (description != nil)<br /> words = description.split<br /> words.each do |word|<br /> if (word == tag)<br /> # skip word<br /> else<br /> if (newdescription.length > 0)<br /> newdescription = newdescription + " "<br /> end<br /> newdescription = newdescription + word<br /> end<br /> end<br /> else<br /> description = tag<br /> end<br /> File.set_attr(file, "keywords", newdescription)<br />end<br /></pre></div><br /><h3>whatsthisabout</h3><br />The third script is where <a href="http://www.kde.org">KDE</a> comes in. It has a <i>--nogui</i> option if you don't want to GUI too show up. The code:<br /><div class="typocode"><pre><br />#!/usr/bin/ruby<br /><br /># Copyright (C) 2006 Egon Willighagen<br /># License: GPL<br /><br />require 'getoptlong'<br />require 'rdoc/usage'<br />require 'Korundum'<br />require '/home/egonw/bin/whatsthisabout'<br /><br />class MainWindow < KDE::MainWindow<br /><br /> def initialize( name, counts )<br /> super(nil, name)<br /> setCaption("What's This About??")<br /><br /> vbox = Qt::VBox.new( self )<br /> @browser = KDE::HTMLPart.new( vbox )<br /><br /> setCentralWidget(vbox)<br /><br /> @browser.begin()<br /> counts.each {|key, value|<br /> fontSize = (6*value)/2<br /> @browser.write("<font size=\"" + fontSize.to_s + "\">");<br /> @browser.write( key )<br /> @browser.write("</font> ");<br /> }<br /> @browser.end()<br /> end<br /><br />end<br /><br />opts = GetoptLong.new(<br /> [ '--nogui', '-n', GetoptLong::NO_ARGUMENT ],<br /> [ '--help', '-h', GetoptLong::NO_ARGUMENT ]<br />)<br /><br />startPath = nil<br />gui = "yes"<br />opts.each do |opt, arg|<br /> case opt<br /> when '--help'<br /> RDoc::usage<br /> when '--nogui'<br /> gui = "no"<br /> end<br />end<br /><br />if ARGV.length == 1<br /> startPath = ARGV[0]<br />elsif ARGV.length == 0<br /> startPath = '.'<br />else<br /> RDoc::usage<br /> exit 0<br />end<br /><br />wat = WhatsThisAbout.new<br />counts = wat.getKeywords(startPath)<br /><br />if (gui == "yes")<br /> about = KDE::AboutData.new("whatsthisabout", "What's This About??", "0.1")<br /> KDE::CmdLineArgs.init(about)<br /><br /> a = KDE::Application.new()<br /><br /> window = MainWindow.new( "What's This About??", counts )<br /> window.resize( 600, 300 )<br /><br /> a.mainWidget = window<br /> window.show<br /><br /> a.exec<br />else<br /> counts.each do |bla, bla2|<br /> puts bla + " " + bla2.to_s<br /> end<br />end<br /></pre></div><br />The obligatory screenshot:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/1868/1736/1600/whatsthisabout1.png"><img style="cursor:pointer; cursor:hand;" src="http://photos1.blogger.com/blogger/1868/1736/400/whatsthisabout1.png" border="0" alt="" /></a><br /><br />In due time I will put this in KDE SVN, but I need to make a reasonable cmake script yet. Anyone who can tell me how I can have cmake check wether the required Ruby libraries are installed? There are other things to do too:<br /><ol><br /> <li>make a backup/restore facility<br /> <li>use a database instead of recursively finding tags<br /></ol><br />Because I have my PDFs in a SVN repository and share them between some work places, the first todo would mean I could share my tags too. The second would just mean a serious speedup.<br /><br /><div style="font-size: 9pt;"><a title="technorati" href="http://www.technorati.com/search/chem-bla-ics.blogspot.com">Technorati</a> tags: <a title="KDE" href="http://technorati.com/tag/KDE" rel="tag">KDE</a> <a title="Ruby" href="http://technorati.com/tag/Ruby" rel="tag">Ruby</a> <a title="HTML" href="http://technorati.com/tag/HTML" rel="tag">HTML</a> <a title="tag" href="http://technorati.com/tag/tag" rel="tag">tag</a> <a title="cloud" href="http://technorati.com/tag/cloud" rel="tag">cloud</a> </div>Egon Willighagenhttp://www.blogger.com/profile/07470952136305035540noreply@blogger.com2