Monday, August 20, 2007

Update

Lots of fixes.

What is left:
  • driver reader job (multiple download queries)
  • presentation bug in selectprinterpage
  • create a driverwidget (v. similar to printerwidget)
  • use alien to install
  • add runtime check for alien

Friday, August 17, 2007

I'm back

Hello. 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.

"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).

I will be working hard from now on to make up for my lack of applied effort.

Later

Saturday, July 28, 2007

An update

It has been just over a month since my last post. Not very well done Gavin...

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.

Nearly done with my behindkde interview too :P


(I wonder will Catherine read this...)

Wednesday, June 27, 2007

Rebuilding kde* from scratch

Rapidly 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...

What should be a very simple issue with QHash (that requires recompiling some debug stuff in, hence :( ) is halting the XML work now.

I'm please that my madness with XmlQueryJob was stopped. That class was horrible. Simple stuff now. I think LOC was reduced about a third just with that removal!

My tooth chipped today. And my brother just has shaky hands, I'm not that blurry. Edit: photo is gone!

Monday, June 25, 2007

A clarification on querying

Note: 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. ;)

Yes, I shall be using QtXml module most likely with the SAX2 style variant being the most likely. (I've looked at QXmlStreamReader as it can parse an incomplete bytearray so we don't need the full XML before parsing.)

2 step process:
When querying openprinting.org, there are 3 types of information we can retrieve (using the type argument/option):
  • manufacturer (I likely won't use this)
  • printer
  • driver
So, in order to find and download a specific driver for a specific printer, there necessitates 2 queries.

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").

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.

Sunday, June 24, 2007

Query 1, meet Query 2

Today I'm going to:
  • scope around some XML parsing code in other KDE/Qt projects
  • start an implementation (if above is successful)
  • refactor my existing code (to be found at branches/work/soc-kdeprint-openprinting) to use the two step query process*
Said goodbye to the lady off to America and everyone who's going is gone too now. No excuses - more KDE time

Friday, June 22, 2007

XML, KIO and XML

XML issues all wrapped up. Simple replacement of & with xml syntax of &. I forgot & was used as a kind of escape.

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!)

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.

Also, where to put my code in svn?

Now to read some Christopher Hitchens and sleep.

Wednesday, June 20, 2007

KConfig XT

Very nice framework though I still seem to be doing some more laborious work than I'd like.

I'm also having an issue with it... not working. I want to have a string with a default value which is:

http://openprinting.org/query.cgi?type=printers&format=xml&moreinfo=1&showprinterid=1


So I have something like:
<pseudoxml>
<group name="openprinting">
<entry name="QueryUrl" type="String">
<label>The query URL we use to download the XML file from openprinting.org.
<whatsthis>This is the query URL we use to download an XML containing a list of printers from openprinting.org.</whatsthis>
<default>http://openprinting.org/query.cgi?type=printers<!--&format=xml&moreinfo=1&showprinterid=1--></default>
</entry>
</group>
</pseudoxml>

Notice that I had to comment out the ampersands parts. I kept getting errors such as:
<error>
/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
Unable to load document.
Parse error in /home/kde-devel/kde4/src/KDE/kdebase/runtime/kdeprint/kopenprintingdotorg/kopenprintingdialog.kcfg, line 13, col 83: error occurred while parsing reference
</error>

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.


Will iron out these problems in the morning.

Monday, June 18, 2007

KNewStuff2

My project:
  • Download xml from openprinting.org
  • Parse for "our" printer
  • If found:
    • Download rpm for driver and ppd (whatever available/necessary with this info being in the xml)
    • Install the rpm
  • If not found:
    • Report to the user that they should do something such as:
      • Investigate (google) if there really is no support
      • Write a letter to the manufacturer requesting support etc.

KNewStuff2 project:

KNewStuff2 (KNS2) is an implementation of the "Get Hot New Stuff" (GHNS) framework (if that's the right word).

It's aims and usage scenarios (AFAICT from http://preview.tinyurl.com/yro4qa) don't seem to suit My Project as:
  • I need to select what to download based, not on user preference, but on something fixed - the hardware
  • KNS2 expects simple post-processing such as unzipping etc.
These somewhat rule out KNS2. They don't quite do so very decisively, but I feel that using KNS2 would be shoehorning somewhat.

Comments?

Tuesday, June 12, 2007

My First Day at the office

Today 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.

I also decided not to build today as Monday is "commit gay patches day".

So today has been 2-3 hours of toying with KDevelop and compiling version 6.6 of gdb as stated necessary on techbase. Debian packaging was something I also thought might be useful so, decided to have a bit of a go at that! Some decent docs available too. Quite easy really but needs some slight modifications for new users and people making packages that are not 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.

So, going to see The Fountain tonight and then tomorrow morning is proper work.

Saturday, June 2, 2007

A 21st and build logs await

I've got qt4, kdelibs, kdepimlibs, kdebase @~25% and the apidox for kdelibs @~50% I'd say. That seems enough for now.

Time to go out now.

Unparalled* success

I've never gotten past 39% in my kdelibs building before. Golly gosh, I'm chuffed.


*That is not a pun

Saturday, May 26, 2007

Much of a late muchness

I 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... ...

And yes, it IS the first post and NO I don't like how I felt obliged to say it. :P