tag:blogger.com,1999:blog-69644811661083000242008-03-16T20:42:46.519ZGSoC 2007 KDEPrint - openprinting.org driver queryGavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-6964481166108300024.post-29270948051023073282007-08-20T06:22:00.000+01:002007-08-20T06:24:32.331+01:00UpdateLots of fixes.<br /><br />What is left:<br /><ul><li>driver reader job (multiple download queries)</li><li>presentation bug in selectprinterpage</li><li>create a driverwidget (v. similar to printerwidget)</li><li>use alien to install</li><li>add runtime check for alien</li></ul>Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-82549605764153385362007-08-17T17:37:00.000+01:002007-08-17T18:37:30.533+01:00I'm backHello. I'm going to be frank and say that I haven't been the best GSoC student for the last 2 weeks. My project fell to the wayside compared to other issues. I shall be talking with my mentor Cristian when he is back from vacation on the 25th of August.<br /><br />"Pencils down" is 20th August. I will be working on that basis regardless. Perhaps I will be successful. Regardless, I shall finish the project (though I am away from 10 September to 24 September in America where I'm not allowed work).<br /><br />I will be working hard from now on to make up for my lack of applied effort.<br /><br />LaterGavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-83118701861561606502007-07-28T21:36:00.000+01:002007-07-28T21:44:30.885+01:00An updateIt has been just over a month since my last post. Not very well done Gavin...<br /><br />Today I finished implementing the nicer GUI for displaying the printer selection choice. The parser is temporarily broken though :P Doesn't want to recognize the XML tags anymore. I've checked the diff of my changes since it last worked and that the XML hasn't changed. No luck. I still think this will be fixed tomorrow or the next day.<br /><br />Nearly done with my behindkde interview too :P<br /><br /><br /><span style="font-size:78%;">(I wonder will Catherine read this...)</span>Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-53772620119591650512007-06-27T16:59:00.000+01:002007-06-27T17:08:56.620+01:00Rebuilding kde* from scratchRapidly filling hard drive space (now since mitigated) led me to completely delete the build and install directories for kde4 today. I'm regretting it now because I've to wait about 2 hours for them to recompile from scratch! And I can't compile a single piece of my code...<br /><br />What should be a very simple issue with QHash (that requires recompiling some debug stuff in, hence :( ) is halting the XML work now.<br /><br />I'm please that my madness with XmlQueryJob was stopped. That class was <span style="font-weight: bold;">horrible</span>. Simple stuff now. I think LOC was reduced about a third just with that removal!<br /><br />My tooth chipped today. And my brother just has shaky hands, I'm not that blurry.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_JKIKrYV3YoI/RoKLCB4vtYI/AAAAAAAAAAg/4Oct_8mR7tE/s1600-h/shakyphoto.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_JKIKrYV3YoI/RoKLCB4vtYI/AAAAAAAAAAg/4Oct_8mR7tE/s400/shakyphoto.jpg" alt="" id="BLOGGER_PHOTO_ID_5080776196609783170" border="0" /></a>Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-48443797635244865842007-06-25T17:15:00.000+01:002007-06-25T17:21:59.052+01:00A clarification on querying<span style="font-weight: bold; font-style: italic;">Note:</span> This post is a slightly blogified version of a comment I left to my mentor's comment to my last post. Also note that that sentence is awful. ;)<br /><br />Yes, I shall be using QtXml module most likely with the SAX2 style variant being the most likely. (I've looked at <a href="http://doc.trolltech.com/4.3/qxmlstreamreader.html">QXmlStreamReader</a> as it can parse an incomplete bytearray so we don't <span style="font-style: italic;">need</span> the full XML before parsing.)<br /><br /><span style="font-weight: bold;">2 step process:</span><br />When <a href="http://www.linux-foundation.org/en/OpenPrinting/Database/Query">querying openprinting.org</a>, there are 3 types of information we can retrieve (using the type argument/option):<br /><ul><li>manufacturer (I likely won't use this)</li><li>printer</li><li>driver<br /></li></ul>So, in order to find and download a specific driver for a specific printer, there necessitates 2 queries.<br /><br />The first query gets information from machine (and perhaps the user) about the printer type. This will also give lots of information about drivers available for the printer (there could even be a list of many recent, functional drivers that could all "work").<br /><br />The second query will use this driver list (so we need the first query's XML parsed before we can make the second) and make a driver query. Here we can get information about the driver such as the all important download URL.Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-76668230808686090962007-06-24T17:35:00.000+01:002007-06-24T17:39:42.104+01:00Query 1, meet Query 2Today I'm going to:<br /><ul><li>scope around some XML parsing code in other KDE/Qt projects</li><li>start an implementation (if above is successful)<br /></li><li>refactor my existing code (to be found at branches/work/soc-kdeprint-openprinting) to use the two step query process*<br /></li></ul>Said goodbye to the lady off to America and everyone who's going is gone too now. No excuses - more KDE timeGavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-49847441165872641092007-06-22T00:01:00.000+01:002007-06-22T00:07:22.980+01:00XML, KIO and XMLXML issues all wrapped up. Simple replacement of & with xml syntax of &amp;amp;. I forgot & was used as a kind of <span style="font-style: italic;">escape</span>.<br /><br />KIO is still not crystal with me yet. Confusion over whether to use KIO::Job or KJob is the main issue. (The confusion is actually a result of every doc telling me to use KIO::Job but KJob being the only thing that actually works!)<br /><br />XML parsing is next up on the agenda. There are of course niggles and slight inefficiencies with my current setup but they are minor relative to just getting the god damn work done.<br /><br />Also, where to put my code in svn?<br /><br />Now to read some Christopher Hitchens and sleep.Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-30590528210152260672007-06-20T00:44:00.000+01:002007-06-20T00:57:02.610+01:00KConfig XTVery nice framework though I still seem to be doing some more laborious work than I'd like.<br /><br />I'm also having an issue with it... not working. I want to have a string with a default value which is:<br /><span style="font-style: italic;"><string></string></span><br />http://openprinting.org/query.cgi?type=printers&format=xml&amp;moreinfo=1&showprinterid=1<br /><span style="font-style: italic;"></span><br /><br />So I have something like:<br /><span style="font-style: italic;">&lt;pseudoxml></span><br /> &lt;group name="openprinting"><br /> &lt;entry name="QueryUrl" type="String"><br /> &lt;label>The query URL we use to download the XML file from openprinting.org.</label><br /> &lt;whatsthis>This is the query URL we use to download an XML containing a list of printers from openprinting.org.&lt;/whatsthis><br /> &lt;default>http://openprinting.org/query.cgi?type=printers&lt;!--&format=xml&moreinfo=1&showprinterid=1-->&lt;/default><br /> &lt;/entry><br /> &lt;/group><br /><span style="font-style: italic;">&lt;/pseudoxml></span><br /><br />Notice that I had to comment out the ampersands parts. I kept getting errors such as:<br /><span style="font-style: italic;">&lt;error></span><br />/home/kde-devel/opt/kde/bin/kconfig_compiler /home/kde-devel/kde4/src/KDE/kdebase/runtime/kdeprint/kopenprintingdotorg/kopenprintingdialog.kcfg /home/kde-devel/kde4/src/KDE/kdebase/runtime/kdeprint/kopenprintingdotorg/KOpenprintingConfig.kcfgc -d /home/kde-devel/kde4/build/KDE/kdebase/runtime/kdeprint/kopenprintingdotorg<br />Unable to load document.<br />Parse error in /home/kde-devel/kde4/src/KDE/kdebase/runtime/kdeprint/kopenprintingdotorg/kopenprintingdialog.kcfg, line 13, col 83: error occurred while parsing reference<br /><span style="font-style: italic;">&lt;/error></span><br /><br />Where line 13, col 83 was the first equals after an ampersand. I had a quick look at the xsd file but couldn't find anything - I guess I just have to look up some basic xml escaping or some such. Should be no problem.<br /><br /><br />Will iron out these problems in the morning.Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-34903140854605347162007-06-18T17:00:00.000+01:002007-06-18T17:54:16.726+01:00KNewStuff2<span style="font-size:130%;"><span style="font-weight: bold;">My project:</span></span><br /><ul><li>Download xml from openprinting.org</li><li>Parse for "our" printer</li><li>If found:</li><ul><li>Download rpm for driver and ppd (whatever available/necessary with this info being in the xml)<br /></li><li>Install the rpm</li></ul><li>If not found:</li><ul><li>Report to the user that they should do something such as:</li><ul><li>Investigate (google) if there really is no support</li><li>Write a letter to the manufacturer requesting support etc.</li></ul></ul></ul><br /><span style="font-size:130%;"><span style="font-weight: bold;">KNewStuff2 project:</span></span><br /><br />KNewStuff2 (KNS2) is an implementation of the "Get Hot New Stuff" (GHNS) framework (if that's the right word).<br /><br />It's aims and usage scenarios (AFAICT from <a href="http://preview.tinyurl.com/yro4qa">http://preview.tinyurl.com/yro4qa</a>) don't seem to suit My Project as:<br /><ul><li>I need to select what to download based, not on user preference, but on something fixed - the hardware</li><li>KNS2 expects simple post-processing such as unzipping etc.</li></ul>These somewhat rule out KNS2. They don't quite do so very decisively, but I feel that using KNS2 would be shoehorning somewhat.<br /><br />Comments?Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-22519214732253666572007-06-12T18:06:00.000+01:002007-06-12T18:52:05.000+01:00My First Day at the officeToday could perhaps be described as my first day at the office - though not quite. I am quite finished with exams (delight) but I am exhausted (less delight). I got about 9 hours sleep last night which was about twice as much as I'd had in the last 3 days so I'm completely on the mend! Tomorrow will be first day proper.<br /><br />I also decided not to build today as Monday is "commit <a href="http://en.wikipedia.org/wiki/Gay#Pejorative_non-sexualized_usage">gay</a> patches day".<br /><br />So today has been 2-3 hours of toying with KDevelop and compiling version 6.6 of gdb as <a href="http://techbase.kde.org/Getting_Started/Set_up_KDE_4_for_development#KDevelop">stated necessary on techbase</a>. Debian packaging was something I also thought might be useful so, decided to have a bit of a go at that! Some <span style="font-style: italic;">decent</span> <a href="http://www.debian.org/doc/maint-guide/index.en.html">docs</a> available too. Quite easy really but needs some slight modifications for new users and people making packages that are <span style="font-weight: bold;">not</span> meant to be uploaded. Might do so myself but I'd say it's also available somewhere else... too many debian sites in my opinion as it is.<br /><br />So, going to see <a href="http://imdb.com/title/tt0414993/">The Fountain</a> tonight and then tomorrow morning is proper work.Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-39570751764798921652007-06-02T22:29:00.000+01:002007-06-02T22:35:56.606+01:00A 21st and build logs awaitI've got qt4, kdelibs, kdepimlibs, kdebase @~25% and the apidox for kdelibs @~50% I'd say. That seems enough for now.<br /><br />Time to go out now.Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-7638729451653527582007-06-02T20:47:00.000+01:002007-06-02T20:48:18.271+01:00Unparalled* successI've never gotten past 39% in my kdelibs building before. Golly gosh, I'm chuffed.<br /><br /><span style="font-size:78%;"><br />*That is not a pun</span>Gavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.comtag:blogger.com,1999:blog-6964481166108300024.post-55512168884444922502007-05-26T22:47:00.000+01:002007-05-26T22:50:57.439+01:00Much of a late muchnessI decided to reinstall Debian Etch and get some LVM shiznit going on so I've been somewhat delayed in getting my build environment up. Also, I have been doing exams... I don't quite know how to describe how much of an understatement that is... except through ellipses apparently... ...<br /><br />And yes, it IS the first post and NO I don't like how I felt obliged to say it. :PGavin Beattyhttp://www.blogger.com/profile/04637429903073555689noreply@blogger.com