<?xml version="1.0" encoding="iso-8859-1"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
<channel rdf:about="http://khertan.net/rss.php">
<title>Khertan.net RSS</title>
<link>http://khertan.net/rss.php</link>
<description>Khertan.net News</description>
<dc:language>en-us</dc:language>
<dc:rights>Copyleft</dc:rights>
<dc:date>2012-05-23T13:56:19+01:00</dc:date>
<dc:creator>Benoît HERVIER (Khertan)</dc:creator>
<dc:subject>Benoît HERVIER (Khertan) Developer Web Site : Maemo, MeeGo, Python and Open source software</dc:subject>
<items>
<rdf:Seq><rdf:li rdf:resource="/blog/khtsimpletext_available_on_ovistore"/>
<rdf:li rdf:resource="/blog/khtsimpletext_0.3.1"/>
<rdf:li rdf:resource="/blog/Python Apps in QtSimulator"/>
<rdf:li rdf:resource="/blog/conboy note on desktop"/>
<rdf:li rdf:resource="/blog/KhtCMS_and_some_other_changes"/>
</rdf:Seq>
</items>
<image rdf:resource="http://khertan.net/layout/logo.jpg"/>
</channel>
<item rdf:about="/blog/khtsimpletext_available_on_ovistore">
<title><![CDATA[khtsimpletext_available_on_ovistore]]></title>
<pubDate><![CDATA[Thursday 26 April 2012]]></pubDate>
<link>/blog/khtsimpletext_available_on_ovistore</link>
<description><![CDATA[<h1>KhtSimple is now availble on Ovi Store</h1>

<p><script type="text/javascript">var d=document,h=d.getElementsByTagName("html")[0];h.setAttribute("xmlns:nokia","http://www.nokia.com/2011/dxml");</script>
<script src="//dropsdk.nokia.com/latest/button/js/all.js" type="text/javascript"></script>
<nokia:store product_id="266777" size="medium" lang="en"></nokia:store></p>
]]></description>
<feedburner:origLink>/blog/khtsimpletext_available_on_ovistore</feedburner:origLink>
</item>
<item rdf:about="/blog/khtsimpletext_0.3.1">
<title><![CDATA[khtsimpletext_0.3.1]]></title>
<pubDate><![CDATA[Thursday 22 March 2012]]></pubDate>
<link>/blog/khtsimpletext_0.3.1</link>
<description><![CDATA[<h1>KhtSimpleText 0.3.1</h1>

<p>A new release of KhtSimpleText is available in <a href="http://apps.formeego.com/staging/applications/n9/pr1.0/harmattan/Utilities/khtsimpletext/">apps4MeeGo</a>. For those who don't know what is it, it s a simple text editor for harmattan specially designed for n9 and n950 device. Currently still in development, the version implement the following features :</p>

<ul>
<li>Browse in the local file system</li>
<li>Open / Edit / Save a text file</li>
<li>Delete / Rename file</li>
</ul>

<p>I've also planned to implement other features :</p>

<ul>
<li>Markdown Preview</li>
<li>Copy / Move file</li>
<li>Preferences for changing font</li>
<li>Auto save feature</li>
</ul>

<p>Some screenshots of an older version :</p>

<p><img src="http://khertan.net/medias/khtsimpletext_screenshot_1.png" alt="KhtSimpleText Screenshot 1" />
<img src="http://khertan.net/medias/khtsimpletext_screenshot_2.png" alt="KhtSimpleText Screenshot 2" />
<img src="http://khertan.net/medias/khtsimpletext_screenshot_3.png" alt="KhtSimpleText Screenshot 3" /></p>

<p>Of course for more informations (source, bugtracker, ...) : <a href="http://khertan.net/KhtSimpleText">KhtSimpleText</a></p>
]]></description>
<feedburner:origLink>/blog/khtsimpletext_0.3.1</feedburner:origLink>
</item>
<item rdf:about="/blog/Python Apps in QtSimulator">
<title><![CDATA[Python Apps in QtSimulator]]></title>
<pubDate><![CDATA[Monday 05 March 2012]]></pubDate>
<link>/blog/Python Apps in QtSimulator</link>
<description><![CDATA[<h1>Python Apps in QtSimulator on Crunchbang Statler</h1>

<h2>Dependancies</h2>

<ul>
<li>Install QtSDK from qt.nokia.com</li>
<li>Install dependancies for PySide</li>
</ul>

<pre class="brush: python;">sudo apt-get install cmake build-essential libxml2 libxslt libqt4-dev python-dev git
</pre>

<h2>Prepare Build</h2>

<p>So we will use the automated build script, easier :)</p>

<pre class="brush: python;">git clone https://github.com/PySide/BuildScripts
cd BuildScripts
git submodule init
git submodule update
</pre>

<h2>Apply some patch for building with QtSimulator</h2>

<ul>
<li>Apply this patch if still not merged in master:
https://github.com/PySide/PySide/pull/108/files</li>
<li>Modify the environement.sh in the BuildScripts folder</li>
</ul>

<pre class="brush: python;">QT_SDK_HOME="$HOME/QtSDK/Simulator/Qt/gcc"
Q_WS_SIMULATOR="yes"
</pre>

<h2>Build</h2>

<pre class="brush: python;">./build_and_install
</pre>

<h2>Run your apps</h2>

<pre class="brush: python;">#!/bin/bash
set -e

if [ $# -eq 0 ]; then
    echo "Usage: $0 &lt;arguments...&gt;" &gt;&amp;2
    exit 1
fi

base=$(dirname $0)
qt_sdk_dir=$HOME/QtSDK

export LD_LIBRARY_PATH=$base/lib:$qt_sdk_dir/Simulator/Qt/gcc/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$base/lib/python2.6:$PYTHONPATH

python2.6 "$@"
</pre>

<h2>Screenshot</h2>

<p>Here is a screenshot of KhtSimpleText which run in the simulator.
<img src="khtsimpletext_on_simulator.png" alt="KhtSimpleText" /></p>
]]></description>
<feedburner:origLink>/blog/Python Apps in QtSimulator</feedburner:origLink>
</item>
<item rdf:about="/blog/conboy note on desktop">
<title><![CDATA[conboy note on desktop]]></title>
<pubDate><![CDATA[Wednesday 15 February 2012]]></pubDate>
<link>/blog/conboy note on desktop</link>
<description><![CDATA[<h1>Display a Conboy note on your desktop</h1>

<p><strong>Update :</strong> Due to some question on this little script i update it a bit to works with a recent release of Desktop Commands Execution Widget which execute the scripts now as root, so note wasn't read from user, but root. I also notice that i forgot to report this little script to my new website (Thx to @sphaxx22 (Yves S.)).</p>

<p><strong>Original :</strong></p>

<p>Today while i got the idea to made a plugin to display the content of a Conboy Note on my n900 desktop. I finnally choose the option to use Desktop Commands Execution Widget to display the note content by using the following commands :</p>

<pre><code>python /home/user/conboy_note_to_text.py print noteid
</code></pre>

<p>I choose to use noteid instead of text title, as noteid didn't change and also because i didn't maintain an index of all notes, so it s faster.</p>

<p>To list all notes with their title and id in xterm, just use the following commands :</p>

<pre><code>python /home/user/conboy_note_to_text.py list
</code></pre>

<p><strong>A screenshot example to see it in action :</strong>
<img src="conboy_note_on_desktop.png" alt="Conboy note on Maemo desktop" />
<strong>And how it look like in conboy :</strong>
<img src="conboy_note_on_desktop_2.png" alt="Conboy on Maemo" /></p>

<p>And of course save the following code to /home/user/</p>

<pre class="brush: python;">#!/usr/lib/python2.5
#CopyLeft 2010-2012 Benoit HERVIER &lt;khertan@khertan.net&gt;

from xml.dom import minidom
import os.path
import glob
import sys
import re
from xml.sax.handler import ContentHandler
import xml.sax

class NoteList:
   def __init__(self,path):
       self.path = path
       self.noteList = {}
       for infile in glob.glob( os.path.join(self.path, '*.note') ):
         note = Reader(os.path.basename(infile)[:-5])
         if note.title != None:
             self.noteList[note.title]=note.note_id

   def get_note_id_by_title(self,title):
       try:
           return self.noteList[title]
       except:
           return None

class textHandler(ContentHandler):
   def __init__(self):
     ContentHandler.__init__(self)
     self.content = ""
     self.title = ""
     self.selector = None

   def startElement(self, element,attributes):
       if (element == 'note-content') and (self.selector == None):
           self.selector = element
       elif (element == 'title') and (self.selector == None):
           self.selector = element


   def endElement(self, element):
       if (element == self.selector):
           self.selector = None

   def characters(self, ch):
       if self.selector == 'note-content':
           self.content = self.content + unicode(ch)
       elif self.selector == 'title':
           self.title = self.title + unicode(ch)

if __name__ == "__main__":
   try:
       if (sys.argv[1]=='print'):
           try:
               parser = xml.sax.make_parser()
               handler = textHandler()
               parser.setContentHandler(handler)
               parser.parse(os.path.join('/home/user','.conboy',unicode(sys.argv[2])+'.note'))
               print handler.content
           except Exception, e:
               print e

       elif (sys.argv[1]=='list'):
           nlist = NoteList('/home/user/.conboy/').noteList
           for key in nlist.keys():
               print key, ' : ', nlist[key]
       elif (sys.argv[1]=='search'):
           nlist = NoteList('/home/user/.conboy/')
           print nlist.get_note_id_by_title(sys.argv[2])
       else:
           raise
   except Exception, e:
           print """Usage : python conboy_note_reader.py option [note_id or note title]
           Option : 
               - list : list all note by title with id
               - print : print content of note with the given id
               - search : print id of the given title"""
           print e
</pre>
]]></description>
<feedburner:origLink>/blog/conboy note on desktop</feedburner:origLink>
</item>
<item rdf:about="/blog/KhtCMS_and_some_other_changes">
<title><![CDATA[KhtCMS_and_some_other_changes]]></title>
<pubDate><![CDATA[Friday 13 January 2012]]></pubDate>
<link>/blog/KhtCMS_and_some_other_changes</link>
<description><![CDATA[<h1>KhtCMS and Khweeteur</h1>

<p>As you have already probably see it, the 23 December 2011, i ve pushed a new Khweeteur version to the maemo repository, this new version include many fixes from Neal Walfield and really few from me.
I'm also writing my own CMS, which i now use for my website. While all features aren't yet coded, it s enough for the moment (no twitter feed, not comment from last git commit, ...).</p>
]]></description>
<feedburner:origLink>/blog/KhtCMS_and_some_other_changes</feedburner:origLink>
</item>
</rdf:RDF>

