<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>WorldDomination.be blog</title><link href="http://blog.worlddomination.be/blog/atom.xml" rel="self"/><link href="http://blog.worlddomination.be"/><updated>2012-05-02T22:03:12Z</updated><id>http://blog.worlddomination.be</id><entry><title>Idée d&#39;une plateforme d&#39;entre aide pour étudiants</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2012/idee-dun-plateforme-dentre-aide-pour-edutiants.html"/><published>2012-05-02T08:36:00Z</published><id>http://blog.worlddomination.be/blog/2012/idee-dun-plateforme-dentre-aide-pour-edutiants.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Ceci est un texte que j&#39;ai écris pour formaliser mes idées sur comment nous
pourrions essayer d&#39;utiliser aux mieux les formidables possibilités d&#39;Internet
pour favoriser l&#39;entre aide entre&amp;nbsp;étudiants.&lt;/p&gt;
&lt;p&gt;Un brouillon de ce texte a déjà pas mal circulé et ces idées se sont concrétisé
début&amp;nbsp;2011.&lt;/p&gt;
&lt;h2&gt;Préface&lt;/h2&gt;
&lt;p&gt;Il y a quelques années, j&#39;ai été délégué cours dans une organisation
étudiante où mon but était de coordonner l&#39;échange et la vente de copie de
packs de résumés/anciennes questions d&#39;examens/notes de&amp;nbsp;cours.&lt;/p&gt;
&lt;p&gt;Depuis, l&#39;idée d&#39;améliorer l&#39;entre aide entre étudiant est souvent revenue dans
mon esprit. Le statut quo étant assez décevant: le seul nouvel usage qui a été
créé avec l&#39;apparition d&#39;Internet a été de scanner tous ces documents et de les
mettre en lignes pour plus facilement les échanger, ce qui est bien mais
vraiment limité. À côté de ça, écrire un résumé de cours ou tout autre document
similaire reste un travail laborieux et chronophage. Résultat, ces documents
sont rares, souvent en partie dépassés et très rarement&amp;nbsp;améliorés.&lt;/p&gt;
&lt;p&gt;Avec Internet, la plateforme par excellence pour favoriser l&#39;entre aide et la
collaboration sur des projets d&#39;intérêt commun, ce constat est particulièrement&amp;nbsp;décevant.&lt;/p&gt;
&lt;p&gt;En parallèle, j&#39;ai été investi dans plusieurs organisations dont les membres se
voyant très peu irl et qui par conséquent travaillaient quasiment exclusivement
avec des outils leur permettant de faire cela via Internet. Par exemple avec des
&lt;a href=&quot;http://etherpad.org/&quot;&gt;etherpad&lt;/a&gt;&lt;a href=&quot;https://github.com/Pita/etherpad-lite&quot;&gt;-lite&lt;/a&gt;,
des &lt;a href=&quot;http://en.wikipedia.org/wiki/Wiki&quot;&gt;wikis&lt;/a&gt; ou encore
&lt;a href=&quot;http://www.co-ment.com/&quot;&gt;co-ment&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;C&#39;est principalement de l&#39;immersion dans ce monde que vient mon&amp;nbsp;inspiration.&lt;/p&gt;
&lt;p&gt;Concernant notre problème, une chose dont je suis relativement sûr c&#39;est
que l&#39;innovation doit venir de nous, les étudiants. Le corps académique est
globalement malheureusement trop peu réactif et intéressé par la question et
nous sommes plus à mène de comprendre les problèmes que nous rencontrons que
les&amp;nbsp;académiques.&lt;/p&gt;
&lt;p&gt;Remarque: il y a quand même des innovations venant d&#39;eux, les exemples récents
les plus impressionnants sont les cours en ligne de Stanford (à l&#39;initiation de
2 professeurs las des cours théoriques de 2h) qui s&#39;est transformé en
&lt;a href=&quot;https://www.coursera.org&quot;&gt;Coursera&lt;/a&gt; et à la réaction du MIT s&#39;appelant
&lt;a href=&quot;http://mitx.mit.edu/&quot;&gt;MItx&lt;/a&gt; (que j&#39;ai bien moins aimé mais bien moins testé,
j&#39;ai l&#39;impression qu&#39;on y perd tout le côté humain du petit professeur tout
motivé qui aime tellement son cours qu&#39;il veut le transmettre au monde&amp;nbsp;entier).&lt;/p&gt;
&lt;h2&gt;Qu&#39;est-ce qui peut être amélioré&amp;nbsp;?&lt;/h2&gt;
&lt;p&gt;Question primordiale, quelle direction voulons, voire pouvons nous prendre ?
Notre système éducatif est structuré de manière fondamentalement
individualiste, même les rares projets de groupe se font presque &quot;pour soit&quot;,
cela ne nous laisse pas une grande marge de manœuvre. Donc, qu&#39;est-ce que nous
faisons tous en tant qu&#39;étudiants, qui est partageable et dont nous ne
partageons pas ou pas encore très bien le fruit ? S&#39;échanger les réponses aux
questions d&#39;examens pendant un examen n&#39;est pas vraiment ce qui nous intéresse&amp;nbsp;ici.&lt;/p&gt;
&lt;p&gt;En fait, la réponse est assez simple et est juste un niveau d&#39;abstraction au
dessus de ce que nous faisons déjà avec l&#39;échange de packs de cours: il s&#39;agit
du déchiffrement des&amp;nbsp;cours.&lt;/p&gt;
&lt;p&gt;Chaque étudiant passe un temps non négligeable à chercher à comprendre ce que
signifie son cours, la qualité du matériel à disposition étant variable, les
principes pas toujours immédiats, c&#39;est une des principales activités de&amp;nbsp;l&#39;étudiant.&lt;/p&gt;
&lt;h2&gt;Comment l&#39;améliorer&amp;nbsp;?&lt;/h2&gt;
&lt;p&gt;La solution est en fait assez simple et inspirée directement d&#39;un mécanisme
utilisé par le &lt;a href=&quot;http://djangobook.com/&quot;&gt;djangobook&lt;/a&gt; (il n&#39;est pas le seul à le&amp;nbsp;faire):&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;img src=&quot;/media/img/entreaide/djangobook.png&quot; /&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://djangobook.com/about/comments/&quot;&gt;Page d&#39;aide pour leur système de commentaires&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Le principe est de découper le livre par paragraphe et de permettre aux
utilisateurs d&#39;y rajouter des commentaires pour partager leurs&amp;nbsp;questions/remarques/découvertes.&lt;/p&gt;
&lt;p&gt;Donc l&#39;idée serait tout simplement, dans un premier temps, d&#39;offrir aux
étudiants un service leur permettant d&#39;appliquer ce même principe à tous les
documents en rapport avec leurs cours et ceux de leur&amp;nbsp;choix.&lt;/p&gt;
&lt;p&gt;Pour insister, cela concerne en autre les cours disponibles, les notes de cours,
les anciens examens, les exercices disponibles, les résumés fait par les
étudiants et tout ce que j&#39;ai&amp;nbsp;oublié.&lt;/p&gt;
&lt;p&gt;De cette manière, le travail d&#39;analyse et de compréhension que chaque étudiant
faisait seul (ou en comité réduit) pourra désormais être partagé et l&#39;entre
aide grandement&amp;nbsp;facilité.&lt;/p&gt;
&lt;h2&gt;Facilité d&#39;adaptation pour les&amp;nbsp;utilisateurs&lt;/h2&gt;
&lt;p&gt;Ce type d&#39;interface assez récent n&#39;est pas forcement intuitif pour les
étudiants qui ne sont pas forcement tous des habitués de l&#39;informatique. Après
avoir discuté avec certains d&#39;entre eux, ils m&#39;ont dit qu&#39;un type de site très
familier pour eux étaient les forums (type phpbb). L&#39;idée est donc que chaque
topics de commentaires associés à chaque paragraphe soit en fait un topic dans
un forum correspondant, de cette manière ils ne seront pas trop déboussolés ce
qui facilitera l&#39;adoption d&#39;un outil de ce&amp;nbsp;genre.&lt;/p&gt;
&lt;h2&gt;Allons plus&amp;nbsp;loin&lt;/h2&gt;
&lt;p&gt;Ceci est un bon début, être capable de partager sur chaque paragraphe permet
déjà de reproduire ce qui se faisait déjà en petit comité à une plus grande
échelle. Mais s&#39;arrêter ici serait dommage. En effet, pour les étudiants qui
viennent après, parcourir des topics de discussion à la recherche d&#39;une réponse
à une hypothétique question éclaté en plusieurs réponses d&#39;autres étudiants
n&#39;est pas des plus efficace. C&#39;est déjà le cas sur &lt;a href=&quot;http://candiulb.be&quot;&gt;candiulb&lt;/a&gt; par&amp;nbsp;exemple.&lt;/p&gt;
&lt;p&gt;Une façon relativement simple et efficace de résoudre ce problème est d&#39;offrir
aux étudiants une page de type wiki (avec syntaxe scientifique à disposition,
inclusion d&#39;images, historique etc ...) pour chaque paragraphe. De cette
manière les étudiants pourront coucher le fruit de leurs échanges et réflexions
de manière formalisé et&amp;nbsp;claire.&lt;/p&gt;
&lt;p&gt;De cette manière, tous ces documents qui étaient morts, peuvent désormais
trouver une nouvelle vie, être complété, redevenir d&#39;actualité et être une
ressource historique pour les futures&amp;nbsp;promotions.&lt;/p&gt;
&lt;p&gt;En plus d&#39;un outil d&#39;échanges nous obtenons un outil d&#39;amélioration,
voir de&amp;nbsp;(re-)création.&lt;/p&gt;
&lt;p&gt;On peut même imaginer à très long terme voir le document entièrement
disparaitre et être remplacé uniquement par ces nouvelles pages wiki et
devenir ainsi totalement « vivant&amp;nbsp;».&lt;/p&gt;
&lt;h2&gt;Autres fonctionnalités&amp;nbsp;intéressante&lt;/h2&gt;
&lt;p&gt;Une fonctionnalité tout à fait désirable serait la possibilité de générer un
nouveau document compilant les paragraphes du documents original entrecoupés
des commentaires et/ou pages wiki créées par les étudiants en vu de pouvoir&amp;nbsp;l&#39;imprimer.&lt;/p&gt;
&lt;h2&gt;Interactions avec le corps&amp;nbsp;académique&lt;/h2&gt;
&lt;p&gt;Une fois le projet bien lancé et la plateforme tournant avec un nombre non
négligeable d&#39;étudiants actifs, une nouvelle étape peut être franchie. Cela
consiste à aller voir les professeurs sensibles à ce type de projets et de
leur dire: « voici une plateforme de feedback instantané pour vos cours qui
vous permet de voir où vos étudiants sont bloqués, ce qu&#39;ils ont du mal à
comprendre, comment les aider et où améliorer votre cours&amp;nbsp;».&lt;/p&gt;
&lt;p&gt;Bien sûr chaque professeurs est différent et il est tout à fait possible que
certains voient cela d&#39;un mauvais œil mais je pense que si le concept accroche
chez les étudiants et qu&#39;une masse critique de professeurs est atteinte il y
aura un effet de basculement et que ce genre d&#39;outils et de méthodes deviendront
progressivement&amp;nbsp;standards.&lt;/p&gt;
&lt;h2&gt;Implémentation&lt;/h2&gt;
&lt;p&gt;Ce projet peut sembler conséquent, il n&#39;est en tout cas pas petit, mais je
pense qu&#39;avec un framework web moderne une très grosse partie du travail a déjà
été faite et qu&#39;il y a &quot;juste&quot; à assembler les différents morceaux ensembles et
à se concentrer sur une bonne interface (très&amp;nbsp;important).&lt;/p&gt;
&lt;p&gt;Je vais prendre l&#39;exemple de &lt;a href=&quot;https://www.djangoproject.com/&quot;&gt;django&lt;/a&gt; vu que
c&#39;est celui que je connais le&amp;nbsp;mieux:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://djangopackages.com/grids/g/wikis/&quot;&gt;django apps faisant&amp;nbsp;wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://djangopackages.com/grids/g/forums/&quot;&gt;django apps faisant&amp;nbsp;forum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.djangoproject.com/en/1.4/ref/contrib/comments/&quot;&gt;documentation de django sur les commentaires qui sont&amp;nbsp;génériques&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://pypi.python.org/pypi/pyPdf/1.13&quot;&gt;pyPdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/django-phpbb/&quot;&gt;une django app pour lier les comptes utilisateurs d&#39;un forum phpbb et du backend&amp;nbsp;django&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Il suffit juste d&#39;assembler les pièces pour avoir rapidement un prototype
utilisable mais à mon avis le travail d&#39;interface sera quant à lui bien plus&amp;nbsp;conséquent.&lt;/p&gt;
&lt;p&gt;Remarque: étant donné la nature des PDF, il est bien plus possible que le
découpage se fasse par pages et non par paragraphes, au moins dans un premier
temps. Pour les autres formats ils sont généralement structurés et ce sera donc
bien plus facile. Ils sont aussi malheureusement plus&amp;nbsp;rare.&lt;/p&gt;
&lt;h2&gt;Projet en&amp;nbsp;cours&lt;/h2&gt;
&lt;p&gt;Ayant parlé de cette idée à gauche à droite, un bon pote avec qui je suis
toujours d&#39;accord sur le fond mais jamais sur la forme a décidé d&#39;en faire son
projet&amp;nbsp;d&#39;année.&lt;/p&gt;
&lt;p&gt;Bien entendu le projet est libre (agplv3) mais assez fort lié à notre
université (l&#39;ULB). Le code se trouve
&lt;a href=&quot;https://github.com/ekatsah/proj402&quot;&gt;ici&lt;/a&gt;.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>How I fell in love with debugging tools for python</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2012/how-I-fall-in-love-with-debugging-tools-for-python.html"/><published>2012-03-16T03:34:48Z</published><id>http://blog.worlddomination.be/blog/2012/how-I-fall-in-love-with-debugging-tools-for-python.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Until recently, I&#39;ve never got to really use pdb (python debugger) nor to like
it. It didn&#39;t bring me anything, broke my mental workflow, was annoying to use
and print statement always seems more&amp;nbsp;efficients.&lt;/p&gt;
&lt;p&gt;Then I&amp;nbsp;discovered:&lt;/p&gt;
&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
    ipython --pdb script.py
&lt;/blockquote&gt;

&lt;p&gt;And my world&amp;nbsp;changed.&lt;/p&gt;
&lt;p&gt;What does it do? It simply drop you into &lt;a href=&quot;http://ipython.org/&quot;&gt;ipython&lt;/a&gt; if your
script crash at the exception raising point. So. Damn. Simple. and effective.
Awesome shell and you don&#39;t have to modify your code and/or remember how the hell
to set a breakpoint with pdb. You just have to change &quot;python&quot; into &quot;ipython&amp;nbsp;--pdb&quot;.&lt;/p&gt;
&lt;p&gt;(If you don&#39;t know &lt;em&gt;ipython&lt;/em&gt;, download it, install it and use it instead of the
default python for your python shell sessions, it&#39;s a day and night chance,
just the autocompletion on tab is a killer&amp;nbsp;feature).&lt;/p&gt;
&lt;p&gt;This damn simple trick has been life changing for me. Just test it and there is
great chances that you&#39;ll fall in&amp;nbsp;love.&lt;/p&gt;
&lt;h3&gt;Ipdb&lt;/h3&gt;
&lt;p&gt;Sometime you&#39;ll still need to use a pdb-like approach. But pdb seems so arid
next to ipython. Lucky we are, someone got the awesome idea to &quot;merge&quot; ipython
and&amp;nbsp;pdb!&lt;/p&gt;
&lt;p&gt;I present you: &lt;a href=&quot;http://pypi.python.org/pypi/ipdb&quot;&gt;ipdb&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just&amp;nbsp;drop:&lt;/p&gt;
&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
    import ipdb import set_trace; set_trace()
&lt;/blockquote&gt;

&lt;p&gt;where you want in your code, just like with&amp;nbsp;pdb.&lt;/p&gt;
&lt;p&gt;And for lazy Vim users with as good memory than&amp;nbsp;mine:&lt;/p&gt;
&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
    command! Ipdb norm! Ofrom ipdb import set_trace; set_trace()
&lt;/blockquote&gt;

&lt;p&gt;(Then just use the command &lt;em&gt;:Ipdb&lt;/em&gt; and this will put the desired line on the line
above your&amp;nbsp;cursor).&lt;/p&gt;
&lt;h3&gt;I want this in&amp;nbsp;django!&lt;/h3&gt;
&lt;p&gt;Lucky you are again! This is nearly as awesome as the previous trick (but not
as powerful as an ipython shell but still&amp;nbsp;awesome).&lt;/p&gt;
&lt;p&gt;Just install &lt;a href=&quot;http://packages.python.org/django-extensions/&quot;&gt;django-extensions&lt;/a&gt;
and &lt;a href=&quot;http://werkzeug.pocoo.org/&quot;&gt;werkzeug&lt;/a&gt; (pip install django-extensions
werkzeug) then&amp;nbsp;run:&lt;/p&gt;
&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
    python manage.py runserver_plus
&lt;/blockquote&gt;

&lt;p&gt;And on an exception you&#39;ll be dropped on werkzeug debugging page that allow you to
browse you code and, way more awesome, to launch a python console right there in
your browser on every part of the&amp;nbsp;stack!&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;img src=&quot;/media/img/werkzeug/screenshot.png&quot; /&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;This is also very life&amp;nbsp;changing.&lt;/p&gt;
&lt;p&gt;Make sure to look at the others features of django-extensions, some are of it are very&amp;nbsp;cool.&lt;/p&gt;
&lt;h3&gt;Bonus&lt;/h3&gt;
&lt;p&gt;Simple bash aliases that make me win so much time and make
&lt;a href=&quot;http://www.virtualenv.org/&quot;&gt;virtualenv&lt;/a&gt; way more enjoyable to&amp;nbsp;use:&lt;/p&gt;
&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
    alias mkve=&quot;virtualenv --no-site-packages --distribute ve; source ve/bin/activate&quot;
    alias ve=&quot;source ve/bin/activate&quot;
&lt;/blockquote&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>How to backup tweets from a series of twitters accounts</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2012/how-to-backup-tweets-from-a-series-of-twitters-accounts.html"/><published>2012-03-01T19:20:37Z</published><id>http://blog.worlddomination.be/blog/2012/how-to-backup-tweets-from-a-series-of-twitters-accounts.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&#39;ve recently setuped a &lt;a href=&quot;https://gitorious.org/libretweets/libretweets&quot;&gt;git repository that contains the backuped tweets&lt;/a&gt; from a
series of twitters accounts related to freesoftware, net neutrality and&amp;nbsp;opendata.&lt;/p&gt;
&lt;p&gt;Following a demand from &lt;a href=&quot;http://hugoroy.eu/&quot;&gt;Hugo Roy&lt;/a&gt; that wanted to do the same, here is a &lt;a href=&quot;https://gitorious.org/libretweets/libretweets/blobs/master/README&quot;&gt;README that explains how to do this&lt;/a&gt;.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Redirections finally done</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2012/redirections-finally-done.html"/><published>2012-01-20T00:55:55Z</published><id>http://blog.worlddomination.be/blog/2012/redirections-finally-done.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Thanks to my good old friend procrastination, I was finally forced to do
something way more boring than configuring url redirections to avoid broken
urls from my older blog engine, hurray&amp;nbsp;\o/&lt;/p&gt;
&lt;p&gt;I&#39;ll check out the 404 from the logs from time to time to see if something is&amp;nbsp;missing.&lt;/p&gt;
&lt;p&gt;On a side node, it&#39;s always a bit chilling to go through the list of 404 and to
see all the urls tried by scripts to crack random&amp;nbsp;websites.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Release of MyTemplates 0.2</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/release-of-mytemplates-02.html"/><published>2011-11-18T04:15:06Z</published><id>http://blog.worlddomination.be/blog/2011/release-of-mytemplates-02.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;The new version of MyTemplates is&amp;nbsp;out!&lt;/p&gt;
&lt;p&gt;The new feature of this release is to allow mtpl to run python scripts that
will be responsible for create a more complex template that just a single texte&amp;nbsp;file.&lt;/p&gt;
&lt;p&gt;For reminder MyTemplates is a tool to manage a collection of templates files
for coding that use git. The &lt;a href=&quot;https://github.com/Psycojoker/mytemplates&quot;&gt;current templates repository&lt;/a&gt; host for the moment
licences templates, some scripts to write irc bots, some templates for python
(ie: setup.py) and more. Feel free to submit new content (send a pull&amp;nbsp;request!).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/Psycojoker/mtpl&quot;&gt;Links and source&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can also find it on &lt;a href=&quot;http://pypi.python.org/pypi/mtpl/0.2&quot;&gt;pypi&lt;/a&gt;.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Version 0.2 of the PipeToolKit</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/version-0.2-of-the-pipetoolkit.html"/><published>2011-11-02T02:29:12Z</published><id>http://blog.worlddomination.be/blog/2011/version-0.2-of-the-pipetoolkit.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&#39;m proud to announce you a new release of the&amp;nbsp;PipeToolKit.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;/projects/pipetk.html&quot;&gt;PipeToolKit&lt;/a&gt; is a
collection of small utilities to play with unix pipes and write new one. I use
it a lot with ii, feedstail and other utilities to build &lt;a href=&quot;/projects/ungarage.html&quot;&gt;highly customizable
irc bots&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&#39;ve also add some documentation on the python template class I use to build
those utils in the case you want to code your&amp;nbsp;owns.&lt;/p&gt;
&lt;p&gt;Installation:&lt;/p&gt;
&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
    pip install pipetk
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://pypi.python.org/pypi/PipeTK&quot;&gt;The pypi page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/Psycojoker/pipetk&quot;&gt;Code&lt;/a&gt;!&lt;/p&gt;
&lt;h3&gt;Changelog&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;pdetinyfy now works for urls inside a&amp;nbsp;string&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;new script: puniqrt to try to eliminate duplications for&amp;nbsp;tweets&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;new template to build pipes utils that works on the urls of a&amp;nbsp;string&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;add premoveurls as en example script for the new&amp;nbsp;template&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;new script: pcleanurls to remove useless tracking pieces of urls (like utm_*&amp;nbsp;stuff)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;various bug&amp;nbsp;fixs&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;add doc on how to write new pipe&amp;nbsp;utils&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>First release of mtpl</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/first_release_of_mtpl.html"/><published>2011-11-01T02:25:24Z</published><id>http://blog.worlddomination.be/blog/2011/first_release_of_mtpl.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&#39;m proud to announce you the first release of mtpl (as in MyTemplates). This
is a very simple program that aim to manage a collection of various templates
files for&amp;nbsp;scripts/licencing/code.&lt;/p&gt;
&lt;p&gt;Bored of constantly copypasting the gpl/setup.py/cool shell script from the
web/your matchin project? Mtpl aim to fix this by providing a simple and
straightforward cli interface. Git is used for storing&amp;nbsp;files.&lt;/p&gt;
&lt;p&gt;All the details can be found on the &lt;a href=&quot;http://pypi.python.org/pypi/mtpl&quot;&gt;pypi page&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Installation&lt;/p&gt;
&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
    pip install mtpl
&lt;/blockquote&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>All old content up again \o/</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/all_old_content_up_again.html"/><published>2011-10-30T16:05:34Z</published><id>http://blog.worlddomination.be/blog/2011/all_old_content_up_again.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Yay&amp;nbsp;\o/&lt;/p&gt;
&lt;p&gt;As the title say it, I&#39;ve reupload everything and I&#39;ve corrected the broken
links to match this new blog&amp;nbsp;engine.&lt;/p&gt;
&lt;p&gt;Now I just need to do the correct redirections because cool urls doesn&#39;t&amp;nbsp;change.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Re-uploading of old content</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/reuploading-of-old-content.html"/><published>2011-10-06T03:03:58Z</published><id>http://blog.worlddomination.be/blog/2011/reuploading-of-old-content.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Small post to talk about my progress in reuploading the content of my old&amp;nbsp;blog.&lt;/p&gt;
&lt;p&gt;I&#39;ve reuploading all my old blog posts (minus some crap ones) and a part of the
static pages. There is still work to do but most of the more importants parts
are&amp;nbsp;here.&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Hello World!</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/hello_world.html"/><published>2011-09-16T01:44:43Z</published><id>http://blog.worlddomination.be/blog/2011/hello_world.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Hello world again. After too much down time I&#39;m recreating this website. I&#39;ve moved to the &lt;a href=&quot;http://ringce.com/hyde&quot;&gt;hyde&lt;/a&gt; static website generator. It&#39;s pretty neat and simple and it uses the django template&amp;nbsp;engine.&lt;/p&gt;
&lt;p&gt;I&#39;m going to re-up progressively all the previous content and try to restore all urls (cool urls don&#39;t change!) but I&#39;m quite busy for the moment so this will be&amp;nbsp;incremental.&lt;/p&gt;
&lt;p&gt;Thanks again to &lt;a href=&quot;http://hobbestigrou.interface-c.com/&quot;&gt;Hobbestigrou&lt;/a&gt; for his help and the&amp;nbsp;hosting.&lt;/p&gt;
&lt;p&gt;Cheer,&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>FeedsTail 0.2 - python 2.5 compatibility</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/feedstail-02-python-25-compatibility.html"/><published>2011-04-28T06:58:20Z</published><id>http://blog.worlddomination.be/blog/2011/feedstail-02-python-25-compatibility.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;A small post to said that &lt;a href=&quot;http://identi.ca/rgauthier&quot;&gt;Romain&lt;/a&gt; and I just released a new version of &lt;a href=&quot;/projects/feedstail.html&quot;&gt;FeedsTail&lt;/a&gt; that is compatible with python&amp;nbsp;2.5.&lt;/p&gt;

&lt;p&gt;Note that the formating format is the &lt;a href=&quot;http://docs.python.org/release/2.5.2/lib/typesseq-strings.html&quot;&gt;one of python 2.5&lt;/a&gt;. So you&#39;ll have to do something like&amp;nbsp;this:&lt;/p&gt;

&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
feedstail -u http://reddit.com/.rss -f &quot;%(title)s - %(link)s&quot;
&lt;/blockquote&gt;

&lt;p&gt;Except additional releases in the next&amp;nbsp;days.&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>First release of FeedsTail</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/release-first-release-of-feedstail.html"/><published>2011-04-26T12:50:10Z</published><id>http://blog.worlddomination.be/blog/2011/release-first-release-of-feedstail.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Ohai, I&#39;m proud to announce you the first release of &lt;a href=&quot;/projects/feedstail.html&quot;&gt;FeedsTail&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The aim of this program is to read and display a RSS/Atom feed and to display it like a &lt;em&gt;tail -f&lt;/em&gt; would do it on a file. This behavior allow a lot of &lt;a href=&quot;/projects/ungarage.html&quot;&gt;stream scripting&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For those who already know it, Feedstail is a python clone of &lt;a href=&quot;http://www.vanheusden.com/rsstail/&quot;&gt;rsstail&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The main differences&amp;nbsp;are:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;a much more smaller code base (thanks to python) that allow it to be much more easier to&amp;nbsp;hack&lt;/li&gt;
    &lt;li&gt;a much more powerful output formatting capacity (but more complicated to use, it plays with the &lt;em&gt;.format&lt;/em&gt; function of&amp;nbsp;python)&lt;/li&gt;
    &lt;li&gt;the ability to choose any element of the feed as the unique key (therefore avoid displaying an old item only because the title has&amp;nbsp;changed)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can find all the technical details and how to install it on the &lt;a href=&quot;http://pypi.python.org/pypi/feedstail&quot;&gt;pypi page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thanks to the excellent &lt;a href=&quot;http://feedparser.org/&quot;&gt;feedpaser&lt;/a&gt; library, Feedstail is already very stable. It won&#39;t crash on disconnections or XML errors. If the feed structure doesn&#39;t change and your formating string (the &lt;em&gt;-f&lt;/em&gt; option) doesn&#39;t rely on elements that may not be presents you can expect feedstail to run safely for severals days. But it&#39;s still the first release so don&#39;t hesitate to send bug&amp;nbsp;report!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;p&gt;Feedstail is coded by &lt;a href=&quot;http://identi.ca/rgauthier&quot;&gt;Romain Gauthier&lt;/a&gt; on my demand to solve some problems for &lt;a href=&quot;http://laquadrature.net&quot;&gt;La Quadrature du Net&lt;/a&gt;. Thanks to&amp;nbsp;him!&lt;/p&gt;&lt;/em&gt;&lt;/p&gt;
&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>HolyCurse 0.1</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/release-holycurse-01.html"/><published>2011-04-17T00:06:15Z</published><id>http://blog.worlddomination.be/blog/2011/release-holycurse-01.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Ohai, &lt;/p&gt;

&lt;p&gt;I&#39;m proud to announce the first release of HolyCurse, a ncurses interface to &lt;a href=&quot;/projects/holygrail.html&quot;&gt;HolyGrail&lt;/a&gt; my &lt;a href=&quot;http://en.wikipedia.org/wiki/GTD&quot;&gt;GTD&lt;/a&gt;&amp;nbsp;lib.&lt;/p&gt;

&lt;p&gt;Traditionnal&amp;nbsp;screenshot:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Being a first release, not all the feature of holygrail.html are supported. This doesn&#39;t prevent me from using it daily. Here is a list of the&amp;nbsp;features:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;ncurse interface with a bunch of vim&amp;nbsp;spirit&lt;/li&gt;
    &lt;li&gt;include documentation for all the commands, press&amp;nbsp;&quot;?&quot;&lt;/li&gt;
    &lt;li&gt;support missions (todos), realms (contexts) and quests (projects) in a minimalist&amp;nbsp;way&lt;/li&gt;
    &lt;li&gt;missions can be: created in various ways, tickled (limited options), deleted, renamed, due (limited options), toggled, completed and recreated, transform into a new quest, assigned to a quest and changed of&amp;nbsp;realm&lt;/li&gt;
    &lt;li&gt;when a mission include in a quest is completed, the user is asked to enter the next mission&amp;nbsp;description&lt;/li&gt;
    &lt;li&gt;display a &quot;|&quot; for each week has passed since the creation of a&amp;nbsp;mission&lt;/li&gt;
    &lt;li&gt;realms can be: created, hide, renamed and have their positions&amp;nbsp;changed&lt;/li&gt;
    &lt;li&gt;display the super main&amp;nbsp;view&lt;/li&gt;
    &lt;li&gt;display a realm&amp;nbsp;view&lt;/li&gt;
    &lt;li&gt;is full of data love and&amp;nbsp;magic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hope you&#39;ll loved hit. Don&#39;t hesitate to &lt;a href=&quot;/about/about.html&quot;&gt;send me feedback/bugs reports&lt;/a&gt;.&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>HolyGrail 0.2 Perceval</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/release-holygrai-02-perceval.html"/><published>2011-04-06T16:55:42Z</published><id>http://blog.worlddomination.be/blog/2011/release-holygrai-02-perceval.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&#39;m proud to announce you the release of &lt;a href=&quot;http://pypi.python.org/pypi/HolyGrail/0.2.Perceval&quot;&gt;the version 0.2&lt;/a&gt; of &lt;a href=&quot;/projects/holygrail.html&quot;&gt;HolyGrail&lt;/a&gt;, my next actions list management&amp;nbsp;library.&lt;/p&gt;

&lt;p&gt;You can downloaded it &lt;a href=&quot;http://pypi.python.org/packages/source/H/HolyGrail/HolyGrail-0.2.Perceval.tar.gz#md5=ecd2b94ac1317788f0f56d8d37e7c50c&quot;&gt;here&lt;/a&gt; or via&amp;nbsp;pypi:&lt;/p&gt;

&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
sudo easy_install -U holyview
&lt;/blockquote&gt;

&lt;p&gt;Since this new version introduce modification in the API and therefore possible incompatibility with previous code design for the previous version of the lib, I&#39;ve decide to move from 0.1.* to&amp;nbsp;0.2.*.&lt;/p&gt;

&lt;p&gt;Changelog:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API change: now every list_* methods return a generator, not a list. This increase the&amp;nbsp;performances.&lt;/li&gt;
&lt;li&gt;API change: last_completed_missions return only 5 missions by default, an argument can increase this&amp;nbsp;number&lt;/li&gt;
&lt;li&gt;fix a bug with quest and realm &quot;get_missions&quot; method that won&#39;t return any missions if the quest/realm is&amp;nbsp;hidden&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a short summary, HolyGrail is a library designed to manage a list of next actions (a todo list) in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Getting_Things_Done&quot;&gt;GTD&lt;/a&gt;&#39;s way. I&#39;ve chosen to write a documented library to offer everyone the possibility to write it&#39;s own interface instead of imposing mine. The organisation of the actions are in the GTD&#39;s way: todos are group in contexts (realms) and can me member of a project&amp;nbsp;(quest).&lt;/p&gt;

&lt;p&gt;I&#39;m planning to release shortly (lulz) an ncurse interface for HolyGrail. I just want to finish some things before (having a browsable&amp;nbsp;help).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/projects/holygrail.html&quot;&gt;More&amp;nbsp;informations&lt;/a&gt;&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>An epurate ebook (epub) reader for your pc</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/ebook-epub-reader-your-pc.html"/><published>2011-03-20T01:16:17Z</published><id>http://blog.worlddomination.be/blog/2011/ebook-epub-reader-your-pc.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;From time to time I like to be able to read e-books (epub/mobi) on my pc. I wasn&#39;t satisfied by fbreader. The interface and customisations possibility are really cools, but the rendering kinda sucks (and doesn&#39;t works well for &amp;lt;span&amp;gt; tags that contain source code, this make unreadable most of my home made programming&amp;nbsp;e-books).&lt;/p&gt;

&lt;p&gt;After some research I&#39;ve found &lt;a href=&quot;http://www.lucidor.org/lucidor/&quot;&gt;lucidor&lt;/a&gt;. Doesn&#39;t look fantastic from a first view but the rendering is&amp;nbsp;good.&lt;/p&gt;

&lt;p&gt;&lt;center&gt;
&lt;img src=&quot;/media/img/lucidor/lucidor1.png&quot; /&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;Problem: I wanted to have a dark background and a grey font and the configuration options doesn&#39;t offer that possibility. Solution: use the power of dirty hack &lt;em&gt;and voilà&lt;/em&gt;, here is the&amp;nbsp;result:&lt;/p&gt;

&lt;p&gt;&lt;center&gt;
&lt;a href=&quot;/media/img/lucidor/lucidor2.png&quot; /&gt;
&lt;img src=&quot;/media/img/lucidor/lucidor2_small.png&quot; /&gt;
&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;And after some customisations (using the menu from the right mouse&amp;nbsp;button):&lt;/p&gt;

&lt;p&gt;&lt;center&gt;
&lt;a href=&quot;/media/img/lucidor/lucidor3.png&quot; /&gt;
&lt;img src=&quot;/media/img/lucidor/lucidor3_small.png&quot; /&gt;
&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;And the diffs for my dirty hack. On the file: &lt;em&gt;/usr/share/lucidor/chrome/content/xhtml.css&lt;/em&gt;:&lt;/p&gt;

&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;4c4, 6&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdead&quot;&gt;&amp;lt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #ffffff;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdead&quot;&gt;---&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#98fb98&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #000000;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#98fb98&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #BBBBBB;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;14c16&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdead&quot;&gt;&amp;lt; /*&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdead&quot;&gt;---&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#98fb98&quot;&gt;&amp;gt; &lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;16c18&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdead&quot;&gt;&amp;lt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #ffffff;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdead&quot;&gt;---&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#98fb98&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #000000;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;18c20&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdead&quot;&gt;&amp;lt; */&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdead&quot;&gt;---&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#98fb98&quot;&gt;&amp;gt; &lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;20a23&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#98fb98&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #000000;&lt;/font&gt;&lt;br&gt;
&lt;/blockquote&gt;

&lt;p&gt;And on &lt;em&gt;/usr/share/lucidor/chrome/content/ordbrand.css&lt;/em&gt;:&lt;/p&gt;

&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;7c7, 8&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdead&quot;&gt;&amp;lt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #ffffff !important;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdead&quot;&gt;---&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#98fb98&quot;&gt;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #000000 !important;&lt;/font&gt;&lt;br&gt;
&lt;/blockquote&gt;

&lt;p&gt;This still isn&#39;t perfect: I didn&#39;t managed to find a way to add &quot;j&quot; and &quot;k&quot; for&amp;nbsp;scrolling.&lt;/p&gt;

&lt;p&gt;Also, I&#39;ve made a simple mobi/epub version of the &lt;a href=&quot;http://djangobook.com&quot;&gt;DjangoBook&lt;/a&gt; that you can find &lt;a href=&quot;/media/ebooks/djangobook.mobi&quot;&gt;here&lt;/a&gt; (&lt;a href=&quot;/media/ebooks/djangobook.epub&quot;&gt;epub version&lt;/a&gt;). It doesn&#39;t include images (it was boring to&amp;nbsp;do).&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Small dirty script to transform the core of a web page into a .mobi</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/small-dirty-script-transform-core-web-page-mobi.html"/><published>2011-03-12T15:57:49Z</published><id>http://blog.worlddomination.be/blog/2011/small-dirty-script-transform-core-web-page-mobi.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&#39;m the owner of a Kindle. This little (non free :/) piece of hardware has quite changed my life. I now want to read everything on it. Especially long web articles. So, I&#39;ve written a small script that extract the core information of a web page then transform the result into a mobipocket&amp;nbsp;file.&lt;/p&gt;

&lt;p&gt;This script combine two tools: &lt;a href=&quot;http://www.minvolai.com/blog/decruft-arc90s-readability-in-python/&quot;&gt;decruft&lt;/a&gt; (a python implementation of the &lt;a href=&quot;https://www.readability.com/&quot;&gt;readability&lt;/a&gt; core algorithm) and ebook-convert, a tool supplied by &lt;a href=&quot;http://calibre-ebook.com/&quot;&gt;calibre&lt;/a&gt; (it&#39;s in the pkg &quot;calibre-bin&quot;). I glued everything with some dirty bash, &lt;i&gt;and voilà&lt;/i&gt;.&lt;/p&gt;

&lt;p&gt;The result code is quite horrible (and buggy in some places) but is good enough for my needs. Despise this dirty aspect I release it anyway, maybe it will be useful for someone or, even better, maybe someone will code a better&amp;nbsp;version.&lt;/p&gt;

&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
&lt;font color=&quot;#87ceeb&quot;&gt;#!/bin/bash&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&lt;font color=&quot;#98fb98&quot;&gt;mobify()&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#98fb98&quot;&gt;{&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#87ceeb&quot;&gt;# decruft don&#39;t create correct headers :(&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#87ceeb&quot;&gt;# also grab the title of the webpage using python&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;echo&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;&lt;/font&gt;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;$(&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffdead&quot;&gt;python -c &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;from mechanize import Browser;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;b = Browser(); b.open(&#39;&lt;/font&gt;&lt;font color=&quot;#cd5c5c&quot;&gt;$1&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&#39;); print b.title()&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/body&amp;gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;.tmp.html&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;decruft.py &lt;font color=&quot;#ffdead&quot;&gt;-u&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#cd5c5c&quot;&gt;$1&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;.tmp.html&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;echo&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;.tmp.html&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#87ceeb&quot;&gt;# remove some useless stuff that decruft don&#39;t remove&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sed &lt;font color=&quot;#ffdead&quot;&gt;-i&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;s/&amp;lt;p [^&amp;gt;]\\+&amp;gt;/&amp;lt;p&amp;gt;/g&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;.tmp.html&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#87ceeb&quot;&gt;# download images to includes them in the mobi file (ebook-convert do that automatically)&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#87ceeb&quot;&gt;# (I&#39;m pretty sure wget can do this in a much better way)&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#87ceeb&quot;&gt;# for every images&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;for &lt;/b&gt;&lt;/font&gt;i &lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;in&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;$(&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffdead&quot;&gt;grep &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;lt;img&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;.tmp.html &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;sed &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;s/.*src=&amp;quot;\\([^&amp;quot;]\\+\\)&amp;quot;.*/\\1/g&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;sort &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;uniq&lt;/font&gt;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;do&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#87ceeb&quot;&gt;# if I&#39;m a direct url&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;if &lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;$(&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffdead&quot;&gt;python -c &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;print &#39;&lt;/font&gt;&lt;font color=&quot;#cd5c5c&quot;&gt;$i&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&#39;.startswith(&#39;http://&#39;)&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;==&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;quot;True&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wget &lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#cd5c5c&quot;&gt;$i&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#87ceeb&quot;&gt;# add the beginning of the website name to create a complete url&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#87ceeb&quot;&gt;# I&#39;m pretty sure this part is buggy, the $() probably inject caracters interpreted by sed&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wget &lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;$(&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffdead&quot;&gt;echo &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#cd5c5c&quot;&gt;$i&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;sed &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;s/^/&lt;/font&gt;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;$(&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffdead&quot;&gt;echo &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#cd5c5c&quot;&gt;$1&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;sed &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;s#http://##&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;sed &lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;s#/*##&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdead&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;done&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#87ceeb&quot;&gt;# change the url in the &amp;lt;img src=&amp;quot;&amp;quot; /&amp;gt; to point it to the current folder&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sed &lt;font color=&quot;#ffdead&quot;&gt;-i&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;s/src=&amp;quot;[^&amp;quot;]*\\//src=&amp;quot;/g&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;.tmp.html&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ebook-convert .tmp.html mobi/&lt;font color=&quot;#cd5c5c&quot;&gt;$2&lt;/font&gt;.mobi&lt;br&gt;
&lt;font color=&quot;#98fb98&quot;&gt;}&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&lt;font color=&quot;#87ceeb&quot;&gt;# arg parsing&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;if &lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#cd5c5c&quot;&gt;$1&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;if &lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#cd5c5c&quot;&gt;$2&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;if &lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;-e&lt;/b&gt;&lt;/font&gt;&amp;nbsp;mobi/&lt;font color=&quot;#cd5c5c&quot;&gt;$1&lt;/font&gt;.mobi &lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;if &lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#cd5c5c&quot;&gt;$3&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;if &lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#cd5c5c&quot;&gt;$3&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;==&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;quot;force&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mobify &lt;font color=&quot;#cd5c5c&quot;&gt;$1&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#cd5c5c&quot;&gt;$2&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;echo&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;add &amp;quot;force&amp;quot; as last args&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;echo&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;add &amp;quot;force&amp;quot; as last args&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mobify &lt;font color=&quot;#cd5c5c&quot;&gt;$1&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#cd5c5c&quot;&gt;$2&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;echo&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa0a0&quot;&gt;Usage: &amp;lt;url&amp;gt; &amp;lt;filename (without extension)&amp;gt; [force]&lt;/font&gt;&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f0e68c&quot;&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;
&lt;/blockquote&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Release: HolyView version 0.1</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2011/release-holyview-version-01.html"/><published>2011-02-24T09:48:29Z</published><id>http://blog.worlddomination.be/blog/2011/release-holyview-version-01.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&#39;m proud to announce you the first release of&amp;nbsp;HolyView.&lt;/p&gt;

&lt;p&gt;HolyView is a ncurse tool design for long term organisation. It&#39;s purpose is to help you chose what to do now to be the most effective in the long term. It is based on a time management approach describe by Stephen Covey. It&#39;s interface is sort of&amp;nbsp;vim-ish.&lt;/p&gt;

&lt;p&gt;The principle is simple: take a set of things or sector in which you want to invest yourself (code project, studies, work, saving the world, building a huge lazor, family...). Sort them by importance, then sort them by urgency. Now you can classify them in 4 categories: urgent and import, import, urgent, non-urgent and non-important. In an ideal world you should only focus on important things. Also on important and urgent things, but the purpose on focusing on important things is to complete them before they became urgent. The two others categories should be&amp;nbsp;ignored.&lt;/p&gt;

&lt;p&gt;HolyView specific concept: you can add &quot;points&quot; to a thing. I do this when I have worked on this thing.  The date a point is add is stored, this will allow the creation of monitoring graphics will be&amp;nbsp;easy.&lt;/p&gt;

&lt;p&gt;You can also mark as completed a thing, this will hide it from the list and won&#39;t show it by&amp;nbsp;default.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/First_Things_First_(book)&quot;&gt;More details on this time management method&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Screenshots:&lt;/p&gt;

&lt;p&gt;&lt;center&gt;
&lt;img src=&quot;/media/img/holyview/holyview1.png&quot; /&gt;
&lt;br&gt;&lt;br&gt;
&lt;img src=&quot;/media/img/holyview/holyview2.png&quot; /&gt;
&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;Installation: &lt;em&gt;sudo python setup.py&amp;nbsp;install&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;HolyView is also available on pypi: &lt;em&gt;sudo easy_install&amp;nbsp;holyview&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Dependencies: louie and urwid (at least&amp;nbsp;0.9.9)&lt;/p&gt;

&lt;p&gt;Data are stored using&amp;nbsp;cPickle.&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>.mobi version of Learn You Haskell for Great Good!</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/mobi-version-learn-you-haskell-great-good.html"/><published>2010-12-27T16:11:07Z</published><id>http://blog.worlddomination.be/blog/2010/mobi-version-learn-you-haskell-great-good.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&amp;#8217;ve just created a .mobi version (for kindle) of &lt;a href=&quot;http://learnyouahaskell.com/&quot;&gt;Learn You Haskell for Great Good!&lt;/a&gt; book,
 you can find all the details &lt;a href=&quot;/projects/lyhfgg.html&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>How to build your own statusnet/twitter client with an irc bot + a way to pipe a RSS feed to a status.net/twitter account</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/how-build-your-own-statusnettwitter-client-irc-bot-way-pipe-rss-feed-statusnettwitter-account.html"/><published>2010-12-04T18:28:17Z</published><id>http://blog.worlddomination.be/blog/2010/how-build-your-own-statusnettwitter-client-irc-bot-way-pipe-rss-feed-statusnettwitter-account.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&amp;#8217;ve just finished writing a guide on how to build your own status.net/twitter client using only few lines&amp;nbsp;of&amp;nbsp;bash.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/projects/ungarage.html&quot;&gt;Here&amp;nbsp;it&amp;nbsp;is.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bonus: include an easy way to pipe a &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt; feed to a&amp;nbsp;microblogging&amp;nbsp;account.&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Readabilty, make the web readable again</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/readabilty-make-web-readable-again.html"/><published>2010-10-09T16:18:18Z</published><id>http://blog.worlddomination.be/blog/2010/readabilty-make-web-readable-again.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&#39;ve just discover &lt;a href=&quot;http://lab.arc90.com/experiments/readability&quot;&gt;readability&lt;/a&gt;, a bookmarklet that clean a web page to only display the text in a very lisible format. I was something I was looking since a long&amp;nbsp;time.&lt;/p&gt;

&lt;p&gt;Here is a example with my&amp;nbsp;configuration:&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;p&gt;&lt;a href=&quot;/media/img/readability/readability_before.png&quot;&gt;&lt;img src=&quot;/media/img/readability/readability_before_small.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;b&gt;&lt;p&gt;Before&lt;/p&gt;&lt;/b&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;p&gt;&lt;a href=&quot;/media/img/readability/readability_after.png&quot;&gt;&lt;img src=&quot;/media/img/readability/readability_after_small.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;&lt;center&gt;&lt;b&gt;&lt;p&gt;After&lt;/p&gt;&lt;/b&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;To install it, you can simply follow the instructions in the (in flash, meh.) video on the &lt;a href=&quot;http://lab.arc90.com/experiments/readability&quot;&gt;readability website&lt;/a&gt;. But, if you are using &lt;a href=&quot;http://vimperator.org/&quot;&gt;vimperator&lt;/a&gt;, here is simple manipulation to integrate&amp;nbsp;it:&lt;/p&gt;

&lt;p&gt;Go into your &lt;em&gt;~/.vimperator/plugin/&lt;/em&gt; (or create it if you don&#39;t have it),&amp;nbsp;then:&lt;/p&gt;

&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
wget http://github.com/ervandew/vimfiles/raw/master/vimperator/plugin/readability.js
&lt;/blockquote&gt;

&lt;p&gt;(Found &lt;a href=&quot;http://github.com/ervandew/vimfiles/&quot;&gt;here&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Open the script, read a little bit to know the options you want and add them into your &lt;em&gt;~/.vimperatorrc&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Here are&amp;nbsp;mines:&lt;/p&gt;

&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
    javascript readabilityStyle = &quot;apertura&quot;&lt;br /&gt;
    javascript readabilitySize = &quot;large&quot;&lt;br /&gt;
    javascript readabilityMargin = &quot;wide&quot;&lt;br /&gt;
    javascript readabilityBackground = &quot;#000&quot;&lt;br /&gt;
    javascript readabilityColor = &quot;#aaa&quot;&lt;br /&gt;
&lt;/blockquote&gt;

&lt;p&gt;To finish, restart&amp;nbsp;firefox.&lt;/p&gt;

&lt;p&gt;The command is &lt;em&gt;:readability&lt;/em&gt;. You can also add a&amp;nbsp;map:&lt;/p&gt;

&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
    :map v :readability&amp;lt;cr&amp;gt;
&lt;/blockquote&gt;

&lt;p&gt;(&lt;em&gt;v, &lt;/em&gt; isn&#39;t used by&amp;nbsp;vimperator)&lt;/p&gt;

&lt;p&gt;I was looking to recreate my terminal appearance. I found it pleasant for my&amp;nbsp;eyes.&lt;/p&gt;

&lt;p&gt;I&#39;m happy to see that readability doesn&#39;t nearly change anything on my website. It nearly create the css I would have done if I wasn&#39;t so&amp;nbsp;lazy.&lt;/p&gt;

&lt;p&gt;Hope you&#39;ll enjoy this&amp;nbsp;script.&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>First release of HolyGrail, 0.1 Galahad</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/first-release-holygrail-01-galahad.html"/><published>2010-10-08T11:49:58Z</published><id>http://blog.worlddomination.be/blog/2010/first-release-holygrail-01-galahad.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Ohai, &lt;/p&gt;

&lt;p&gt;I am proud to announce you the first release of HolyGrail ! This is the version 0.1 Galahad (knights of the round&amp;nbsp;table&amp;nbsp;!).&lt;/p&gt;

&lt;p&gt;But, what is HolyGrail ? It&amp;#8217;s an hight level lib to manage the holy quest of your life ! In other words, it&amp;#8217;s an hight level lib to manage a next actions list (organisation, todo etc&amp;#8230;) in the sens of the &lt;a href=&quot;http://en.wikipedia.org/wiki/GTD&quot;&gt;&lt;span class=&quot;caps&quot;&gt;GTD&lt;/span&gt;&lt;/a&gt;. This way you can easily build your own interface, switch from different interface and&amp;nbsp;write&amp;nbsp;scripts.&lt;/p&gt;

&lt;p&gt;This first&amp;nbsp;release&amp;nbsp;manage:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;missions (todos) with description, tickler, due date, wait for previous missions, tags, creation and completion date&amp;nbsp;and&amp;nbsp;other.&lt;/li&gt;
    &lt;li&gt;quests (projects) with description, completion, creation/completion date, due date, hide possibility and other. A quest is composed&amp;nbsp;of&amp;nbsp;missions.&lt;/li&gt;
    &lt;li&gt;realms (contexts) with description, creation date, hide possibility, position organisation and other. A realms is a group&amp;nbsp;of&amp;nbsp;missions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a more complete description of HolyGrail (with links to documentations, code, pypi etc&amp;#8230;) go &lt;a href=&quot;/projects/holygrail.html&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can install HolyGrail via &lt;a href=&quot;http://pypi.python.org/pypi/HolyGrail/&quot;&gt;pypi&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
easy_install holygrail
&lt;/blockquote&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Oh noes, the Internet invades my frat&#39;s local!</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/oh-noes-internet-invades-my-frats-local.html"/><published>2010-10-03T01:24:37Z</published><id>http://blog.worlddomination.be/blog/2010/oh-noes-internet-invades-my-frats-local.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;We have just finished to repaint our fraternity local. Here are some of&amp;nbsp;the&amp;nbsp;results:&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;a href=&quot;/media/img/painting/loituma.jpg&quot;&gt;&lt;img src=&quot;/media/img/painting/loituma_small.jpg&quot; alt=&quot;loituma&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;My&amp;nbsp;last&amp;nbsp;work.&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;a href=&quot;/media/img/painting/worms.jpg&quot;&gt;&lt;img src=&quot;/media/img/painting/worms_small.jpg&quot; alt=&quot;worms&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;From a friend of mine, here also made the&amp;nbsp;initial&amp;nbsp;drawing.&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;a href=&quot;/media/img/painting/dott.jpg&quot;&gt;&lt;img src=&quot;/media/img/painting/dott_small.jpg&quot; alt=&quot;dott&quot; /&gt;&lt;/a&gt;&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;This one is a bit old, by me and&amp;nbsp;a&amp;nbsp;friend.&lt;/p&gt;

&lt;p&gt;Come to drink a beer&amp;nbsp;with&amp;nbsp;us!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://imgur.com/a/uuVYJ/BCqrS&quot;&gt;More&amp;nbsp;pics&lt;/a&gt;&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Eliminate duplications through a bash pipe</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/programme-eliminate-duplication-threw-pip.html"/><published>2010-09-27T21:16:44Z</published><id>http://blog.worlddomination.be/blog/2010/programme-eliminate-duplication-threw-pip.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Problem:&lt;br /&gt;
I receive data from a continuous stream (a tail -f or rsstail output for example). I want to remove duplications. &lt;em&gt;| sort | uniq&lt;/em&gt; won&#39;t work since it&#39;s a non-ending stream (and I don&#39;t want to sort them). So much&amp;nbsp;drama.&lt;/p&gt;

&lt;p&gt;Solution:
Launch Vim and&amp;nbsp;code.&lt;/p&gt;

&lt;p&gt;Result,&amp;nbsp;tadaaa:&lt;/p&gt;

&lt;blockquote  style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
&lt;font color=&quot;#ffdfad&quot;&gt;#!/usr/bin/python&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt;&amp;nbsp;sys&lt;br&gt;
&lt;br&gt;
anti_doublons &lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;set&lt;/b&gt;&lt;/font&gt;()&lt;br&gt;
a &lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&amp;nbsp;sys.stdin.readline()&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;while&lt;/b&gt;&lt;/font&gt;&amp;nbsp;a:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;a &lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;not&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;in&lt;/b&gt;&lt;/font&gt;&amp;nbsp;anti_doublons:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys.stdout.write(a)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys.stdout.flush()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;anti_doublons.add(a)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;a &lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&amp;nbsp;sys.stdin.readline()&lt;br&gt;
&lt;/font&gt;
&lt;/blockquote&gt;

&lt;p&gt;(I will create a pipe/stream toolkit to distribute all this kind of stuff to play with bash pipe in the next&amp;nbsp;days).&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Some data pr0n about the Gallo&#39;s report and the wd12</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/some-data-pr0n-about-gallos-reptort-and-wd12.html"/><published>2010-09-25T08:26:46Z</published><id>http://blog.worlddomination.be/blog/2010/some-data-pr0n-about-gallos-reptort-and-wd12.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;I&amp;#8217;m becoming more and more addict to data pr0n threw time. My last victim is the &lt;a href=&quot;https://www.laquadrature.net/en/red-alert-on-net-freedoms-meps-shall-reject-the-gallo-report&quot;&gt;Gallo report&lt;/a&gt;. It sadly have &lt;a href=&quot;https://www.laquadrature.net/en/gallo-report-adopted-a-stab-in-the-back-of-citizens-freedoms&quot;&gt;been adopt&lt;/a&gt;. It basically prepare the field in Europe for &lt;a href=&quot;https://www.laquadrature.net/en/ACTA&quot;&gt;&lt;span class=&quot;caps&quot;&gt;ACTA&lt;/span&gt;&lt;/a&gt; (&lt;a href=&quot;http://en.wikipedia.org/wiki/Anti-Counterfeiting_Trade_Agreement&quot;&gt;wikipedia&lt;/a&gt;). Since the written declaration 12 against &lt;span class=&quot;caps&quot;&gt;ACTA&lt;/span&gt; have just been adopt, I was interested in how much MEPs were schizophrenic enough the sign the wd12 and vote for the&amp;nbsp;Gallo&amp;#8217;s&amp;nbsp;report.&lt;/p&gt;

&lt;p&gt;Here is the first graphic. A comparison between Gallo&amp;#8217;s report vote and the wd12 signatories,&amp;nbsp;party&amp;nbsp;oriented:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/media/img/gallo/gallo-wd12.png&quot;&gt;&lt;img src=&quot;/media/img/gallo/gallo-wd12_small.png&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A more general one about the Gallo&amp;#8217;s report vote (abstention&amp;nbsp;aren&amp;#8217;t&amp;nbsp;showed):&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/img/gallo/gallo.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And countries oriented graphics (abstention&amp;nbsp;in&amp;nbsp;grey):&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/img/gallo/gallo-pays.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/img/gallo/gallo-pays-absolu.png&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you want to made an analyse you can take a look at &lt;a href=&quot;http://www.laquadrature.net/wiki/Written_Declaration_12/2010_signatories_list&quot;&gt;wd12 graphics&lt;/a&gt; and &lt;a href=&quot;/media/img/gallo/wd29-graph.png&quot;&gt;wd29 (against internet) graphics&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A detailed comparison list between wd12 and Gallo&amp;#8217;s report can be found &lt;a href=&quot;http://www.laquadrature.net/wiki/Gallo_stats&quot;&gt;here&lt;/a&gt; but it is not intent to be spread (understand: this is quick&amp;#8217;n&amp;nbsp;dirty&amp;nbsp;work).&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Your own rss-irc chan</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/your-own-rss-irc-chan.html"/><published>2010-09-05T00:45:33Z</published><id>http://blog.worlddomination.be/blog/2010/your-own-rss-irc-chan.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;This is my new invention to lose time (I&#39;ve made an expertise about&amp;nbsp;that).&lt;/p&gt;

&lt;p&gt;The principle is simple: you have an irc chan with a bot and a simple command &lt;em&gt;!rss&lt;/em&gt;. You pass the uri of a rss and it will be now monitored and display on this chan. I&#39;ve made this to have a news oriented irc&amp;nbsp;chan.&lt;/p&gt;

&lt;p&gt;You&#39;ll need &lt;a href=&quot;http://tools.suckless.org/ii&quot;&gt;ii&lt;/a&gt; and &lt;a href=&quot;http://www.vanheusden.com/rsstail/&quot;&gt;rsstail&lt;/a&gt;. Set up the ii to put it on an irc chan (I&#39;ve personally set up my own irc&amp;nbsp;server).&lt;/p&gt;

&lt;p&gt;Here is a script to launch and relaunch your&amp;nbsp;ii:&lt;/p&gt;

&lt;blockquote style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
&lt;font color=&quot;#84cfef&quot;&gt;#!/bin/bash&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;while &lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;true&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;do&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;(&lt;/b&gt;&lt;/font&gt;sleep &lt;font color=&quot;#ffa2a5&quot;&gt;7&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;echo&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;/j #mychan&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;gt;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;irc/irc.server.net/in&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;amp;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;./ii \\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-i&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;irc&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;\\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-s&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;irc.server.net&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;\\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-p&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;6667&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;\\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-n&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;mybotname&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;\\&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-f&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;mybotname&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;done&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;/font&gt;
&lt;/blockquote&gt;

&lt;p&gt;Once everything is in place here is the (dirty) script to add the &lt;em&gt;!rss&lt;/em&gt; command.&lt;br /&gt;
But &lt;b&gt;before&lt;/b&gt;, create a &lt;em&gt;.while_cond&lt;/em&gt; file in the same directory where you&#39;ll place this script. This will help you kill a rsstail instance. Since this script launch the rsstail instance in a while true loop to make sure it won&#39;t be down, you have to use this mecanism to avoid the loop to start again. To kill a rsstail you have to write &quot;&lt;em&gt;false&lt;/em&gt;&quot; in the &lt;em&gt;.while_cond&lt;/em&gt; file then kill the chosen rsstail (don&#39;t forget to change &lt;em&gt;.while_cond&lt;/em&gt; back after&amp;nbsp;that).&lt;/p&gt;

&lt;blockquote style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
&lt;font color=&quot;#84cfef&quot;&gt;#!/bin/bash&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&lt;font color=&quot;#9cfb9c&quot;&gt;CHAN&lt;/font&gt;=&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;#mychan&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&lt;font color=&quot;#84cfef&quot;&gt;# no line containing the messages of the bot&lt;/font&gt;&lt;br&gt;
tail &lt;font color=&quot;#ffdfad&quot;&gt;-n&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;0&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffdfad&quot;&gt;-f&lt;/font&gt;&amp;nbsp;path/to/&lt;font color=&quot;#ce5d5a&quot;&gt;$CHAN&lt;/font&gt;/out | grep &lt;font color=&quot;#ffdfad&quot;&gt;-v&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffdfad&quot;&gt;--line-buffered&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;lt;mybotname&amp;gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;| grep &lt;font color=&quot;#ffdfad&quot;&gt;--line-buffered&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;\\&amp;gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;| &lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;while &lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;read&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-r&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;nbsp;line&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;do&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;printf&lt;/b&gt;&lt;/font&gt; &#39;%s\\n&#39; &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#ce5d5a&quot;&gt;&quot;$line&quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;message_text&lt;/font&gt;=&lt;font color=&quot;#ffdfad&quot;&gt;`printf &lt;/font&gt;&#39;%s\\n&#39; &lt;font color=&quot;#ce5d5a&quot;&gt;&quot;$line&quot;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;nbsp;sed &lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;s/.\\+&amp;gt; //&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;`&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;case&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ce5d5a&quot;&gt;$message_text&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;in&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!debug&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;echo&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;I HAZ NO BUGZ&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;path/to/&lt;font color=&quot;#ce5d5a&quot;&gt;$CHAN&lt;/font&gt;/in &lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!rss\\ *&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;)&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;temp&lt;/font&gt;=&lt;font color=&quot;#ffdfad&quot;&gt;`printf &lt;/font&gt;&#39;%s\\n&#39; &lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ce5d5a&quot;&gt;$message_text&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;|&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;nbsp;sed &lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;s/!rss \\?//&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&#39;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;`&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;echo&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;[new RSS] &lt;/font&gt;&lt;font color=&quot;#ce5d5a&quot;&gt;$temp&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while true&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;do&lt;/b&gt;&lt;/font&gt;&amp;nbsp;./rsstail &lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-u&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#ce5d5a&quot;&gt;$temp&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;quot;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-l&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-P&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-z&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-N&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-n&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;-i&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;60&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;gt;&amp;gt;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;path/to/&lt;font color=&quot;#ce5d5a&quot;&gt;$CHAN&lt;/font&gt;/&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;in&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;if &lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;[&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;$(&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cat .while_cond&lt;/font&gt;&lt;span style=&quot;background-color: #ff0000&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;)&lt;/font&gt;&lt;/span&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;=&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;false&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;]&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;then&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;break&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;fi&lt;/b&gt;&lt;/font&gt;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;;&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;done&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;&amp;amp;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;;;&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;esac&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;done&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;/font&gt;
&lt;/blockquote&gt;

&lt;p&gt;One other detail: I have remove the carriage return between the title of a rss item and the link by hacking rsstail source code. This is somewhere at line 436. Yes, this is dirty but you should be accustomed&amp;nbsp;now.&lt;/p&gt;

&lt;p&gt;I hope you&#39;ll lose plenty of time with this&amp;nbsp;script.&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Nerd pastime</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/nerd-pastime.html"/><published>2010-09-02T21:38:39Z</published><id>http://blog.worlddomination.be/blog/2010/nerd-pastime.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;&lt;center&gt;
&lt;img src=&quot;http://imgs.xkcd.com/comics/collatz_conjecture.png&quot;&gt;&lt;/p&gt;

&lt;p&gt;+&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.graphviz.org/&quot;&gt;dots&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;+&lt;/p&gt;

&lt;p&gt;nerd&lt;/p&gt;

&lt;p&gt;=&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/media/img/misc/collatz.png&quot; /&gt;
&lt;/center&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://cerkinfo.be/~cibot/zob.png&quot;&gt;This one&lt;/a&gt; is made from 1000 (careful, 4.2mo, prefer download) pic. 100 for &lt;a href=&quot;http://cerkinfo.be/~cibot/prout.png&quot;&gt;this&amp;nbsp;one.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, looking for way to make this look funnier &lt;a href=&quot;http://en.wikipedia.org/wiki/Collatz_conjecture&quot;&gt;I discover that cooler graphs&lt;/a&gt;&amp;nbsp;already&amp;nbsp;exist.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://paste.debian.net/87410/&quot;&gt;Script&lt;/a&gt; (remove the color stuff, will display as&amp;nbsp;on&amp;nbsp;wikipedia).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://omploader.org/vNWY1OQ&quot;&gt;An experiment&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://xkcd.com/150/&quot;&gt;This is the next xkcd&lt;/a&gt; I&amp;nbsp;will&amp;nbsp;reproduce.&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>pytestator, un script vim pour gérer ses tests unitaires plus facilement</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/pytestator-un-script-vim-pour-gerer-ses-tests-unitaires-plus-facilement.html"/><published>2010-07-16T19:41:14Z</published><id>http://blog.worlddomination.be/blog/2010/pytestator-un-script-vim-pour-gerer-ses-tests-unitaires-plus-facilement.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;J&amp;#8217;ai (enfin) releasé un petit script vim pour rendre plus agréable l&amp;#8217;utilisations de tests untaires pour python&amp;nbsp;dans&amp;nbsp;vim.&lt;/p&gt;

&lt;p&gt;Le principe est assez simple, ce script vous introduit plusieurs nouveaux raccourcis dont voici les deux&amp;nbsp;plus&amp;nbsp;intéressants:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;&lt;em&gt;, s&lt;/em&gt; qui vous fais passer du fichier de tests au fichier testé et vice versa (&lt;em&gt;s&lt;/em&gt; pour &lt;em&gt;swap&lt;/em&gt;)&lt;/li&gt;
    &lt;li&gt;&lt;em&gt;, tr&lt;/em&gt; qui lance le fichier de tests correspondant au fichier que vous êtes en train d&amp;#8217;éditer, que vous soyez dans ce fichier ou dans le fichier de test (&lt;em&gt;tr&lt;/em&gt; pour &lt;em&gt;test run&lt;/em&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;La page du script avec un peu plus d&amp;#8217;informations et du mauvais anglais: &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=3151&quot;&gt;http://www.vim.org/scripts/script.php?script_id=3151&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sinon des mappings que j&amp;#8217;aime bien pour écrire mes&amp;nbsp;tests&amp;nbsp;unitaires:&lt;/p&gt;

&lt;blockquote style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
imap ,ar self.assertRaises()&lt;font color=&quot;#9cfb9c&quot;&gt;&amp;lt;&lt;/font&gt;left&lt;font color=&quot;#9cfb9c&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
imap ,ae self.assertEqual()&lt;font color=&quot;#9cfb9c&quot;&gt;&amp;lt;&lt;/font&gt;left&lt;font color=&quot;#9cfb9c&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
imap ,at self.assertTrue()&lt;font color=&quot;#9cfb9c&quot;&gt;&amp;lt;&lt;/font&gt;left&lt;font color=&quot;#9cfb9c&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
imap ,af self.assertFalse()&lt;font color=&quot;#9cfb9c&quot;&gt;&amp;lt;&lt;/font&gt;left&lt;font color=&quot;#9cfb9c&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;/blockquote&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>Mes maps git pour vim</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/mes-maps-git-pour-vim.html"/><published>2010-06-26T01:32:10Z</published><id>http://blog.worlddomination.be/blog/2010/mes-maps-git-pour-vim.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;Un poste rapide pour vous donner mes maping pour &lt;a href=&quot;http://git-scm.com&quot;&gt;git&lt;/a&gt; dans &lt;a href=&quot;http://www.vim.org&quot;&gt;vim&lt;/a&gt;. J&amp;#8217;ai beau avoir regardé tous les plugins vim pour git, aucun ne m&amp;#8217;a plus, je me suis donc contenté de faire plein de maps pour pouvoir utiliser git dans vim et ce le plus&amp;nbsp;rapidement&amp;nbsp;possible.&lt;/p&gt;

&lt;p&gt;Le principe est très simple et surtout facile à retenir: les maps commencent tous par &amp;#8220;, &amp;#8221; (comme tous mes maps ou presque) puis par &amp;#8220;g&amp;#8221; (comme git), après je rajoute une lettre qui est le début de la commande et je la mets parfois en majuscule quand c&amp;#8217;est la même commande avec des options différentes. C&amp;#8217;est tout bête mais ça permet de ne taper que 3 char pour faire n&amp;#8217;importe quelle commande (qui est beaucoup plus longue à écrire), je me retrouve même à ouvrir vim pour utiliser git&amp;nbsp;maintenant&amp;nbsp;-_-&amp;#8220;&lt;/p&gt;

&lt;blockquote style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, ga&amp;nbsp;:!git add -p&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gA&amp;nbsp;:!git add %&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gf&amp;nbsp;:!git add&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gs&amp;nbsp;:!git status&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gc&amp;nbsp;:!git commit -m &amp;#8220;&amp;#8221;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;left&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gC&amp;nbsp;:!git add %&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;:!git commit -m &amp;#8220;&amp;#8221;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;left&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gd&amp;nbsp;:!git diff&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gD&amp;nbsp;:!git diff &amp;#8212;cached&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gp&amp;nbsp;:!git push&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gP&amp;nbsp;:!git pull&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gb&amp;nbsp;:!git branch&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gB&amp;nbsp;:!git branch&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gh&amp;nbsp;:!git checkout&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gi&amp;nbsp;:!git init&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gt&amp;nbsp;:!tig&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;map&lt;/b&gt;&lt;/font&gt;&amp;nbsp;, gl&amp;nbsp;:!git log&lt;font color=&quot;#ffdfad&quot;&gt;&amp;lt;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;cr&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;&amp;gt;&lt;/font&gt;&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry><entry><title>ULR, url list reader ou mon viewer pour newsbeuter</title><author><name>Laurent Peuch</name></author><link href="http://blog.worlddomination.be/blog/2010/ulr-url-list-reader-ou-mon-viewer-pour-newsbeuter.html"/><published>2010-05-18T04:44:21Z</published><id>http://blog.worlddomination.be/blog/2010/ulr-url-list-reader-ou-mon-viewer-pour-newsbeuter.html</id><content type="html">
       

&lt;!-- Hyde::Excerpt::Begin --&gt;

&lt;p&gt;&lt;b&gt;MAJ&lt;/b&gt;: j&#39;ai déjà reçu mon premier patch (gloire) par taziden qui permet d&#39;ajouter l&#39;url courante dans un fichier &quot;bookmarks&quot; (touche B) donc le code qui suit n&#39;est plus à&amp;nbsp;jours.&lt;/p&gt;

&lt;p&gt;Situation: j&#39;utilise &lt;a href=&quot;http://www.newsbeuter.com&quot;&gt;newsbeuter&lt;/a&gt; pour lire mes RSS. C&#39;est véritablement le meilleur lecteur de RSS sur lequel j&#39;ai pu mettre la main, en plus il est en console. Sauf que, pour une fois la console me fait chier. En effet je lis plein de blog bayday et autre webcomics idiot et tout ce joli petit tointoin est rempli d&#39;images ce qui ne fonctionne pas très bien en console. Surtout que j&#39;ai une &lt;i&gt;queryfeed&lt;/i&gt; avec des centaines&amp;nbsp;d&#39;éléments.&lt;/p&gt;

&lt;p&gt;Dans l&#39;ordre, voici les solutions qui s&#39;offraient à&amp;nbsp;moi:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;utiliser la fonction intégré à newsbeuter pour ouvrir l&#39;url dans mon naviguateur oueb. Ça va un moment, mais c&#39;est lent et vraiment pas&amp;nbsp;efficace.&lt;/li&gt;
    &lt;li&gt;histoire d&#39;automatiser un peu le tout je me suis fait des macro super bourrin qui ouvre 10 20 30 40 80 120 élément dans mon browser. ça marche pas mal, sauf que Ça fait souvent péter firefox, faut attendre que tout est chargé, c&#39;est&amp;nbsp;pénible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Puis finalement j&#39;en ai eu marre et j&#39;ai décidé de coder ma propre solution et voilà l&#39;arrivé de ULR (vous remarquerez le subtile jeux de mot), un naviguateur web ultra&amp;nbsp;minimaliste.&lt;/p&gt;

&lt;p&gt;Le principe est simple: vous rajoutez des urls dans un fichier (ou lui passé en argument, il les rajoutera lui même). Puis vous le lancez le browser qui naviguera dans cette liste&amp;nbsp;d&#39;urls.&lt;/p&gt;

&lt;p&gt;C&#39;est du python, ça utilise webkit (le machin pour utiliser gecko était vraiment pourri en comparaison), c&#39;est minimaliste, sans interface, juste des raccourcis clavier. J&#39;aurais pu faire ça avec UZBL mais je n&#39;ai pas eu le courage de chercher à comprendre comment le faire même si cela ne doit pas être bien difficile et puis quand je vois que cela tien sur moins de 200 lignes de&amp;nbsp;python.&lt;/p&gt;

&lt;p&gt;Un jouli&amp;nbsp;screenshot:&lt;/p&gt;

&lt;p&gt;&lt;center&gt;&lt;p&gt;&lt;a href=&quot;/media/img/ulr/ulr.png&quot;&gt;&lt;img src=&quot;/media/img/ulr/ulr-prev.png&quot; alt=&quot;url screenshot preview&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/center&gt;&lt;/p&gt;
&lt;p&gt;Et parce que c&#39;est toujours pratique pour l&#39;utilisation, les&amp;nbsp;raccourcis:&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;&lt;b&gt;esc/q&lt;/b&gt;: quitter sans modifier la&amp;nbsp;liste&lt;/b&gt;&lt;/li&gt;
    &lt;li&gt;&lt;b&gt;n/espace&lt;/b&gt;: passe à l&#39;url suivante (espace fait baisser l&#39;écran aussi, j&#39;ai eu la flemme de corriger ce&amp;nbsp;bug)&lt;/li&gt;
    &lt;li&gt;&lt;b&gt;r&lt;/b&gt;: fait un refresh de la page&amp;nbsp;courante&lt;/b&gt;&lt;/li&gt;
    &lt;li&gt;&lt;b&gt;s&lt;/b&gt;: sauve l&#39;avancement dans la liste des urls (en gros supprime du fichier urls les urls déjà&amp;nbsp;vu)&lt;/li&gt;
    &lt;li&gt;&lt;b&gt;S&lt;/b&gt;: pareil puis&amp;nbsp;quitte&lt;/li&gt;
    &lt;li&gt;&lt;b&gt;y&lt;/b&gt;: copie l&#39;url courante dans le clipboard de X (il faut avoir xclip&amp;nbsp;installé)&lt;/li&gt;
    &lt;li&gt;&lt;b&gt;f&lt;/b&gt;: envoie l&#39;url vers firefox (il faut bien entendu qu&#39;il soit&amp;nbsp;installé)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pour choper le code, un petit &lt;em&gt;git clone&amp;nbsp;git://git.worlddomination.be/python/ulr.git&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;EDIT: Le code qui suit ne correspond plus au&amp;nbsp;master.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Et parce qu&#39;il n&#39;est pas très long mais bien dégeux (je n&#39;avais aucun intérêt à le faire propre), voici le&amp;nbsp;code:&lt;/p&gt;

&lt;blockquote style=&quot;background-color:#313031; color:#ffffff&quot;&gt;
&lt;font color=&quot;#ffdfad&quot;&gt;#!/usr/bin/python&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffdfad&quot;&gt;# -*- coding:Utf-8 -*-&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt;&amp;nbsp;gtk&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt;&amp;nbsp;os&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt;&amp;nbsp;sys&lt;br&gt;
&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt;&amp;nbsp;webkit&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;import&lt;/b&gt;&lt;/font&gt;&amp;nbsp;gobject&lt;br&gt;
&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;class&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;Browser&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;delete_event&lt;/font&gt;(self, widget, event, data=&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;None&lt;/b&gt;&lt;/font&gt;):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;return&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;False&lt;/b&gt;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;destroy&lt;/font&gt;(self, widget, data=&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;None&lt;/b&gt;&lt;/font&gt;):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gtk&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;main_quit()&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;open_list&lt;/font&gt;(self):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls = &lt;font color=&quot;#9cfb9c&quot;&gt;open&lt;/font&gt;(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;urls&amp;quot;&lt;/font&gt;, &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;r&amp;quot;&lt;/font&gt;)&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;readlines()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;len&lt;/font&gt;(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls) == &lt;font color=&quot;#ffa2a5&quot;&gt;0&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;List empty, fill list before launching&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sys&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;exit(&lt;font color=&quot;#ffa2a5&quot;&gt;0&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;len&lt;/font&gt;(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls), self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;__init__&lt;/font&gt;(self):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gobject&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;threads_init()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;window = gtk&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;Window(gtk&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;WINDOW_TOPLEVEL)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;window&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;set_resizable(&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;True&lt;/b&gt;&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;window&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;connect(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;delete_event&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;delete_event)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;window&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;connect(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;destroy&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;destroy)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;window&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;connect(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;key-press-event&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;keyboard_cb)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;open_list()&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position = &lt;font color=&quot;#ffa2a5&quot;&gt;0&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#84cfef&quot;&gt;#webkit.WebView allows us to embed a webkit browser&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#84cfef&quot;&gt;#it takes care of going backwards/fowards/reloading&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#84cfef&quot;&gt;#it even handles flash&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view = webkit&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;WebView()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#9cfb9c&quot;&gt;open&lt;/font&gt;(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls[&lt;font color=&quot;#ffa2a5&quot;&gt;0&lt;/font&gt;][:-&lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;])&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#84cfef&quot;&gt;#entry bar for typing in and display URLs, when they type in a site&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#84cfef&quot;&gt;#and hit enter the on_active function is called&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;url_bar = gtk&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;Entry()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;url_bar&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;connect(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;activate&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;on_active)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;bar = gtk&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;Label()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;bar&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;set_single_line_mode(&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;True&lt;/b&gt;&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;bar&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;set_text(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls[&lt;font color=&quot;#ffa2a5&quot;&gt;0&lt;/font&gt;][:-&lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;] + &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;&lt;/font&gt;&amp;nbsp;+ &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;%i&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;%i&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;% (self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position + &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;, &lt;font color=&quot;#9cfb9c&quot;&gt;len&lt;/font&gt;(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls)))&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#84cfef&quot;&gt;#anytime a site is loaded the update_buttons will be called&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;connect(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;load_committed&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;update_buttons)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scroll_window = gtk&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;ScrolledWindow(&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;None&lt;/b&gt;&lt;/font&gt;, &lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;None&lt;/b&gt;&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;scroll_window&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;add(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view)&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vbox = gtk&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;VBox(&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;False&lt;/b&gt;&lt;/font&gt;, &lt;font color=&quot;#ffa2a5&quot;&gt;0&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vbox&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;pack_start(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;bar, &lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;False&lt;/b&gt;&lt;/font&gt;, &lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;True&lt;/b&gt;&lt;/font&gt;, &lt;font color=&quot;#ffa2a5&quot;&gt;0&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;vbox&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;add(scroll_window)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;window&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;add(vbox)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;window&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;show_all()&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;on_active&lt;/font&gt;(self, widge, data=&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;None&lt;/b&gt;&lt;/font&gt;):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&#39;&#39;&#39;When the user enters an address in the bar, we check to make&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sure they added the &lt;a href=&quot;http://&quot;&gt;http://&lt;/a&gt;, if not we add it for them.&amp;nbsp;&amp;nbsp;Once&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the url is correct, we just ask webkit to open that site.&#39;&#39;&#39;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url = self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;url_bar&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;get_text()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;try&lt;/b&gt;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;index(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;://&amp;quot;&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;except&lt;/b&gt;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url = &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&lt;a href=&quot;http://&quot;&gt;http://&lt;/a&gt;&amp;quot;&lt;/font&gt;+url&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;url_bar&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;set_text(url)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#9cfb9c&quot;&gt;open&lt;/font&gt;(url)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;go_back&lt;/font&gt;(self, widget, data=&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;None&lt;/b&gt;&lt;/font&gt;):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&#39;&#39;&#39;Webkit will remember the links and this will allow us to go&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; backwards.&#39;&#39;&#39;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;go_back()&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;go_forward&lt;/font&gt;(self, widget, data=&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;None&lt;/b&gt;&lt;/font&gt;):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&#39;&#39;&#39;Webkit will remember the links and this will allow us to go&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; forwards.&#39;&#39;&#39;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;go_forward()&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;refresh&lt;/font&gt;(self, widget, data=&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;None&lt;/b&gt;&lt;/font&gt;):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&#39;&#39;&#39;Simple makes webkit reload the current back.&#39;&#39;&#39;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#9cfb9c&quot;&gt;reload&lt;/font&gt;()&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;update_buttons&lt;/font&gt;(self, widget, data=&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;None&lt;/b&gt;&lt;/font&gt;):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&#39;&#39;&#39;Gets the current url entry and puts that into the url bar.&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; It then checks to see if we can go back, if we can it makes the&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; back button clickable.&amp;nbsp;&amp;nbsp;Then it does the same for the foward&lt;/font&gt;&lt;br&gt;
&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; button.&#39;&#39;&#39;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;url_bar&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;set_text( widget&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;get_main_frame()&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;get_uri() )&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;main&lt;/font&gt;(self):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gtk&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;main()&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;keyboard_cb&lt;/font&gt;(self, widget, event, data=&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;None&lt;/b&gt;&lt;/font&gt;):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#84cfef&quot;&gt;#print &amp;quot;event:&amp;quot;, event&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;keyname = gtk&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;gdk&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;keyval_name(event&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;keyval)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname&lt;br&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;Escape&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;or&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;q&amp;quot;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;call deleting&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;destroy(widget)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;elif&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;space&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;or&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;n&amp;quot;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;next&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#9cfb9c&quot;&gt;next&lt;/font&gt;()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;elif&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;r&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;or&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;R&amp;quot;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;reload&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;refresh(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;widget&amp;quot;&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;elif&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;b&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;or&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;p&amp;quot;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;or&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;Backspace&amp;quot;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;previous&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;previous()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;elif&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;s&amp;quot;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;saving&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;save()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;elif&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;S&amp;quot;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;saving&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;save()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;destroying&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;destroy(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;widget&amp;quot;&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;elif&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;y&amp;quot;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;copy to clipboard&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;os&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;system(&lt;font color=&quot;#ffa2a5&quot;&gt;&#39;echo -n &amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;%s&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot; | xclip -i&#39;&lt;/font&gt;&amp;nbsp;% self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;get_main_frame()&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;get_uri()):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;#fail&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;elif&lt;/b&gt;&lt;/font&gt;&amp;nbsp;keyname == &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;f&amp;quot;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;go to firefox&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;os&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;system(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;firefox &lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;%s&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;% self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;get_main_frame()&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;get_uri()):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;#fail&amp;quot;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;save&lt;/font&gt;(self):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;urls = &lt;font color=&quot;#9cfb9c&quot;&gt;open&lt;/font&gt;(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;urls&amp;quot;&lt;/font&gt;, &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;w&amp;quot;&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;for&lt;/b&gt;&lt;/font&gt;&amp;nbsp;i &lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;in&lt;/b&gt;&lt;/font&gt;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls[self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position + &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;:]:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;urls&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;write(i)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;next&lt;/font&gt;(self):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;was:&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position &amp;lt; &lt;font color=&quot;#9cfb9c&quot;&gt;len&lt;/font&gt;(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls) - &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;go forwarf&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position + &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position += &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;loading:&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls[self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position][:-&lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#9cfb9c&quot;&gt;open&lt;/font&gt;(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls[self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position][:-&lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;])&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;bar&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;set_text(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls[self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position][:-&lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;] + &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;&lt;/font&gt;&amp;nbsp;+ &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;%i&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;%i&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;% (self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position + &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;, &lt;font color=&quot;#9cfb9c&quot;&gt;len&lt;/font&gt;(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls)))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;elif&lt;/b&gt;&lt;/font&gt;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position == &lt;font color=&quot;#9cfb9c&quot;&gt;len&lt;/font&gt;(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls) - &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;show finish&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position + &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data = &lt;font color=&quot;#ffa2a5&quot;&gt;&#39;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Hello&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;center&amp;gt;&amp;lt;h1&amp;gt;Finish&amp;lt;/h1&amp;gt;&amp;lt;h3&amp;gt;One more step forward and the browser will quit and empty the list&amp;lt;/h3&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&#39;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;load_string(data, &lt;font color=&quot;#ffa2a5&quot;&gt;&#39;text/html&#39;&lt;/font&gt;, &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;utf-8&amp;quot;&lt;/font&gt;, &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;about&amp;quot;&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position += &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;end ? saving ? destroy&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;save()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;destroy(&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;widget&amp;quot;&lt;/font&gt;)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;def&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;previous&lt;/font&gt;(self):&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;was:&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position &amp;gt; &lt;font color=&quot;#ffa2a5&quot;&gt;0&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;go back&amp;quot;&lt;/font&gt;, self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position - &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position -= &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;&lt;font color=&quot;#9cfb9c&quot;&gt;open&lt;/font&gt;(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls[self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position][:-&lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;])&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;bar&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;set_text(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls[self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position][:-&lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;] + &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot;&lt;/font&gt;&amp;nbsp;+ &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;%i&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;/&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;%i&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&lt;/font&gt;&amp;nbsp;% (self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position + &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;, &lt;font color=&quot;#9cfb9c&quot;&gt;len&lt;/font&gt;(self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;urls)))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;elif&lt;/b&gt;&lt;/font&gt;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position == &lt;font color=&quot;#ffa2a5&quot;&gt;0&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;position -= &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;print&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;show begin&amp;quot;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data = &lt;font color=&quot;#ffa2a5&quot;&gt;&#39;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Hello&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&amp;lt;center&amp;gt;&amp;lt;h1&amp;gt;Begin&amp;lt;/h1&amp;gt;&amp;lt;/center&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&#39;&lt;/font&gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;self&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;web_view&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;load_string(data, &lt;font color=&quot;#ffa2a5&quot;&gt;&#39;text/html&#39;&lt;/font&gt;, &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;utf-8&amp;quot;&lt;/font&gt;, &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;about&amp;quot;&lt;/font&gt;)&lt;br&gt;
&lt;br&gt;
&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;__name__&lt;/b&gt;&lt;/font&gt;&amp;nbsp;== &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;__main__&amp;quot;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;if&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;len&lt;/font&gt;(sys&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;argv) &amp;gt; &lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;__dir__ = os&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;path&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;dirname(os&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;path&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;abspath(&lt;font color=&quot;#bdb66b&quot;&gt;&lt;b&gt;__file__&lt;/b&gt;&lt;/font&gt;))&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#9cfb9c&quot;&gt;open&lt;/font&gt;(os&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;path&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;join(__dir__, &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;urls&amp;quot;&lt;/font&gt;), &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;a&amp;quot;&lt;/font&gt;)&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;write(sys&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;argv[&lt;font color=&quot;#ffa2a5&quot;&gt;1&lt;/font&gt;] + &lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&lt;/font&gt;&lt;font color=&quot;#ffdfad&quot;&gt;\
&lt;/font&gt;&lt;font color=&quot;#ffa2a5&quot;&gt;&amp;quot;&lt;/font&gt;)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color=&quot;#f7e78c&quot;&gt;&lt;b&gt;else&lt;/b&gt;&lt;/font&gt;:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;browser = Browser()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;browser&lt;span style=&quot;background-color: #313031&quot;&gt;&lt;font color=&quot;#ffffff&quot;&gt;.&lt;/font&gt;&lt;/span&gt;main()&lt;br&gt;
&lt;br&gt;

&lt;/blockquote&gt;

&lt;p&gt;Remarque: rien ne vous empêche de combiner ULR avec rsstail ou n&#39;importe quel autre script ou&amp;nbsp;programme.&lt;/p&gt;

&lt;p&gt;Feel free to send&amp;nbsp;patchs&lt;/p&gt;

&lt;p&gt;Pour le configurer dans newsbeur, rajouter le simplement en browser, cela ne le lancera mais rajoutera l&#39;url dans la liste des urls à lire, puis pour lire cette liste d&#39;url il faudra lancer ulr&amp;nbsp;manuellement.&lt;/p&gt;

&lt;p&gt;Si vous trouvez l&#39;ajout de fichiers lents via ulr.py, rien ne vous empêche de créer un script bash qui fait un &lt;em&gt;echo $1 &gt;&gt; /path/vers/le/fichier/urls&lt;/em&gt;&lt;/p&gt;

&lt;!-- Hyde::Excerpt::End --&gt;


   </content></entry></feed>

