<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;C0cDQnk8cCp7ImA9WhVbFUg.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776</id><updated>2012-06-01T13:44:33.778+02:00</updated><category term="moderncv" /><category term="knoppix" /><category term="postgresql" /><category term="package" /><category term="sysadmin" /><category term="ltsp" /><category term="documentation" /><category term="chrétien" /><category term="books" /><category term="latex" /><category term="france" /><category term="regexp" /><category term="christian" /><category term="microblogging" /><category term="presentation" /><category term="chrome" /><category term="flammard" /><category term="ichthux" /><category term="test" /><category term="nuclear" /><category term="job" /><category term="css" /><category term="git" /><category term="spam" /><category term="journal" /><category term="family" /><category term="video" /><category term="link" /><category term="germany" /><category term="review" /><category term="programs" /><category term="dinah" /><category term="backports" /><category term="notes" /><category term="reading" /><category term="authority" /><category term="cv" /><category term="jabber" /><category term="wifi" /><category term="talk" /><category term="sourceforge" /><category term="licenses" /><category term="typing" /><category term="libre" /><category term="ffmpeg" /><category term="language" /><category term="linux mint" /><category term="geek" /><category term="bash" /><category term="faith" /><category term="computers" /><category term="pdf" /><category term="wordpress" /><category term="hacker" /><category term="beta" /><category term="style" /><category term="kde4" /><category term="politique" /><category term="revelations" /><category term="paris" /><category term="mac" /><category term="pbuilder" /><category term="network" /><category term="fun" /><category term="place" /><category term="ubuntu" /><category term="release" /><category term="multiply" /><category term="nvidia" /><category term="open-source" /><category term="restored" /><category term="virtualization" /><category term="education" /><category term="packaging" /><category term="javascript" /><category term="nss" /><category term="perl" /><category term="conference" /><category term="prophecy" /><category term="français" /><category term="openoffice" /><category term="augeas" /><category term="gforge" /><category term="identica" /><category term="config-augeas-exporter" /><category term="usborne" /><category term="ldap" /><category term="python" /><category term="geek nerd" /><category term="hebrew" /><category term="debian" /><category term="edubuntu" /><category term="windows" /><category term="irc" /><category term="konqui" /><category term="beauty" /><category term="riviera" /><category term="inkscape" /><category term="wave" /><category term="learning" /><category term="prayer" /><category term="linux" /><category term="jew" /><category term="screen" /><category term="meme" /><category term="artwork" /><category term="children" /><category term="bible" /><category term="english" /><category term="kubuntu" /><category term="music" /><category term="website" /><category term="commentary" /><category term="book" /><category term="blog" /><category term="kde" /><category term="life" /><category term="xorg" /><category term="wikipedia" /><category term="clipart" /><category term="god" /><category term="drupal" /><category term="joke" /><category term="microsoft" /><category term="film" /><title>Christian thoughts in a tech world</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.raphink.info/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.raphink.info/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>115</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/ChristianThoughtsInATechWorld" /><feedburner:info uri="christianthoughtsinatechworld" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUAMQnw8fyp7ImA9WhVSGE0.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-3196941200788166426</id><published>2012-03-14T10:57:00.000+01:00</published><updated>2012-03-15T11:36:23.277+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-15T11:36:23.277+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="debian" /><category scheme="http://www.blogger.com/atom/ns#" term="virtualization" /><category scheme="http://www.blogger.com/atom/ns#" term="sysadmin" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>From openvz to VMWare</title><content type="html">I was recently asked to convert an openvz container to a VMWare instance. I found a &lt;a href="http://communities.vmware.com/message/1719787#1719787"&gt;tutorial on a forum&lt;/a&gt; which helped but had to be adapted slightly.&lt;br /&gt;
&lt;br /&gt;
Here is how I eventually managed to do the conversion:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;On the openvz host, create an image (in my case, I need 20GB): &lt;br /&gt;
&lt;code&gt;dd if=/dev/zero of=test.img bs=516096c count=40000&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Create a partition table in the image:&lt;br /&gt;
&lt;code&gt;fdisk test.img&lt;/code&gt;&lt;br /&gt;
Type: &lt;code&gt;o n p 1 2048 w&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Mount the image using the offset corresponding to the partition table (in our case, 2048*512=1048576):&lt;br /&gt;
&lt;code&gt;losetup -o1048576 /dev/loop0 test.img&lt;br /&gt;
mke2fs -b1024 /dev/loop0&lt;br /&gt;
tune2fs -j /dev/loop0&lt;br /&gt;
mount /dev/loop0 /mnt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Retrieve the UUID of the partition. Note it somewhere, you will need it several times:&lt;br /&gt;
&lt;code&gt;blkid /dev/loop0&lt;/code&gt;
&lt;/li&gt;


&lt;li&gt;Copy the container files to the image. I used rsync to exclude some data that were too big. Make sure to use &lt;code&gt;--numeric-ids&lt;/code&gt; to prevent bad mapping of UIDs:&lt;br /&gt;
&lt;code&gt;rsync -av --exclude 'somedir' --numeric-ids /vz/root/1234/ /mnt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Install grub on the disk:&lt;br /&gt;
&lt;code&gt;grub-install --root-directory /mnt /dev/loop0&lt;/code&gt;&lt;/li&gt;

&lt;li&gt;Chroot into the mounted partition:&lt;br /&gt;
&lt;code&gt;chroot /mnt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Install a kernel and grub (using apt for example):&lt;br /&gt;
&lt;code&gt;apt-get install linux-image-foobar #adapt to your kernel version&lt;br /&gt;
apt-get install grub-pc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Give a password to root:&lt;br /&gt;
&lt;code&gt;passwd&lt;/code&gt;&lt;/li&gt;

&lt;li&gt;Change inittab to add the ttys:&lt;br /&gt;
&lt;code&gt;1:2345:respawn:/sbin/getty 38400 tty1&lt;br /&gt;
2:23:respawn:/sbin/getty 38400 tty2&lt;br /&gt;
3:23:respawn:/sbin/getty 38400 tty3&lt;br /&gt;
4:23:respawn:/sbin/getty 38400 tty4&lt;br /&gt;
5:23:respawn:/sbin/getty 38400 tty5&lt;br /&gt;
6:23:respawn:/sbin/getty 38400 tty6&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Create an /etc/fstab file (change the UUID with yours):&lt;br /&gt;
&lt;code&gt;proc /proc proc nodev,noexec,nosuid 0 0&lt;br /&gt;
UUID=7925e5b1-f2ad-4cdc-95f9-984d25378194 / ext4 errors=remount-ro 0 1&lt;/code&gt;
&lt;/li&gt;


&lt;li&gt;Umount the image and convert it to a vmdk image:&lt;br /&gt;
&lt;code&gt;umount /mnt&lt;br /&gt;
kvm-img convert -f raw test.img -O vmdk test.vmdk&lt;/code&gt;&lt;/li&gt;


&lt;li&gt;Boot the machine on the virtual disk with VMWare or Virtualbox. You should get a grub prompt (adapt with your UUID). In grub2, you can use autocompletion for the Linux kernel and the initrd image:&lt;br /&gt;
&lt;code&gt;grub&amp;gt; insmod ext2&lt;br /&gt;
grub&amp;gt; set root='(hd0,msdos1)'&lt;br /&gt;
grub&amp;gt; linux /boot/vmlinuz-foobar root=UUID=7925e5b1-f2ad-4cdc-95f9-984d25378194 ro&lt;br /&gt;
grub&amp;gt; initrd /boot/initrd-foobar&lt;br /&gt;
grub&amp;gt; boot
&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Log in to the machine and run &lt;code&gt;update-grub&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Adapt your network settings&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-3196941200788166426?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/g5ApDp9jiQxQRBmNuEpUvCaS4w8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/g5ApDp9jiQxQRBmNuEpUvCaS4w8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/g5ApDp9jiQxQRBmNuEpUvCaS4w8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/g5ApDp9jiQxQRBmNuEpUvCaS4w8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/6pF6yIzzqUU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/3196941200788166426/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=3196941200788166426" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/3196941200788166426?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/3196941200788166426?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/6pF6yIzzqUU/from-openvz-to-vmware.html" title="From openvz to VMWare" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2012/03/from-openvz-to-vmware.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYEQn06eCp7ImA9WhRRGUk.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-4155089644977742057</id><published>2011-12-03T21:46:00.001+01:00</published><updated>2011-12-03T22:01:43.310+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-03T22:01:43.310+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="config-augeas-exporter" /><category scheme="http://www.blogger.com/atom/ns#" term="augeas" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Announcing Augeas 0.10.0</title><content type="html">&lt;a href="http://augeas.net/"&gt;Augeas&lt;/a&gt; 0.10.0 has &lt;a href="https://www.redhat.com/archives/augeas-devel/2011-December/msg00004.html"&gt;just been released&lt;/a&gt;, and it brings a good lot of changes with it.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Among them, the &lt;tt&gt;aug_to_xml&lt;/tt&gt; method has been added. This is essentially an integration of the XML export function initially introduced in the&amp;nbsp;&lt;a href="http://www.raphink.info/2011/02/introducing-configaugeasexporter.html"&gt;Config::Augeas::Exporter&lt;/a&gt;&amp;nbsp;Perl&amp;nbsp;module. The port in C has seen some improvements in the XML schema, as well as in speed. There is not yet an &lt;tt&gt;aug_from_xml&lt;/tt&gt; method, and it might take some time to come, as it brings up a lot of merging issues. This change introduces a dependency on &lt;tt&gt;libxml2&lt;/tt&gt;.&lt;br /&gt;
&lt;br /&gt;
Dominic Cleal has been working on the new &lt;tt&gt;aug_srun&lt;/tt&gt; method, which he wishes for his&amp;nbsp;&amp;nbsp;&lt;a href="http://projects.puppetlabs.com/projects/1/wiki/Puppet_Augeas"&gt;Augeas module for Puppet&lt;/a&gt;. In order to achieve this, he&amp;nbsp;introduced a way to set the context of XPath expressions in &lt;tt&gt;/augeas/context&lt;/tt&gt; in order to use relative paths. This is a well-known feature for the users of the&amp;nbsp;Augeas module for Puppet, and it is now available for all Augeas users.&lt;br /&gt;
&lt;br /&gt;
A lot of lenses have been fixed and improved. As a matter of fact, when I wrote the&amp;nbsp;&lt;a href="http://www.raphink.info/2011/12/unit-testing-your-configuration-files.html"&gt;Config::Augeas::Validator&lt;/a&gt;&amp;nbsp;Perl module, the goal was initially to test our configuration files against the Augeas lenses. But after testing some 120.000 files, I've obviously found a few flaws in the lenses and had to fix them.&lt;br /&gt;
&lt;br /&gt;
The package for Augeas 0.10.0 has entered Ubuntu Precise &lt;a href="https://lists.ubuntu.com/archives/precise-changes/2011-December/004129.html"&gt;this afternoon&lt;/a&gt;. Versions for older releases are available &lt;a href="https://launchpad.net/~raphink/+archive/augeas/+packages"&gt;on my Augeas PPA&lt;/a&gt;. Feedback is most welcome!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-4155089644977742057?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4kaZJ_7MsyLKcOCpsy_QuVXdzko/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4kaZJ_7MsyLKcOCpsy_QuVXdzko/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4kaZJ_7MsyLKcOCpsy_QuVXdzko/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4kaZJ_7MsyLKcOCpsy_QuVXdzko/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/RZFYae0Z94w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/4155089644977742057/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=4155089644977742057" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/4155089644977742057?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/4155089644977742057?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/RZFYae0Z94w/announcing-augeas-0100.html" title="Announcing Augeas 0.10.0" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2011/12/announcing-augeas-0100.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUBSHo4cSp7ImA9WhRRGUk.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-220308867752672435</id><published>2011-12-03T21:12:00.001+01:00</published><updated>2011-12-03T22:04:19.439+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-03T22:04:19.439+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sysadmin" /><category scheme="http://www.blogger.com/atom/ns#" term="perl" /><category scheme="http://www.blogger.com/atom/ns#" term="augeas" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Unit testing your configuration files</title><content type="html">At work, we have a lot of different services running and we end up with hundreds of thousands of configuration files in our configuration repository (especially since we don't use templates - more on that in another upcoming post...).&lt;br /&gt;
&lt;br /&gt;
In order to ensure the quality of these files (avoiding syntax errors and insecure configurations alike), we had the idea of writing a system to unit test the configuration files. Being involved in &lt;a href="http://augeas.net/"&gt;Augeas&lt;/a&gt;, I thought it would make a great parsing backend to write the tests.&lt;br /&gt;
&lt;br /&gt;
This gave birth to what is currently a Perl module called &lt;a href="http://search.cpan.org/perldoc?Config::Augeas::Validator"&gt;Config::Augeas::Validator&lt;/a&gt;, which comes with a Perl script and an SVN wrapper (this is what we used, but wrappers for other VCS are welcome) to plug it to pre- and post-commit hooks.
&lt;br /&gt;
&lt;br /&gt;
The module relies on Augeas (and its lenses) to parse the configuration files. On top of that, you need to specify rules (which are essentially unit test scenarii), at least one for each type of file you wish to test. A&amp;nbsp;minimal rule might look like this:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
[DEFAULT]&lt;br /&gt;
lens=Fstab&lt;br /&gt;
pattern=.*/fstab
&lt;/code&gt;

&lt;br /&gt;
&lt;br /&gt;
This rule will tell &lt;tt&gt;augeas-validator&lt;/tt&gt; to test all files whose full path matches &lt;tt&gt;.*/fstab&lt;/tt&gt; against the &lt;tt&gt;Fstab.lns&lt;/tt&gt; Augeas lens. If the file contains syntax errors (that is, the lens fails to parse it), the program will report it and exit with a status of 1.
&lt;br /&gt;
&lt;br /&gt;
Here is another simple example adding two unit tests with warnings:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
[DEFAULT]&lt;br /&gt;
lens=PHP&lt;br /&gt;
pattern=.*/(php\.ini|php[45]/conf\.d/.*\.ini)&lt;br /&gt;
&lt;br /&gt;
[file_uploads]&lt;br /&gt;
name=file_uploads&lt;br /&gt;
explanation=file_uploads should be set to 'Off'&lt;br /&gt;
type=count&lt;br /&gt;
expr=$file//file_uploads[. != 'Off']&lt;br /&gt;
value=0&lt;br /&gt;
level=warning&lt;br /&gt;
tags=security&lt;br /&gt;
&lt;br /&gt;
[expose_php]&lt;br /&gt;
name=expose_php&lt;br /&gt;
explanation=expose_php should be set to 'Off'&lt;br /&gt;
type=count&lt;br /&gt;
expr=$file//expose_php[. != 'Off']&lt;br /&gt;
value=0&lt;br /&gt;
level=warning&lt;br /&gt;
tags=security&lt;br /&gt;
&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
This test checks for &lt;tt&gt;php.ini&lt;/tt&gt; files. Not only does it fail with status 1 if there is a syntax error, it also applies two unit tests called &lt;tt&gt;file_uploads&lt;/tt&gt; and &lt;tt&gt;expose_php&lt;/tt&gt;, which will make the program output a warning and exit with status 2 if they are not met. The essential part of the rules is the &lt;tt&gt;expr&lt;/tt&gt; parameter, which is an &lt;a href="http://augeas.net/page/Path_expressions"&gt;Augeas XPath expression&lt;/a&gt;. In this case, the expressions must not match any nodes in order to pass the tests (hence &lt;tt&gt;value=0&lt;/tt&gt;).
&lt;br /&gt;
&lt;br /&gt;
These are just simple examples of what this module can do. You can find more examples shipped with the module itself. As a last example, here is one for Apache configuration files (in Debian/Ubuntu):&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
[DEFAULT]&lt;br /&gt;
lens=Httpd&lt;br /&gt;
pattern=.*/(sites-available/.*)|(apache2/.*\.conf)&lt;br /&gt;&lt;br /&gt;
[one_servername]&lt;br /&gt;
name=One ServerName per VirtualHost *&lt;br /&gt;
explanation=There should be only one ServerName per VirtualHost * entry&lt;br /&gt;
type=count&lt;br /&gt;
expr=$file[label() != "default"]/VirtualHost[arg =~ regexp("\*(:80)?")][count(directive[. = "ServerName"]) != 1]&lt;br /&gt;
value=0&lt;br /&gt;
level=warning&lt;br /&gt;
&lt;br /&gt;
[bufferedlogs]&lt;br /&gt;
name=BufferedLogs&lt;br /&gt;
explanation=BufferedLogs must be set to Off&lt;br /&gt;
type=count&lt;br /&gt;
expr=$file//directive[. = "BufferedLogs"][arg = "On"]&lt;br /&gt;
value=0&lt;br /&gt;
level=warning&lt;br /&gt;
tags=security&lt;br /&gt;
&lt;br /&gt;
[timeout]&lt;br /&gt;
name=Timeout&lt;br /&gt;
explanation=Timeout must be at least 45&lt;br /&gt;
type=count&lt;br /&gt;
expr=$file//directive[. = "Timeout"][int(arg) &amp;lt; 45]&lt;br /&gt;
value=0&lt;br /&gt;
level=warning&lt;br /&gt;
tags=security&lt;br /&gt;
&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-220308867752672435?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_yq26SKr-VteZSHVk3yV6fCNcaE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_yq26SKr-VteZSHVk3yV6fCNcaE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_yq26SKr-VteZSHVk3yV6fCNcaE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_yq26SKr-VteZSHVk3yV6fCNcaE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/D2jwbJC1mAQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/220308867752672435/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=220308867752672435" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/220308867752672435?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/220308867752672435?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/D2jwbJC1mAQ/unit-testing-your-configuration-files.html" title="Unit testing your configuration files" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2011/12/unit-testing-your-configuration-files.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMASX89eip7ImA9WhdWE04.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-523849833728286225</id><published>2011-09-06T21:37:00.003+02:00</published><updated>2011-09-06T21:47:28.162+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-06T21:47:28.162+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="bash" /><category scheme="http://www.blogger.com/atom/ns#" term="linux mint" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Bible verses in Mint fortunes</title><content type="html">For my most recent computer, I've installed Linux Mint 11. In Mint, bash is set to display a fortune cookie every time you start a shell session.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-iuQU-FrWvIE/TmZ1Zc11hYI/AAAAAAAADVE/nF960mLKxhQ/s1600/mint_fortunes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="183" src="http://3.bp.blogspot.com/-iuQU-FrWvIE/TmZ1Zc11hYI/AAAAAAAADVE/nF960mLKxhQ/s320/mint_fortunes.png" width="318" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This is a nice idea, however I would rather see daily Bible verses than random fortunes. Here is how to do that. First, install the &lt;tt&gt;verse&lt;/tt&gt; package:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ sudo apt-get install verse&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Then, edit &lt;tt&gt;/usr/bin/mint-fortune&lt;/tt&gt; with sudo, and replace the line:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
/usr/games/fortune | $command -f $cow&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
with&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
/usr/bin/verse | sed -e 's@^ *@@' | $command -f $cow&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
To be sure that the file won't be overridden when you upgrade your distribution, set it as a local diversion:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ sudo dpkg-divert --local /usr/bin/mint-fortune&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
and you're done!&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-ecvz40VCsBA/TmZ4xQoCo4I/AAAAAAAADVU/3FlouLsGWws/s1600/mint-fortunes-bible-nospaces.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="212" width="320" src="http://4.bp.blogspot.com/-ecvz40VCsBA/TmZ4xQoCo4I/AAAAAAAADVU/3FlouLsGWws/s320/mint-fortunes-bible-nospaces.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-523849833728286225?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TPU9p-uhl9vXiJUp7MS2eGOurjw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TPU9p-uhl9vXiJUp7MS2eGOurjw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TPU9p-uhl9vXiJUp7MS2eGOurjw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TPU9p-uhl9vXiJUp7MS2eGOurjw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/I8uI3PygIAo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/523849833728286225/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=523849833728286225" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/523849833728286225?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/523849833728286225?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/I8uI3PygIAo/bible-verses-in-mint-fortunes.html" title="Bible verses in Mint fortunes" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-iuQU-FrWvIE/TmZ1Zc11hYI/AAAAAAAADVE/nF960mLKxhQ/s72-c/mint_fortunes.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://www.raphink.info/2011/09/bible-verses-in-mint-fortunes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8DQ3s7eSp7ImA9WhdXE0o.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-6942327627539597639</id><published>2011-08-26T19:01:00.001+02:00</published><updated>2011-08-26T19:14:32.501+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-26T19:14:32.501+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="latex" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Colored initials in LaTeX</title><content type="html">Georg Duffner, the creator of the &lt;a href="http://www.georgduffner.at/ebgaramond/"&gt;EB Garamond open-source font&lt;/a&gt;, has been working on an initials font for EB Garamond based on a 16th century French Bible lately. A few days ago, he was thinking about producing colored initials with it, and had the idea of splitting the font in two: one font for the background ornament, and one font for the foreground letter to superimpose on it.&lt;br /&gt;
&lt;br /&gt;
Base on this idea, I have hacked a little LaTeX module to typeset the initials in a simple way. The module can be found &lt;a href="https://github.com/raphink/eblettrine"&gt;on github&lt;/a&gt; and is based on the &lt;tt&gt;lettrine&lt;/tt&gt; LaTeX module.&lt;br /&gt;
&lt;br /&gt;
It makes use of &lt;tt&gt;fontspec&lt;/tt&gt; to load the fonts so it only works with XeTeX and LuaTeX.&lt;br /&gt;
&lt;br /&gt;
The alphabet only contains 3 letters for now, so not really much can be achieved with it so far, but the code is there.&lt;br /&gt;
&lt;br /&gt;
Here is an example reproducing parts of the 16th century Bible used to get the samples of the initials:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-uK_mExAe3SU/TlfRGdJGZEI/AAAAAAAADUQ/5yw2_thGt44/s1600/eblettrine.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="320" width="222" src="http://1.bp.blogspot.com/-uK_mExAe3SU/TlfRGdJGZEI/AAAAAAAADUQ/5yw2_thGt44/s320/eblettrine.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-6942327627539597639?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2qzsqtNoda3ntZu8HaNKvUvbqbg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2qzsqtNoda3ntZu8HaNKvUvbqbg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2qzsqtNoda3ntZu8HaNKvUvbqbg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2qzsqtNoda3ntZu8HaNKvUvbqbg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/yVA15QBWkls" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/6942327627539597639/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=6942327627539597639" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6942327627539597639?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6942327627539597639?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/yVA15QBWkls/colored-initials-in-latex.html" title="Colored initials in LaTeX" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-uK_mExAe3SU/TlfRGdJGZEI/AAAAAAAADUQ/5yw2_thGt44/s72-c/eblettrine.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://www.raphink.info/2011/08/colored-initials-in-latex.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MGRXgzfip7ImA9WhZWE0w.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-5583621313669018455</id><published>2011-05-11T23:12:00.000+02:00</published><updated>2011-05-13T22:43:44.686+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-13T22:43:44.686+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="god" /><category scheme="http://www.blogger.com/atom/ns#" term="bible" /><title>Keeping the Law — for whose sake?</title><content type="html">&lt;p style=text-align:center;font-style:italic"&gt;Ye hypocrites, well did Esaias prophesy of you, saying,&lt;br /&gt;
&lt;br /&gt;
This people draweth nigh unto me with their mouth, and honoureth me with their lips; but their heart is far from me.&lt;br /&gt;
&lt;br /&gt;
Matthew 15:7—8&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Many times, Jesus called people — especially the Pharisees — hypocrites. This puzzled His disciples quite a bit, because the Pharisees where people who kept the Law strictly. How could people who kept the Law be wrong? Well, the problem is that they kept the Law &lt;i&gt;outwardly&lt;/i&gt; but not &lt;i&gt;inwardly&lt;/i&gt;.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I heard many comments on the subject over the years, but something about this struck me today. Who were the Pharisees keeping the Law for? For whose sake do we act the way we do? Jesus said that when you desire a woman, you've already committed adultery with her in your heart, and that when you insult someone — even in your heart — you've already committed murder.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;What is it that keeps me from acting the thoughts I have? Why do I sometimes let myself desire a woman, but I won't commit adultery in real life? Let's face it: even a lot of non believers have never committed adultery, let alone murder. I think the problem is here: for whose sake do you act the way you do? For God's sake, or for your own?&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Many people act properly for their own sake ; they are afraid of what people will think about them, or do to them, if they don't act nicely. They keep the Law for their own sake — because of fear, or because of pride — and they have no reason to keep their thoughts as clean as their acts.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Jesus called us to go much further than that. He said we should actually keep even our thoughts clean. Why? For God's sake! It's not so much that I should look like a perfect person, that I should care about what people think about me — if they will judge me, hate me, stone me — if I don't act properly. No, there's someone — God — who knows more about myself than I even do, and for His sake, I should be perfect, because He said : "Be ye therefore perfect, even as your Father which is in heaven is perfect" (Matthew 5:48).&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;As Christians, we so often tend to think that we can do it the easy way: starting by cleaning ourselves outwardly, and finishing with the inside. It doesn't work that way, because the goal is not the same. If you care to clean the outside first, you're doing it for your own sake, but cleaning the inside requires doing it for God's sake, for the inward cleaning is the work of the Holy Spirit in our lives.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Your motivation defines where you're heading. If you act the way you do for your own sake, you will stay stuck with the outward issues of your life. If you want to give it all to God and change for His sake, asking the Holy Spirit to cleanse you from the inside — even if it might take longer and be more painful — He will do this work in you, and it will end up showing up outwardly in your life.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p style=text-align:center;font-style:italic"&gt;Father Almighty,&lt;br /&gt;
&lt;br /&gt;
I realize my own efforts to purify myself are vain because they are only motivated by fear and pride, and they do not cleanse me internally — for Your sake.&lt;br /&gt;
&lt;br /&gt;
I pray Lord that you send your Holy Spirit in my life to achieve the work within me, that I may be perfected to your image inwardly, and shine of your glory outwardly.&lt;br /&gt;
&lt;br /&gt;
In Jesus' name. Amen.&lt;br /&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-5583621313669018455?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/u6pskZDgdHNRdzGTN5ZcCJlYzUQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u6pskZDgdHNRdzGTN5ZcCJlYzUQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/u6pskZDgdHNRdzGTN5ZcCJlYzUQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u6pskZDgdHNRdzGTN5ZcCJlYzUQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/lfbN4KqW6fY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/5583621313669018455/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=5583621313669018455" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/5583621313669018455?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/5583621313669018455?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/lfbN4KqW6fY/keeping-law-for-whose-sake.html" title="Keeping the Law — for whose sake?" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2011/05/keeping-law-for-whose-sake.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAAQ306cCp7ImA9WhZQEk0.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-8529388002495183472</id><published>2011-04-14T12:30:00.004+02:00</published><updated>2011-04-19T10:12:22.318+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-19T10:12:22.318+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="latex" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>The fancytabs LaTeX package</title><content type="html">Lately, I've been using LaTeX quite a bit, and defining my own macros. Today is the occasion for me to release my first package: fancytabs.&lt;br /&gt;
&lt;br /&gt;
This is a package that allows to add fancy tabs on the border of pages in a document.&lt;br /&gt;
&lt;br /&gt;
The package can be downloaded &lt;a href="http://www.ctan.org/tex-archive/macros/latex/contrib/fancytabs"&gt;from the CTAN&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Installing&lt;/h4&gt;&lt;br /&gt;
After downloading and unzipping the file, run &lt;tt&gt;latex&lt;/tt&gt; on the &lt;tt&gt;fancytabs.ins&lt;/tt&gt; file. This will produce a &lt;tt&gt;fancytabs.sty&lt;/tt&gt; file which provides the package. You can also build the PDF documentation by running &lt;tt&gt;pdflatex&lt;/tt&gt; on the &lt;tt&gt;fancytabs.dtx&lt;/tt&gt; file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;What does it look like?&lt;/h4&gt;&lt;br /&gt;
Here is an example of a page featuring a fancy tab:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-mOgyY1QE56U/TabLiVdEfsI/AAAAAAAADM0/u-QPK7hENgo/s1600/fancytabs.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="320" width="214" src="http://2.bp.blogspot.com/-mOgyY1QE56U/TabLiVdEfsI/AAAAAAAADM0/u-QPK7hENgo/s320/fancytabs.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-8529388002495183472?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/A1iIf0yT2F7UnAQftXVQSzGz2LY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/A1iIf0yT2F7UnAQftXVQSzGz2LY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/A1iIf0yT2F7UnAQftXVQSzGz2LY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/A1iIf0yT2F7UnAQftXVQSzGz2LY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/Q4aNsEjBzTY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/8529388002495183472/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=8529388002495183472" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/8529388002495183472?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/8529388002495183472?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/Q4aNsEjBzTY/fancytabs-latex-package.html" title="The fancytabs LaTeX package" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-mOgyY1QE56U/TabLiVdEfsI/AAAAAAAADM0/u-QPK7hENgo/s72-c/fancytabs.png" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://www.raphink.info/2011/04/fancytabs-latex-package.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEBQHs_eSp7ImA9WhZSFUs.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-4700270121097884300</id><published>2011-03-29T22:43:00.002+02:00</published><updated>2011-03-31T12:17:31.541+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-31T12:17:31.541+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="latex" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="augeas" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Syntax highlighting in LaTeX</title><content type="html">Lately, I have been busy making a &lt;a href="https://github.com/raphink/Augeas-book"&gt;book on Augeas&lt;/a&gt;. I wanted something that would look nice, and that would use only LaTeX.&lt;br /&gt;
&lt;br /&gt;
A colleague of mine told me to have a look at the &lt;a href="http://pygments.org/"&gt;Pygments syntax highlighter&lt;/a&gt; and its LaTeX module &lt;a href="http://code.google.com/p/minted/"&gt;minted&lt;/a&gt;. I'm very happy with them so far.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Installing Pygments&lt;/h4&gt;&lt;br /&gt;
Installing Pygments on Ubuntu is as easy as can be:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ sudo apt-get install python-pygments
&lt;/pre&gt;&lt;br /&gt;
This provides a &lt;tt&gt;/usr/bin/pygmentize&lt;/tt&gt; command, which is then used by minted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Installing minted&lt;/h4&gt;&lt;br /&gt;
I didn't find a package for minted, so I downloaded the files &lt;a href="http://www.ctan.org/tex-archive/macros/latex/contrib/minted/"&gt;from the CTAN&lt;/a&gt; and made a &lt;tt&gt;minted&lt;/tt&gt; directory in my source.&lt;br /&gt;
&lt;br /&gt;
When building with &lt;tt&gt;pdflatex&lt;/tt&gt;, I make sure to export the &lt;tt&gt;TEXINPUTS=minted:&lt;/tt&gt; variable so that &lt;tt&gt;pdflatex&lt;/tt&gt; uses the &lt;tt&gt;minted&lt;/tt&gt; directory for inclusions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Adding syntax highlighting&lt;/h4&gt;&lt;br /&gt;
Now that all the tools are installed, we need to actually use them in the LaTeX source. Here is a simple example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;\mint{console}|$ sudo apt-get install augeas-tools|
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
A multi-line example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;\begin{minted}{console}
$ sudo yum install readline-devel
$ sudo apt-get install libreadline-dev
\end{minted}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
And even a listing example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;\begin{listing}
  \begin{minted}{augtool-shell}
/files/etc/foo.conf
/files/etc/foo.conf/#include = /etc/foo.d/*
  \end{minted}
  \caption{Augeas does not interpret include statements}
  \label{lst:intro_include_tree}
\end{listing}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
There is much that can be done, and the &lt;a href="http://mirrors.ctan.org/macros/latex/contrib/minted/minted.pdf"&gt;documentation is well made&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;I'm missing lexers&lt;/h4&gt;&lt;br /&gt;
I would love my book to be full of colours. Not only for languages that are well known, but also, and especially, for the languages and commands that are specific to Augeas.&lt;br /&gt;
&lt;br /&gt;
Of course, Pygments doesn't provide lexers for Augeas syntax (yet), so I need to write them.&lt;br /&gt;
&lt;br /&gt;
The first lexer I would like to have is the &lt;tt&gt;augtool-shell&lt;/tt&gt; lexer, which will put syntax highlighting on commands from an &lt;tt&gt;augtool&lt;/tt&gt; session.&lt;br /&gt;
&lt;br /&gt;
My lexer looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;import re

try:
    set
except NameError:
    from sets import Set as set
from bisect import bisect

from pygments.lexer import Lexer, LexerContext, RegexLexer, ExtendedRegexLexer, \
     bygroups, include, using, this, do_insertions
from pygments.token import Punctuation, Text, Comment, Keyword, Name, String, \
     Generic, Operator, Number, Whitespace, Literal
from pygments.util import get_bool_opt
from pygments.lexers.other import BashLexer

__all__ = ['AugtoolShellLexer']


class AugtoolShellLexer(RegexLexer):
    """
    Lexer for Augtool shell sessions.
    """

    name = 'AugtoolShell'
    aliases = ['augtool-shell']
    filenames = ['*.augtoolshell']
    mimetypes = ['text/x-augtool-shell']

    tokens = {
        'root': [
            (r'^\s+$', Text),           # empty line
            (r'^[;#].*?$', Comment),    # comment
            (r'^(rm\s+:.*)', Text),     # removed nodes
            (r'^(Saved.*)', Text),      # saved
            (r'^(augtool\&gt;)(\s+)(\S+)(?:(\s+)(.*))?$',   # augtool prompt
             bygroups(Generic.Prompt, Whitespace, Keyword, Whitespace, String)),
            (r'^([^=]+)(?:(\s+)(=)(\s+)(.*))?$',    # ls/get/print
             bygroups(String, Whitespace, Operator, Whitespace, String)),
            (r'^(\S+)(\s+)(label)(=)(\S+)(\s+)(value)(=)(\S+)(\s+)(span)(=)(\S+)$',  # span output
             bygroups(String, Whitespace, Keyword, Operator, String, Whitespace,
                                    Keyword, Operator, String, Whitespace,
                                    Keyword, Operator, String)),
        ]
    }
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
It is located in the &lt;tt&gt;augeas-lexer/augeaslexer/augeaslexer.py&lt;/tt&gt; file, and the &lt;tt&gt;augeas-lexer&lt;/tt&gt; directory contains the following files:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;augeas-lexer/
├── augeaslexer
│   ├── augeaslexer.py
│   └── __init__.py
└── setup.py
&lt;/pre&gt;&lt;br /&gt;
&lt;tt&gt;__init__.py&lt;/tt&gt; is an empty file, and &lt;tt&gt;setup.py&lt;/tt&gt; contains the following:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;"""
Augeas syntax highlighting for Pygments.
"""

from setuptools import setup

entry_points = """
[pygments.lexers]
augtool-shell = augeaslexer.augeaslexer:AugtoolShellLexer
"""

setup(
    name         = 'augeaslexer',
    version      = '0.1',
    description  = __doc__,
    author       = "Raphael Pinson",
    packages     = ['augeaslexer'],
    entry_points = entry_points
)
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
In order to build with this new lexer, I need to install it in my system (if someone knows how to do without this step, I'll be very happy to hear it!). The following command does that:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ sudo python setup.py install
&lt;/pre&gt;&lt;br /&gt;
Now when I run &lt;tt&gt;pygmentize&lt;/tt&gt;, I should see my lexer:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ pygmentize -L | grep augtool
* augtool-shell:
    AugtoolShell (filenames *.augtoolshell)
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I've actually added (or begun to add) 3 more lexers to my module: &lt;tt&gt;AugtoolLexer&lt;/tt&gt;, &lt;tt&gt;AugeasLexer&lt;/tt&gt; and &lt;tt&gt;PuppetAugeasLexer&lt;/tt&gt;.&lt;br /&gt;
&lt;br /&gt;
The result can be see in the &lt;a href="http://www.scribd.com/doc/51028532/Augeas-devel"&gt;PDF version of the book&lt;/a&gt; (which is still a work in progress).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Defining macros&lt;/h4&gt;&lt;br /&gt;
One thing LaTeX users love is its flexibility. On big projects such as books, it is often useful to define macros and new environments.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a listing containing several languages with line numbering. The macros take care of applying the line numbering options (&lt;tt&gt;linenos&lt;/tt&gt; and &lt;tt&gt;firstnumber&lt;/tt&gt;) and defining the standard options for my document (&lt;tt&gt;fontsize=\footnotesize&lt;/tt&gt; and &lt;tt&gt;bgcolor=bg&lt;/tt&gt;).&lt;br /&gt;
&lt;br /&gt;
The macros look like this:&lt;br /&gt;
&lt;pre&gt;% minted commands

\newcommand{\mymint}[3][]{\mint[fontsize=\footnotesize,bgcolor=bg,#1]{#2}#3}
\newcommand{\consolecode}[2][]{\mymint[#1]{console}#2}
\newcommand{\augtoolshcode}[2][]{\mymint[#1]{augtool-shell}#2}

% inputminted

\newcommand{\myinputminted}[3][]{\inputminted[fontsize=\footnotesize,bgcolor=bg,#1]{#2}{../listings/#3}}
&lt;/pre&gt;&lt;br /&gt;
And the listing:&lt;br /&gt;
&lt;pre&gt;\begin{listing}
  \consolecode[linenos]|$ augtool --backup --root myroot|
  \myinputminted[linenos,firstnumber=2]{augtool-shell}{rm_fstab_opt.augtoolshell}
  \consolecode[linenos,firstnumber=15]|$ diff -u myroot/etc/fstab myroot/etc/fstab.augsave|
  \myinputminted[linenos,firstnumber=16]{diff}{fstab_opt.diff}
  \caption{Removing an option in fstab}
  \label{lst:rm_fstab_opt}
\end{listing}
&lt;/pre&gt;&lt;br /&gt;
This produces the following output:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-N6-7VH4NLsc/TZRUn5R7adI/AAAAAAAADMo/llrjROALfjY/s1600/listing_minted_macros.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="238" width="320" src="http://1.bp.blogspot.com/-N6-7VH4NLsc/TZRUn5R7adI/AAAAAAAADMo/llrjROALfjY/s320/listing_minted_macros.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-4700270121097884300?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fUVkFQDVVf9nkCsfrzP0wrCiggY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fUVkFQDVVf9nkCsfrzP0wrCiggY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fUVkFQDVVf9nkCsfrzP0wrCiggY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fUVkFQDVVf9nkCsfrzP0wrCiggY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/3FMl2M_0oi0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/4700270121097884300/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=4700270121097884300" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/4700270121097884300?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/4700270121097884300?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/3FMl2M_0oi0/syntax-highlighting-in-latex.html" title="Syntax highlighting in LaTeX" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-N6-7VH4NLsc/TZRUn5R7adI/AAAAAAAADMo/llrjROALfjY/s72-c/listing_minted_macros.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2011/03/syntax-highlighting-in-latex.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IGQnwyeCp7ImA9WhZTFEk.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-6407013771076090572</id><published>2011-03-18T11:52:00.000+01:00</published><updated>2011-03-18T11:52:03.290+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-18T11:52:03.290+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="git" /><category scheme="http://www.blogger.com/atom/ns#" term="augeas" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Changing a remote URL in git</title><content type="html">You cloned a git repository using a public URL, and now everytime you want to push to it, you have to specify the push R/W URL because the public URL you used to pull is read-only.&lt;br /&gt;
&lt;br /&gt;
This happened to me:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ git remote show origin 
* remote origin
  Fetch URL: git://git.fedorahosted.org/git/augeas.git
  Push  URL: git://git.fedorahosted.org/git/augeas.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
and here is how I fixed it:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ git remote set-url --push origin ssh://raphink@git.fedorahosted.org/git/augeas.git
$ git remote show origin 
* remote origin
  Fetch URL: git://git.fedorahosted.org/git/augeas.git
  Push  URL: ssh://raphink@git.fedorahosted.org/git/augeas.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)
&lt;/pre&gt;&lt;br /&gt;
Note that the --push option modified only the push URL, so I keep using the public URL for fetching, which is fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-6407013771076090572?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/SZGQl8q9VMLxfGDrrzcHM8H5iI4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SZGQl8q9VMLxfGDrrzcHM8H5iI4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/SZGQl8q9VMLxfGDrrzcHM8H5iI4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/SZGQl8q9VMLxfGDrrzcHM8H5iI4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/dw-350WLDk8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/6407013771076090572/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=6407013771076090572" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6407013771076090572?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6407013771076090572?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/dw-350WLDk8/changing-remote-url-in-git.html" title="Changing a remote URL in git" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2011/03/changing-remote-url-in-git.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEIASHc-eyp7ImA9Wx9bGE4.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-6828052688400333195</id><published>2011-02-25T23:13:00.000+01:00</published><updated>2011-02-27T19:49:09.953+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-27T19:49:09.953+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="config-augeas-exporter" /><category scheme="http://www.blogger.com/atom/ns#" term="perl" /><category scheme="http://www.blogger.com/atom/ns#" term="augeas" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Introducing Config::Augeas::Exporter</title><content type="html">Following my little experiments &lt;a href="http://www.raphink.info/2011/02/exporting-augeas-tree-to-xml.html"&gt;from two days ago&lt;/a&gt;, I decided to turn my prototype into a Perl module so others could benefit from it.&lt;br /&gt;
&lt;br /&gt;
I am therefore happy to introduce &lt;a href="http://search.cpan.org/~raphink/Config-Augeas-Exporter-0.1/lib/Config/Augeas/Exporter.pm"&gt;Config::Augeas::Exporter&lt;/a&gt;, uploaded today to the CPAN. Packages are also available for Ubuntu Lucid and Natty in &lt;a href="https://launchpad.net/~raphink/+archive/augeas/+packages"&gt;the Augeas PPA&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
This module wraps up around &lt;a href="http://search.cpan.org/~ddumont/Config-Augeas-0.701/lib/Config/Augeas.pm"&gt;Config::Augeas&lt;/a&gt; and currently provides 4 public export methods:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;to_xml(): export the Augeas tree to an XML::LibXML::Document object ;&lt;/li&gt;
&lt;li&gt;to_hash(): export the Augeas tree to a hash ;&lt;/li&gt;
&lt;li&gt;to_json(): export the Augeas tree to a JSON document ;&lt;/li&gt;
&lt;li&gt;to_yaml(): export the Augeas tree to a YAML document ;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
In addition to this, it also provides a from_xml() method to import back an XML exported tree.&lt;br /&gt;
&lt;br /&gt;
The module is shipped with two scripts, aug2xml and xml2aug, which are essentially the scripts presented in &lt;a href="http://www.raphink.info/2011/02/exporting-augeas-tree-to-xml.html"&gt;my previous blog entry&lt;/a&gt;, rewritten to use the module.&lt;br /&gt;
&lt;br /&gt;
Thanks to the great advice of &lt;a href="http://watzmann.net/lutter/"&gt;David Lutterkort&lt;/a&gt;, Augeas' main developer, the XML layout has been improved, which makes it much nicer, smaller, easier to parse, and much easier to import back.&lt;br /&gt;
&lt;br /&gt;
As a result of this, xml2aug is now able to replace only the files listed in the XML document, instead of replacing the whole tree.&lt;br /&gt;
&lt;br /&gt;
Here are some examples of what can be done with aug2xml and xml2aug:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# Let's export the pam.d files only, excluding the comment nodes
$ aug2xml -p '/files/etc/pam.d' -e "#comment"  &amp;gt; export.xml
# How many files where exported?
$ grep -o "&amp;lt;file" export.xml | wc -l
34
$ ls -lh export.xml 
-rw-r--r-- 1 raphink raphink 20K 2011-02-25 23:06 export.xml
# We can try some XPath requests on the file
# For example finding the control condition
# for the pam_env.so module in the cron rule
$ xpath -e '//file[@path="/etc/pam.d/cron"]/node[node[@label="module"]="pam_env.so"]/node[@label="control"]' export.xml 
Found 2 nodes in export.xml:
-- NODE --
&lt;node label="control"&gt;required&lt;/node&gt;
-- NODE --
&lt;node label="control"&gt;required&lt;/node&gt;
# Now let's import it back to a clean fakeroot
$ mkdir -p fakeroot/etc/pam.d
$ xml2aug -r fakeroot/ -f export.xml
$ tree fakeroot/
fakeroot/
└── etc
    └── pam.d
        ├── atd
        ├── chfn
        ├── chpasswd
        ├── chsh
        ├── common-account
        ├── common-auth
        ├── common-password
        ├── common-session
        ├── common-session-noninteractive
        ├── cron
        ├── cups
        ├── cvs
        ├── gdm
        ├── gdm-autologin
        ├── gnome-screensaver
        ├── kcheckpass
        ├── kdm
        ├── kdm-kde4
        ├── kdm-kde4-np
        ├── kdm-np
        ├── kscreensaver
        ├── login
        ├── newusers
        ├── other
        ├── passwd
        ├── polkit
        ├── polkit-1
        ├── ppp
        ├── samba
        ├── sshd
        ├── su
        ├── sudo
        └── xscreensaver

2 directories, 33 files
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-6828052688400333195?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0nulD-sn037J5G2bk1IQljUgyXo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0nulD-sn037J5G2bk1IQljUgyXo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0nulD-sn037J5G2bk1IQljUgyXo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0nulD-sn037J5G2bk1IQljUgyXo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/VNU0rEBdKF0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/6828052688400333195/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=6828052688400333195" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6828052688400333195?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6828052688400333195?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/VNU0rEBdKF0/introducing-configaugeasexporter.html" title="Introducing Config::Augeas::Exporter" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2011/02/introducing-configaugeasexporter.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08HRX0zcCp7ImA9Wx9bFUk.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-3917688057556335477</id><published>2011-02-24T11:21:00.000+01:00</published><updated>2011-02-24T12:10:34.388+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-24T12:10:34.388+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="augeas" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Augeas 0.8.0</title><content type="html">Right on time for Natty feature freeze, &lt;a href="http://www.augeas.net"&gt;Augeas&lt;/a&gt; 0.8.0 &lt;a href="https://www.redhat.com/archives/augeas-devel/2011-February/msg00068.html"&gt;has been released&lt;/a&gt; and is uploaded to Natty!&lt;br /&gt;
&lt;br /&gt;
Packages are also available for Lucid and Maverick in the &lt;a href="https://launchpad.net/~raphink/+archive/augeas/+packages"&gt;Augeas PPA&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;What's new in Augeas?&lt;/h4&gt;&lt;br /&gt;
Well, quite a bit. To begin with, thanks to the great work of &lt;a href="http://multivax.blogspot.com/"&gt;Francis Giraldeau&lt;/a&gt;, the main change is the addition of a new "square" lens combinator, which makes it possible to write such lenses as XML or Apache. Francis has committed both xml.aug and httpd.aug.&lt;br /&gt;
&lt;br /&gt;
Antoher improvement which I am sure will bear fruits in the future is the addition of the aug_span API call. This will allow developments such as &lt;a href="http://multivax.blogspot.com/2010/10/augedit-regedit-for-linux.html"&gt;augedit&lt;/a&gt;, which could greatly improve configuration management GUIs.&lt;br /&gt;
&lt;br /&gt;
Augtool has also benefitted quite a bit from this release, gaining a few options:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;--autosave makes sure to call "save" after all commands are issued ;&lt;/li&gt;
&lt;li&gt;--interactive lets you run an interactive shell after intepreting the commands passed in a file or via STDIN (see &lt;a href="http://www.raphink.info/2011/02/manually-associating-lenses-with-files.html"&gt;this post&lt;/a&gt; for an example) ;&lt;/li&gt;
&lt;li&gt;--nostdinc, --noload and --noautoload have gained short options, so they can be used with augtool as an interpreter (in a shebang).&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
With these improvements in augtool, you can now write a script like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#!/usr/bin/augtool -Asif

set /augeas/load/Json/lens Json.lns
set /augeas/load/Json/incl /home/raphink/myjson.json
load
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Make this script executable and run it, and you will get an interactive shell with only /home/raphink/myjson.json parsed (hence a very low loading payload due to the -A flag). The -s flag will ensure that "save" is called when you quit the shell.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;What's new in the Ubuntu package?&lt;/h4&gt;&lt;br /&gt;
Improvements have also been made in the last versions of the augeas package in Ubuntu. In 0.7.4, an augeas-doc package has been added. This package has been complemented in 0.8.0, so now it includes:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Generated API docs (with NaturalDocs) for the C API and lenses ;&lt;/li&gt;
&lt;li&gt;Generated PDF docs about &lt;a href="http://en.wikipedia.org/wiki/Bidirectional_Transformation"&gt;bx&lt;/a&gt; theory on lenses and ambiguity ;&lt;/li&gt;
&lt;li&gt;Text docs about XPath expressions (see also &lt;a href="http://augeas.net/page/Path_expressions"&gt;the Augeas wiki&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Feedback&lt;/h4&gt;&lt;br /&gt;
We love to know what you do with Augeas, and the ideas that you have to improve it. We also like to know when things don't work so we can fix them.&lt;br /&gt;
&lt;br /&gt;
There are many ways to &lt;a href="http://augeas.net/developers.html"&gt;contribute to Augeas&lt;/a&gt;, so don't hesitate to join us!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-3917688057556335477?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/821KUQbhghrKDn8lrKGl6tX3fRA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/821KUQbhghrKDn8lrKGl6tX3fRA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/821KUQbhghrKDn8lrKGl6tX3fRA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/821KUQbhghrKDn8lrKGl6tX3fRA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/z6Qh8qp1-mM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/3917688057556335477/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=3917688057556335477" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/3917688057556335477?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/3917688057556335477?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/z6Qh8qp1-mM/augeas-080.html" title="Augeas 0.8.0" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2011/02/augeas-080.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYHRnk8fCp7ImA9Wx9bFU4.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-6690242368730677488</id><published>2011-02-24T09:45:00.000+01:00</published><updated>2011-02-24T09:45:37.774+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-24T09:45:37.774+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="packaging" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Version number suggests Ubuntu changes</title><content type="html">Today, I was updating an Ubuntu package whose maintainer in Debian has a @canonical.com address.&lt;br /&gt;
&lt;br /&gt;
When I was building the source package, I kept getting an error:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;Version number suggests Ubuntu changes, but Maintainer: does not have Ubuntu address
&lt;/pre&gt;&lt;br /&gt;
This error crashed dpkg-source and prevented me from building the source package.&lt;br /&gt;
&lt;br /&gt;
Upon looking into the code (/usr/share/perl5/Dpkg/Vendor/Ubuntu.pm), I found that this errors only when DEBEMAIL is defined in the environment with a @ubuntu.com address ; a warning is issued otherwise.&lt;br /&gt;
&lt;br /&gt;
So if you ever have this problem, it's easily fixed by unsetting DEBEMAIL:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ unset DEBEMAIL
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-6690242368730677488?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TAhix_exzb0nKD94PlPh5jCNzVU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TAhix_exzb0nKD94PlPh5jCNzVU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TAhix_exzb0nKD94PlPh5jCNzVU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TAhix_exzb0nKD94PlPh5jCNzVU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/UyeVr3jfCo4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/6690242368730677488/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=6690242368730677488" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6690242368730677488?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6690242368730677488?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/UyeVr3jfCo4/version-number-suggests-ubuntu-changes.html" title="Version number suggests Ubuntu changes" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2011/02/version-number-suggests-ubuntu-changes.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEEHSX86eSp7ImA9Wx9bGE4.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-6165199566875684956</id><published>2011-02-23T09:00:00.000+01:00</published><updated>2011-02-27T19:50:38.111+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-27T19:50:38.111+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="config-augeas-exporter" /><category scheme="http://www.blogger.com/atom/ns#" term="perl" /><category scheme="http://www.blogger.com/atom/ns#" term="augeas" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Exporting the Augeas tree to XML</title><content type="html">While &lt;a href="http://www.augeas.net"&gt;Augeas&lt;/a&gt; is usually used to modify configuration files (for example as a &lt;a href="http://projects.puppetlabs.com/projects/1/wiki/Puppet_Augeas"&gt;Puppet type&lt;/a&gt;), it can also be useful to request configuration files.&lt;br /&gt;
&lt;br /&gt;
Sometimes, you might want to retrieve that information from several servers and gather it on a central machine or DB to request it later. Programs that permit this usually use several parsing modules or copy the configuration files verbatim.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;aug2xml&lt;/h4&gt;&lt;br /&gt;
Since Augeas can now parse a lot of configuration files, it could be useful to export its tree to a XML file that could be stored and used elsewhere.&lt;br /&gt;
&lt;br /&gt;
The problem, however, is that the Augeas tree is not valid XML. Mainly, the nodes in Augeas can be numbers (in the case of "seq" nodes) or begin with such characters as "#". These names are illegal as node names in XML.&lt;br /&gt;
&lt;br /&gt;
For this reason, I have chosen to map the nodes as "node" elements, and use a "label" attribute to store their label. The value of the nodes (where there is node) is stored in the text sub-node.&lt;br /&gt;
&lt;br /&gt;
The following script is a prototype to export the Augeas tree to an XML file. On Debian and Ubuntu systems, you will need to install the libconfig-augeas-perl, libxml-libxml-perl and libencode-perl packages:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ sudo apt-get install libconfig-augeas-perl \
    libxml-libxml-perl libencode-perl
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Here is the script:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#!/usr/bin/perl -w

use strict;
use Config::Augeas;
use XML::LibXML;
use Getopt::Long;
use Encode;

my $path = '/files';
my $root = '/';
my $verbose;
my $debug;
my $help;

my $result = GetOptions (
   "path=s" =&gt; \$path,
   "root=s" =&gt; \$root,
   "verbose" =&gt; \$verbose,
   "debug" =&gt; \$debug,
   "help" =&gt; \$help,
   );

if ($help) {
   usage();
   exit 0;
}

$verbose ||= $debug;

my $aug = Config::Augeas-&gt;new(root =&gt; $root);
my $doc = XML::LibXML::Document-&gt;new('1.0', 'utf-8');

my $elem = aug2xml($path);
$doc-&gt;setDocumentElement($elem);
print $doc-&gt;toString;


#######
# Subs
#######

sub usage {
   print "$0 [-p &lt;path&gt;] [-r fakeroot] [-v] [-d] [-h]

 Flags:
   -h, --help             Show this help
   -v, --verbose          Verbose mode
   -d, --debug            Debug mode

 Options:
   -p, --path &lt;path&gt;      Set path to export
   -r, --root &lt;fakeroot&gt;  Set fakeroot for Augeas
";
}


sub aug2xml {
   my ($path) = @_;

   my $label = '';
   if ($path =~ m|.*/([^/\[]+)(\[\d+\])?|) {
      $label = $1;
   } else {
      warn "W: Could not parse $path\n";
   }
   my $elem = XML::LibXML::Element-&gt;new('node');
   $elem-&gt;setAttribute("label", $label);

   my $value = $aug-&gt;get($path);
   if(defined($value)) {
      $elem-&gt;appendTextNode(encode('utf-8', $value));
   }

   $path =~ s| |\\ |g;
   my @children = $aug-&gt;match("$path/*");

   for my $child (@children) {
      my $child_elem = aug2xml($child);
      $elem-&gt;appendChild($child_elem);
   }

   return $elem;
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Having saved this code as aug2xml and made it executable, you can run:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ ./aug2xml &gt; export.xml
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
This should create an export.xml file which contains all the configuration files in your system that Augeas was able to parse.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Looking into the XML export&lt;/h4&gt;&lt;br /&gt;
Now we've created the export.xml file, let's see how it looks. I've created mine from a fakeroot containing only fstab and aliases files, so it's not too big.&lt;br /&gt;
&lt;br /&gt;
We can use tools such as xmlindent to view it nicely:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
 &amp;lt;node label="files"&amp;gt;
  &amp;lt;node label="etc"&amp;gt;
   &amp;lt;node label="aliases"&amp;gt;
    &amp;lt;node label="#comment"&amp;gt;See man 5 aliases for format&amp;lt;/node&amp;gt;
     &amp;lt;node label="1"&amp;gt;
      &amp;lt;node label="name"&amp;gt;postmaster&amp;lt;/node&amp;gt;
      &amp;lt;node label="value"&amp;gt;root&amp;lt;/node&amp;gt;
     &amp;lt;/node&amp;gt;
    &amp;lt;/node&amp;gt;
    &amp;lt;node label="fstab"&amp;gt;
     &amp;lt;node label="#comment"&amp;gt;/etc/fstab: static file system information.&amp;lt;/node&amp;gt;
     &amp;lt;node label="#comment"&amp;gt;Use 'blkid -o value -s UUID' to print the universally unique identifier&amp;lt;/node&amp;gt;
     &amp;lt;node label="#comment"&amp;gt;for a device; this may be used with UUID= as a more robust way to name&amp;lt;/node&amp;gt;
     &amp;lt;node label="#comment"&amp;gt;devices that works even if disks are added and removed. See fstab(5).&amp;lt;/node&amp;gt;
     &amp;lt;node label="#comment"&amp;gt;&amp;amplt;file system&amp;ampgt; &amp;amplt;mount point&amp;ampgt;   &amp;amplt;type&amp;ampgt;  &amp;amplt;options&amp;ampgt;       &amp;amplt;dump&amp;ampgt;  &amp;amplt;pass&amp;ampgt;&amp;lt;/node&amp;gt;
     &amp;lt;node label="1"&amp;gt;
      &amp;lt;node label="spec"&amp;gt;proc&amp;lt;/node&amp;gt;
      &amp;lt;node label="file"&amp;gt;/proc&amp;lt;/node&amp;gt;
      &amp;lt;node label="vfstype"&amp;gt;proc&amp;lt;/node&amp;gt;
      &amp;lt;node label="opt"&amp;gt;nodev&amp;lt;/node&amp;gt;
      &amp;lt;node label="opt"&amp;gt;noexec&amp;lt;/node&amp;gt;
      &amp;lt;node label="opt"&amp;gt;nosuid&amp;lt;/node&amp;gt;
      &amp;lt;node label="dump"&amp;gt;0&amp;lt;/node&amp;gt;
      &amp;lt;node label="passno"&amp;gt;0&amp;lt;/node&amp;gt;
     &amp;lt;/node&amp;gt;
     &amp;lt;node label="#comment"&amp;gt;/ was on /dev/sda1 during installation&amp;lt;/node&amp;gt;
     &amp;lt;node label="2"&amp;gt;
      &amp;lt;node label="spec"&amp;gt;UUID=4cbb4f80-45f9-4e46-a076-8ec1124f4835&amp;lt;/node&amp;gt;
      &amp;lt;node label="file"&amp;gt;/&amp;lt;/node&amp;gt;
      &amp;lt;node label="vfstype"&amp;gt;ext3&amp;lt;/node&amp;gt;
      &amp;lt;node label="opt"&amp;gt;errors
       &amp;lt;node label="value"&amp;gt;remount-ro&amp;lt;/node&amp;gt;
      &amp;lt;/node&amp;gt;
      &amp;lt;node label="dump"&amp;gt;0&amp;lt;/node&amp;gt;
      &amp;lt;node label="passno"&amp;gt;1&amp;lt;/node&amp;gt;
     &amp;lt;/node&amp;gt;
     &amp;lt;node label="3"&amp;gt;
      &amp;lt;node label="spec"&amp;gt;/dev/sda2&amp;lt;/node&amp;gt;
      &amp;lt;node label="file"&amp;gt;none&amp;lt;/node&amp;gt;
      &amp;lt;node label="vfstype"&amp;gt;swap&amp;lt;/node&amp;gt;
      &amp;lt;node label="opt"&amp;gt;rw&amp;lt;/node&amp;gt;
      &amp;lt;node label="dump"&amp;gt;0&amp;lt;/node&amp;gt;
      &amp;lt;node label="passno"&amp;gt;0&amp;lt;/node&amp;gt;
     &amp;lt;/node&amp;gt;
    &amp;lt;/node&amp;gt;
   &amp;lt;/node&amp;gt;
  &amp;lt;/node&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Let's play with the XML export&lt;/h4&gt;&lt;br /&gt;
So now we have an XML export of our configuration. What now? Let's try to make requests on it!&lt;br /&gt;
&lt;br /&gt;
Because of the choices explained above which turn out every node to be named 'node', the Xpath request will be uglier than it would be had we used Augeas directly.&lt;br /&gt;
&lt;br /&gt;
For example, let's say we want to get the file system type of the "/" entry in /etc/fstab. In Augeas, we could do:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ augtool 'get //fstab/*[file="/"]/vfstype'
  //fstab/*[file="/"]/vfstype = ext3
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
That's straight-forward enough. Now let's try to do it from our XML file:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#!/usr/bin/perl -w

use strict;
use XML::LibXML;

my ($file) = @ARGV;

open (my $fh, "&lt;$file") 
   or die "E: Could not open $file: $!\n" ;
my $doc = XML::LibXML-&gt;load_xml(IO =&gt; $fh);
close $fh;


print $doc-&gt;findvalue('//node[@label="fstab"]/node/
   node[@label="file"][child::text()="/"]/
   ../node[@label="vfstype"]')."\n";
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Save this script as testaugxml, make it executable and run:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ ./testaugxml.pl export.xml 
ext3
&lt;/pre&gt;&lt;br /&gt;
It works, although the Xpath expression is certainly uglier than in Augeas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;xml2aug&lt;/h4&gt;&lt;br /&gt;
Now what if I wanted to import that XML file back to Augeas? That could be fun, and sometimes useful, too.&lt;br /&gt;
&lt;br /&gt;
There's a problem here. Exporting the Augeas tree to a clean XML file is very simple ; importing it back is more complex, because of the existing tree.&lt;br /&gt;
&lt;br /&gt;
Without getting into much details, we have roughly 3 possibilities:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;xml2aug replaces the Augeas tree with the contents of the XML file, erasing the existing tree ;&lt;/li&gt;
&lt;li&gt;xml2aug replaces the Augeas tree with the contents of the XML file only on files listed in the XML file and doesn't touch other files ;&lt;/li&gt;
&lt;li&gt;xml2aug applies the XML file as a patch on the existing tree.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
The 3&lt;sup&gt;rd&lt;/sup&gt; solution is very hard to implement, and the 2&lt;sup&gt;nd&lt;/sup&gt; solution might be possible once Augeas allows to get more information on nodes (knowing if the node is a directory, a file or a configuration entry would help). I'm left with the 1&lt;sup&gt;st&lt;/sup&gt; solution to implement my script for now.&lt;br /&gt;
&lt;br /&gt;
This having been said, you have been warned: there is a --root option in this script, make use of it if you don't want to lose some configuration files!&lt;br /&gt;
&lt;br /&gt;
Here is the script:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;#!/usr/bin/perl -w

use strict;
use Config::Augeas;
use XML::LibXML;
use Getopt::Long;

my $file;
my $root = '/';
my $verbose;
my $debug;
my $help;

my $result = GetOptions (
   "file=s" =&gt; \$file,
   "root=s" =&gt; \$root,
   "verbose" =&gt; \$verbose,
   "debug" =&gt; \$debug,
   "help" =&gt; \$help,
   );

if ($help) {
   usage();
   exit 0;
}

$verbose ||= $debug;


unless (defined($file)) {
   die "E: You must specify a filename\n";
}

open (my $fh, "&lt;$file") 
   or die "E: Could not open $file: $!\n" ;
my $doc = XML::LibXML-&gt;load_xml(IO =&gt; $fh);
close $fh;

my $aug = Config::Augeas-&gt;new(root =&gt; $root);
# we want to replace everything
$aug-&gt;rm('/files/*');
my @top_nodes = $doc-&gt;find('/*/node[@label != "files"]')-&gt;get_nodelist();

for my $node (@top_nodes) {
   xml2aug($node, '/files');
}

$aug-&gt;print('/files') if $debug;
$aug-&gt;save();
$aug-&gt;print('/augeas//error');


########
# Subs
########

sub usage {
   print "$0 [-f &lt;file&gt;] [-r fakeroot] [-v] [-d] [-h]

 Flags:
   -h, --help             Show this help
   -v, --verbose          Verbose mode
   -d, --debug            Debug mode

 Options:
   -f, --file &lt;file&gt;      Set XML file to import from
   -r, --root &lt;fakeroot&gt;  Set fakeroot for Augeas
";
}

sub xml2aug {
   my ($elem, $path) = @_;

   my $type = $elem-&gt;nodeType;

   my $label = $elem-&gt;getAttribute('label');

   my $matchpath = "$path/*[last()]";
   $matchpath =~ s| |\\ |g;
   my $lastpath = $aug-&gt;match("$path/*[last()]");

   if(defined($lastpath)) {
      print "V: Inserting $label after $lastpath\n" if $verbose;

      # Insert last node
      $aug-&gt;insert($label, "after", $lastpath);
   } else {
      $aug-&gt;set("$path/$label", '');
   }

   $matchpath = "$path/${label}[last()]";
   $matchpath =~ s| |\\ |g;
   my $newpath = $aug-&gt;match($matchpath);


   my $value;

   for my $child ($elem-&gt;childNodes()) {
      if ($child-&gt;nodeType == XML_TEXT_NODE) {
         # Text node
         $value = $child-&gt;nodeValue;
      } else {
         xml2aug($child, $newpath);
      }
   }

   if (defined($value)) {
      print "V: Setting value of $newpath to $value\n" if $verbose;
      $aug-&gt;set($newpath, $value);
   }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Future development&lt;/h4&gt;&lt;br /&gt;
The current state of this prototype is a set of Perl scripts. Eventually, I would like to merge at least the export functionality in augtool, so as not to depend on Perl.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-6165199566875684956?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/u63NMmD9S_bpOokGHRePJ7Gn-80/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u63NMmD9S_bpOokGHRePJ7Gn-80/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/u63NMmD9S_bpOokGHRePJ7Gn-80/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/u63NMmD9S_bpOokGHRePJ7Gn-80/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/vcfIxP93snY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/6165199566875684956/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=6165199566875684956" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6165199566875684956?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6165199566875684956?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/vcfIxP93snY/exporting-augeas-tree-to-xml.html" title="Exporting the Augeas tree to XML" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://www.raphink.info/2011/02/exporting-augeas-tree-to-xml.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUBQ386eSp7ImA9Wx9bFEo.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-7216499506859000518</id><published>2011-02-18T22:59:00.000+01:00</published><updated>2011-02-23T17:24:12.111+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-23T17:24:12.111+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="augeas" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Manually associating lenses with files in Augeas</title><content type="html">&lt;h4&gt;Autoload statements and known files&lt;/h4&gt;&lt;br /&gt;
&lt;a href="http://www.augeas.net/"&gt;Augeas&lt;/a&gt; comes with a good collection of lenses that allow to parse the most common configuration files. Lenses are bidirectional pieces of code which allow Augeas to parse a configuration file and turn its content into a tree. Most lenses have an autoload statement which associates them with a specific set of files. For example, mysql.aug is associated with /etc/my.cnf and fstab.aug is associated with /etc/fstab. When Augeas is loaded, it searches the system for files that it knows about and tries to parse them with the associated lenses. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Lenses without autoload statements&lt;/h4&gt;&lt;br /&gt;
In some cases though, lenses are not associated with specific files through an autoload statement. This is the case for generic modules, such as util.aug, sep.aug, rx.aug, build.aug or inifile.aug, but also for lenses for which we do not know specific configuration files in a standard system. Such is the case of json.aug, since JSON is used a lot to serialize data between two programs, but hardly as static configuration files. Augeas has a JSON lens, but it is not associated with any known file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;How to use lenses without autoload statements&lt;/h4&gt;&lt;br /&gt;
How then, would you go about using the JSON lens on a file of your choice? There are several possibilities. Let's say you have a JSON file called foo.json located at /home/bar/foo.json and you want to parse it using augtool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h5&gt;Manipulating Augeas metadata on-the-fly&lt;/h5&gt;&lt;br /&gt;
Augeas provides two root nodes in its tree: "/files" and "/augeas". The former lists the files Augeas was able to parse with its set of lenses, while the latter provides access to Augeas' metadata. In this last part of the tree, lenses can be manipulated on-the-fly.&lt;br /&gt;
&lt;br /&gt;
Let's launch augtool and add /home/bar/foo.json to the JSON lens:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;# --noload deactivates all known lenses to make augtool faster
$ augtool --noload
&amp;gt; # json.aug is not loaded by default, set it up
&amp;gt; set /augeas/load/Json/lens Json.lns
&amp;gt; # Add to /home/bar/foo.json to the known files
&amp;gt; set /augeas/load/Json/incl /home/bar/foo.json
&amp;gt; # Load known files
&amp;gt; load
&amp;gt; print /files/home/bar/foo.json
&lt;/pre&gt;&lt;br /&gt;
From the (soon to be released) 8.0.0 version of Augeas, a -i flag will be available in augtool allowing to interpret a file before launching an interactive augtool shell. With this option, it will be possible to set a file with the previous contents and use it as an argument to augtool:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ cat json_foo.augtool
# json.aug is not loaded by default, set it up
set /augeas/load/Json/lens Json.lns
# Add to /home/bar/foo.json to the known files
set /augeas/load/Json/incl /home/bar/foo.json
# Load known files
load
$ augtool --noload -if json_foo.augtool
&amp;gt; print /files/home/bar/foo.json
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h5&gt;Creating a derived lens for the file&lt;/h5&gt;&lt;br /&gt;
Augeas allows lenses to use definitions declared in other lenses. This is how generic modules are made to make lens development easier. It also allows you to make your own lenses, derived from existing lenses.&lt;br /&gt;
&lt;br /&gt;
In our case, we could write a lens and use it:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;$ cat jsonfoo.aug
module JsonFoo =
   autoload xfm
   let filter = incl "/home/bar/foo.json"
   let xfm = transform Json.lns filter
$ augtool -I . 
&amp;gt; print /files/home/bar/foo.json
&lt;/pre&gt;&lt;br /&gt;
In Debian and Ubuntu systems, lenses provided with Augeas are placed in /usr/share/augeas/lenses/dist, so you can place your own lenses in /usr/share/augeas/lenses without a risk of overriding them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Other lenses&lt;/h4&gt;&lt;br /&gt;
These techniques apply to all lenses provided by Augeas. If you have a PHP configuration that is not in a standard path, you can use them to manipulate this file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-7216499506859000518?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/88Tnx7P3KyqjG9XqkSz3-uJ8f7o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/88Tnx7P3KyqjG9XqkSz3-uJ8f7o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/88Tnx7P3KyqjG9XqkSz3-uJ8f7o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/88Tnx7P3KyqjG9XqkSz3-uJ8f7o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/-ZswePOW378" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/7216499506859000518/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=7216499506859000518" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/7216499506859000518?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/7216499506859000518?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/-ZswePOW378/manually-associating-lenses-with-files.html" title="Manually associating lenses with files in Augeas" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2011/02/manually-associating-lenses-with-files.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cFRn0_eCp7ImA9Wx9RFkQ.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-2319553255712654679</id><published>2010-12-18T20:03:00.000+01:00</published><updated>2010-12-18T20:03:37.340+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-18T20:03:37.340+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="spam" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Spams of a new kind: this one might deserve a visit to the police</title><content type="html">Today, I received this nice spam (which was not flagged by the spam detecting system actually):&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif;"&gt;&lt;div class="gE ib gt" style="cursor: auto; font-size: 13px; padding-bottom: 3px; padding-left: 4px; padding-right: 0px;"&gt;&lt;table cellpadding="0" class="cf gJ" style="border-collapse: collapse; margin-top: 0px; width: auto;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gF gK" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-right: 0px; padding-top: 0px; text-align: left; vertical-align: top; white-space: nowrap; width: 351px;"&gt;&lt;table cellpadding="0" class="cf gJ" style="border-collapse: collapse; margin-top: 0px; width: auto;"&gt;&lt;tbody&gt;
&lt;tr class="UszGxc"&gt;&lt;td class="gG" style="color: #777777; font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: right; vertical-align: top; white-space: nowrap; width: 0px;"&gt;&lt;span class="gI" style="cursor: auto; white-space: nowrap;"&gt;from&lt;/span&gt;&lt;/td&gt;&lt;td class="gL" colspan="2" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: top; white-space: normal; width: 295px;"&gt;&lt;span class="gI" style="cursor: auto;"&gt;&lt;span class="gD" email="patsgenealogy@sbcglobal.net" style="display: inline; white-space: normal;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="gD" email="patsgenealogy@sbcglobal.net" style="color: #00681c; display: inline; font-size: 13px; font-weight: bold; white-space: normal;"&gt;Pat Wages&lt;/span&gt;&amp;nbsp;&lt;span class="go" style="color: #777777;"&gt;&lt;patsgenealogy@sbcglobal.net&gt;&lt;/patsgenealogy@sbcglobal.net&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="gG" colspan="2" style="color: #777777; font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: right; vertical-align: top; white-space: nowrap; width: 0px;"&gt;&lt;span class="gI" style="cursor: auto; white-space: nowrap;"&gt;to&lt;/span&gt;&lt;/td&gt;&lt;td class="gL" colspan="2" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: top; white-space: normal; width: 295px;"&gt;&lt;span class="gI" style="cursor: auto;"&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="gG" colspan="2" style="color: #777777; font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: right; vertical-align: top; white-space: nowrap; width: 0px;"&gt;&lt;span class="gI" style="cursor: auto; white-space: nowrap;"&gt;date&lt;/span&gt;&lt;/td&gt;&lt;td class="gL" colspan="2" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: top; white-space: normal; width: 295px;"&gt;&lt;span class="gI" style="cursor: auto;"&gt;&amp;nbsp;Sat, Dec 18, 2010 at 3:07 PM&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="gG" colspan="2" style="color: #777777; font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: right; vertical-align: top; white-space: nowrap; width: 0px;"&gt;&lt;span class="gI" style="cursor: auto; white-space: nowrap;"&gt;subject&lt;/span&gt;&lt;/td&gt;&lt;td class="gL" colspan="2" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: top; white-space: normal; width: 295px;"&gt;&lt;span class="gI" style="cursor: auto;"&gt;&amp;nbsp;ASSASIN I HAVE BEEN PAYED TO TERMINATE YOU.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="gG" colspan="2" style="color: #777777; font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: right; vertical-align: top; white-space: nowrap; width: 0px;"&gt;&lt;span class="gI" style="cursor: auto; white-space: nowrap;"&gt;signed-by&lt;/span&gt;&lt;/td&gt;&lt;td class="gL" colspan="2" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; vertical-align: top; white-space: normal; width: 295px;"&gt;&lt;span class="gI" style="cursor: auto;"&gt;&amp;nbsp;sbcglobal.net&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan="4" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="gI" style="cursor: auto;"&gt;&lt;div class="pj1vZc"&gt;&lt;/div&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;td class="gH" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: right; vertical-align: top; white-space: nowrap;"&gt;&lt;span class="Apple-style-span" style="color: #114170;"&gt;&lt;u&gt;&lt;br /&gt;
&lt;/u&gt;&lt;/span&gt;&lt;/td&gt;&lt;td class="gH cY8xve" style="font-family: arial, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: right; vertical-align: top; white-space: nowrap;"&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="iF" style="clear: both; height: 0px; overflow-x: hidden; overflow-y: hidden;"&gt;&lt;/div&gt;&lt;div class="utdU2e"&gt;&lt;/div&gt;&lt;div class="QqXVeb"&gt;&lt;/div&gt;&lt;div class="ii gt" id=":ye" style="font-size: 13px; margin-bottom: 5px; margin-left: 15px; margin-right: 15px; margin-top: 5px; padding-bottom: 20px;"&gt;&lt;div id=":yf"&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="font-family: arial, sans-serif; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;" valign="top"&gt;This is the only way I could contact you for now, I want you to be very careful about this&amp;nbsp; and keep this secret with you until I make out space for us to see. You have no need of knowing who I am or where I am from. I know this may sound very surprising to you but it's the situation. I have been paid some ransom in advance to terminate you with some reasons listed to me by my employer. It's someone I believe you call a friend; I have followed you closely for a while now and have seen that you are innocent of the accusations he leveled against you. Do not contact the police or try to send a copy of this to them, because if you do, I will know, and I might be pushed to do what I have been paid to do. Besides, this is the first time I turn out to be a betrayer in my job. I took pity on you, that is why I have made up my mind to help you if you are willing to help yourself.&lt;br /&gt;
&lt;br /&gt;
Now listen, I will arrange for us to see face to face, but before that, I need $9,000. I will come to your home or you determine where you wish we meet; I repeat, do not arrange for the cops and if you play hard to get, it will be extended to your family. Do not set any camera to cover us or set up any tape to record our conversation; my employer is in my control now. Payment details will be provided for you to make a part payment of $3,000 first, which will serve as guarantee that you are ready to co-operate, then I will post a copy of the video tape that contains his request for me to terminate you which will be enough evidence for you to take any legal action against him before he employs another person for the job. You will pay the balance of $3,000 once you receive the tape.&lt;br /&gt;
&lt;br /&gt;
Warning; do not contact the police, make sure you stay indoors once it is 7.30pm every day&amp;nbsp; until this whole thing is sorted out, if you neglect any of these warnings, you will have yourself to blame. You do not have much time, so get back to me immediately&lt;br /&gt;
&lt;br /&gt;
Note: I will advise you keep this to yourself alone, not even a friend or a family member should know about it because it could be one of them.&lt;br /&gt;
&lt;br /&gt;
Reply Me To My Personal Email:&amp;nbsp;&lt;a href="mailto:CUTSYCAT@LIVE.COM" style="color: #114170;" target="_blank"&gt;CUTSYCAT@LIVE.COM&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;Now sometimes I find spam quite funny, but this one is really serious. I mean, I know enough people who can't tell what is spam and what is not to take this email seriously, and this is a grave subject. From checking on Google, it seems quite a few other people received this email lately. The police might not be willing to investigate on viagra spam, but this one deserves some research I think.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-2319553255712654679?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fYb_zPh5zKTe5_xQ4rr8CIFac58/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fYb_zPh5zKTe5_xQ4rr8CIFac58/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fYb_zPh5zKTe5_xQ4rr8CIFac58/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fYb_zPh5zKTe5_xQ4rr8CIFac58/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/mK8ji7um2JA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/2319553255712654679/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=2319553255712654679" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/2319553255712654679?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/2319553255712654679?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/mK8ji7um2JA/spams-of-new-kind-this-one-might.html" title="Spams of a new kind: this one might deserve a visit to the police" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://www.raphink.info/2010/12/spams-of-new-kind-this-one-might.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEHQXw5cSp7ImA9Wx9TFE4.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-4677042541777944911</id><published>2010-11-22T13:57:00.000+01:00</published><updated>2010-11-22T13:57:10.229+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-22T13:57:10.229+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="packaging" /><category scheme="http://www.blogger.com/atom/ns#" term="debian" /><category scheme="http://www.blogger.com/atom/ns#" term="documentation" /><category scheme="http://www.blogger.com/atom/ns#" term="augeas" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Building docs with NaturalDocs</title><content type="html">I mentionned NaturalDocs &lt;a href="http://www.raphink.info/2008/09/naturaldocs.html"&gt;in an earlier post&lt;/a&gt; on this blog since we're using it to document the &lt;a href="http://augeas.net/docs/references/c_api"&gt;Augeas C API&lt;/a&gt; and &lt;a href="http://augeas.net/docs/references/lenses"&gt;Augeas lenses&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
With the latest version of Augeas &lt;a href="https://www.redhat.com/archives/augeas-devel/2010-November/msg00110.html"&gt;now out&lt;/a&gt;, I wanted to get these docs generated with the package so they could be shipped in an augeas-doc package in Debian and Ubuntu. I first had to fix a missing link in the &lt;a href="https://launchpad.net/ubuntu/natty/+source/naturaldocs/1:1.5-0ubuntu1"&gt;naturaldocs&lt;/a&gt;&amp;nbsp;package (which was also the occasion to upgrade it to 1.5). Then I had to get naturaldocs in main, since augeas is in main already. While going through the &lt;a href="https://bugs.launchpad.net/ubuntu/+source/naturaldocs/+bug/677822"&gt;MIR&lt;/a&gt;, I was asked if other packages in main could benefit from this change. I haven't found any, but there's quite a few packages in universe that could use naturaldocs to generate documentation at build time. The &lt;a href="https://bugs.launchpad.net/ubuntu/+source/naturaldocs/+bug/677822"&gt;bug report&lt;/a&gt;&amp;nbsp;lists some of them.&lt;br /&gt;
&lt;br /&gt;
If you're interested in building NaturalDocs documentation in your package, here is the way it was done for Augeas.&lt;br /&gt;
&lt;br /&gt;
Augeas is a C project using autotools. It was thus easier to activate NaturalDocs as an option in configure. This can easily be adapted for other cases, including running the commands in debian/rules directly.&lt;br /&gt;
&lt;br /&gt;
In configure.ac:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;dnl Check for NaturalDocs
AC_PATH_PROGS([ND_PROG], [naturaldocs NaturalDocs], missing)
AM_CONDITIONAL([ND_ENABLED], [test "x$ND_PROG" != "xmissing"])

dnl NaturalDocs output format, defaults to HTML
ND_FORMAT=HTML
AC_ARG_WITH([naturaldocs-output],
  [AS_HELP_STRING([--with-naturaldocs-output=FORMAT],
    [format of NaturalDocs output (possible values: HTML/FramedHTML, default: HTML)])],
  [
    if test "x$ND_PROG" = "xmissing"; then
      AC_MSG_ERROR([NaturalDocs was not found on your path; there's no point in setting the output format])
    fi
    case $withval in
       HTML|FramedHTML)
          ND_FORMAT=$withval
          ;;
       *)
          AC_MSG_ERROR($withval is not a supported output format for NaturalDocs)
          ;;
    esac
  ])
AC_SUBST(ND_FORMAT)
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
In doc/naturaldocs/Makefile.am:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;EXTRA_DIST = $(wildcard conf/Augeas.css conf/c_api/*.txt) \
             $(wildcard conf/lenses/*.txt) \
             Modules/NaturalDocs/Languages/Augeas.pm

ND_CONF=$(srcdir)/conf
ND_OUTPUT=output
ND_STYLE=../Augeas

ND_PERL5LIB=$(abs_srcdir)/Modules
ND_PERL5OPT='-MNaturalDocs::Languages::Augeas'

if ND_ENABLED
all-local: NaturalDocs
endif

NaturalDocs: NDLenses NDCAPI

env:
 echo LIB $(ND_PERL5LIB)
 echo OPT $(ND_PERL5OPT)
 test -n "$$PERL5OPT" &amp;amp;&amp;amp; ND_PERL5OPT="$(ND_PERL5OPT) $$PERL5OPT" || ND_PERL5OPT=$(ND_PERL5OPT); \
 test -n "$$PERL5LIB" &amp;amp;&amp;amp; ND_PERL5LIB="$(ND_PERL5LIB):$$PERL5LIB" || ND_PERL5LIB=$(ND_PERL5LIB); \
        PERL5LIB=$$ND_PERL5LIB PERL5OPT=$$ND_PERL5OPT env | grep PERL

NDLenses: NDConf
 @mkdir -p $(ND_OUTPUT)/lenses
 @(echo "Format lens documentation"; \
   test -n "$$PERL5OPT" &amp;amp;&amp;amp; ND_PERL5OPT="$(ND_PERL5OPT) $$PERL5OPT" || ND_PERL5OPT=$(ND_PERL5OPT); \
   test -n "$$PERL5LIB" &amp;amp;&amp;amp; ND_PERL5LIB="$(ND_PERL5LIB):$$PERL5LIB" || ND_PERL5LIB=$(ND_PERL5LIB); \
   PERL5LIB=$$ND_PERL5LIB PERL5OPT=$$ND_PERL5OPT \
          $(ND_PROG) -p conf/lenses \
       -i $(top_srcdir)/lenses \
       -o $(ND_FORMAT) $(ND_OUTPUT)/lenses \
       -s $(ND_STYLE))

NDCAPI: NDConf
 @mkdir -p $(ND_OUTPUT)/c_api
 @(echo "Format C API documentation"; \
   test -n "$$PERL5OPT" &amp;amp;&amp;amp; ND_PERL5OPT="$(ND_PERL5OPT) $$PERL5OPT" || ND_PERL5OPT=$(ND_PERL5OPT); \
   test -n "$$PERL5LIB" &amp;amp;&amp;amp; ND_PERL5LIB="$(ND_PERL5LIB):$$PERL5LIB" || ND_PERL5LIB=$(ND_PERL5LIB); \
   $(ND_PROG) -p conf/c_api \
     -i $(top_srcdir)/src \
     -o $(ND_FORMAT) $(ND_OUTPUT)/c_api \
     -s $(ND_STYLE))

NDConf:
 @(if test ! -d $(ND_CONF); then \
     cp -pr $(ND_CONF) conf; \
   fi)

clean-local:
 rm -rf output conf/Data
 rm -rf $(ND_CONF)/c_api/Data $(ND_CONF)/lenses/Data
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
After that, the NaturalDocs docs can be built by calling --with-naturaldocs-output=HTML or --with-naturaldocs-output=FramedHTML.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope this can be useful to improve the shipped documentation for projects already using NaturalDocs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-4677042541777944911?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fvTL0YPfq4aeyNEuExH6CvYQkwk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fvTL0YPfq4aeyNEuExH6CvYQkwk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fvTL0YPfq4aeyNEuExH6CvYQkwk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fvTL0YPfq4aeyNEuExH6CvYQkwk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/HXFNlJJ_OS4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/4677042541777944911/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=4677042541777944911" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/4677042541777944911?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/4677042541777944911?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/HXFNlJJ_OS4/building-docs-with-naturaldocs.html" title="Building docs with NaturalDocs" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2010/11/building-docs-with-naturaldocs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UMSXg4eyp7ImA9Wx5VF0U.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-5976999854079444738</id><published>2010-10-11T10:21:00.000+02:00</published><updated>2010-10-11T10:21:28.633+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-11T10:21:28.633+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="xorg" /><category scheme="http://www.blogger.com/atom/ns#" term="nvidia" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Screen resolution with nVidia driver in Lucid</title><content type="html">I struggled recently with a bug on a desktop running Lucid. Whenever I would log in, I got a session set to 1024x768. I would go to the nvidia-settings, reset it to 1280x1024 and it would be fine. As I didn't have much time for it and logged in only once a week or so, I kept doing this for some time, but it ended up bugging me quite a bit. Then this morning, I found &lt;a href="https://bugs.launchpad.net/ubuntu/+source/nvidia-settings/+bug/362704"&gt;this bug report&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
So if you're experiencing this bug, it's very easy to fix:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Edit your ~/.config/monitors.xml&lt;/li&gt;
&lt;li&gt;Adapt it to your configuration (in my case, that's 1280x1024 and a rate of 60Hz).&lt;/li&gt;
&lt;li&gt;Log out and back in.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-5976999854079444738?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kEztjXWv2_cMuW9mMLQArj_IDB8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kEztjXWv2_cMuW9mMLQArj_IDB8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kEztjXWv2_cMuW9mMLQArj_IDB8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kEztjXWv2_cMuW9mMLQArj_IDB8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/Zuh2cu6PtRI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/5976999854079444738/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=5976999854079444738" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/5976999854079444738?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/5976999854079444738?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/Zuh2cu6PtRI/screen-resolution-with-nvidia-driver-in.html" title="Screen resolution with nVidia driver in Lucid" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2010/10/screen-resolution-with-nvidia-driver-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IDSXYzfip7ImA9Wx5VEk8.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-1493554435425036571</id><published>2010-10-04T22:52:00.000+02:00</published><updated>2010-10-04T22:52:58.886+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-04T22:52:58.886+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="regexp" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Matching a mac address</title><content type="html">If it's of any use to someone, here is a regexp that matches mac addresses:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;/[0-9A-Fa-f]{2}(?P&amp;lt;sep&amp;gt;[-:])[0-9A-Fa-f]{2}(?:(?P=sep)[0-9A-Fa-f]{2}){4}/&lt;/pre&gt;&lt;br /&gt;
Example usage:&lt;br /&gt;
&lt;pre&gt;$ python
 &amp;gt;&amp;gt;&amp;gt; reg = re.compile('[0-9A-Fa-f]{2}(?P&amp;lt;sep&amp;gt;[-:])[0-9A-Fa-f]{2}(?:(?P=sep)[0-9A-Fa-f]{2}){4}')
 &amp;gt;&amp;gt;&amp;gt; mac1 = "00:af:15:35:48:5e"
 &amp;gt;&amp;gt;&amp;gt; mac2 = "00-aa-bb-cc-dd-ee"
 &amp;gt;&amp;gt;&amp;gt; mac3 = "00-aa-bb-cc-dd:ee"
 &amp;gt;&amp;gt;&amp;gt; reg.match(mac1).group(0)
'00:af:15:35:48:5e'
 &amp;gt;&amp;gt;&amp;gt; reg.match(mac2).group(0)
'00-aa-bb-cc-dd-ee'
 &amp;gt;&amp;gt;&amp;gt; reg.match(mac3).group(0)
Traceback (most recent call last):
  File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;
AttributeError: 'NoneType' object has no attribute 'group'
 &amp;gt;&amp;gt;&amp;gt; reg.match(mac1).group('sep')
':'
 &amp;gt;&amp;gt;&amp;gt; reg.match(mac2).group('sep')
'-'
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Do you use another regexp to match mac addresses?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-1493554435425036571?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7ztgxrOWnQOQefhfOWqNb1fmhzg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7ztgxrOWnQOQefhfOWqNb1fmhzg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7ztgxrOWnQOQefhfOWqNb1fmhzg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7ztgxrOWnQOQefhfOWqNb1fmhzg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/J9hLAgjfYwo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/1493554435425036571/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=1493554435425036571" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/1493554435425036571?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/1493554435425036571?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/J9hLAgjfYwo/matching-mac-address.html" title="Matching a mac address" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>3</thr:total><feedburner:origLink>http://www.raphink.info/2010/10/matching-mac-address.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QMRH4yeSp7ImA9Wx5XGE0.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-5032896669482057222</id><published>2010-09-18T10:48:00.000+02:00</published><updated>2010-09-18T11:16:25.091+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-18T11:16:25.091+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="website" /><category scheme="http://www.blogger.com/atom/ns#" term="chrome" /><category scheme="http://www.blogger.com/atom/ns#" term="usborne" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Getting block position in Javascript with Chrome</title><content type="html">Dear Lazyweb,&lt;br /&gt;
&lt;br /&gt;
Yesterday, I had fun implementing a little ducky that hides on the pages of &lt;a href="http://www.usborne-riviera.fr"&gt;this website&lt;/a&gt;. To my distress, I ended up having to hardcode a few things, since I couldn't get Chrome to properly give me the real position of relative blocks. After reading quite a few things on the subject, I went the parentOffset recursive way, but it just doesn't seem to work. &lt;br /&gt;
&lt;br /&gt;
I've also posted on StackOverflow &lt;a href="http://stackoverflow.com/questions/3741056/get-real-position-of-objects-in-javascript-with-chrome"&gt;here&lt;/a&gt; if you feel like answering me there.&lt;br /&gt;
&lt;br /&gt;
Does anyone know of a cross-browser way of getting real block positions that actually works?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-5032896669482057222?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mgCyUuG8nqs7SrmgZJ7wgj1HtQ4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mgCyUuG8nqs7SrmgZJ7wgj1HtQ4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mgCyUuG8nqs7SrmgZJ7wgj1HtQ4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mgCyUuG8nqs7SrmgZJ7wgj1HtQ4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/J1HjX1FZuXQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/5032896669482057222/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=5032896669482057222" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/5032896669482057222?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/5032896669482057222?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/J1HjX1FZuXQ/getting-block-position-in-javascript.html" title="Getting block position in Javascript with Chrome" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2010/09/getting-block-position-in-javascript.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMDQHw4eyp7ImA9Wx5XF00.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-7943703858401994695</id><published>2010-09-17T18:00:00.000+02:00</published><updated>2010-09-17T09:11:11.233+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-17T09:11:11.233+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="open-source" /><category scheme="http://www.blogger.com/atom/ns#" term="edubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="education" /><category scheme="http://www.blogger.com/atom/ns#" term="books" /><category scheme="http://www.blogger.com/atom/ns#" term="english" /><category scheme="http://www.blogger.com/atom/ns#" term="children" /><category scheme="http://www.blogger.com/atom/ns#" term="reading" /><category scheme="http://www.blogger.com/atom/ns#" term="usborne" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Helping young children learn to read</title><content type="html">Learning to read is a complex task. European children surely have it easier than many Asians who need to learn long series of ideograms, yet the association of signs and sounds is often difficult. In particular, English and French are two examples of European languages where children struggle to learn to read.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://farm4.static.flickr.com/3584/3291620563_cdfc280d25_z.jpg?zz=1" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="320" src="http://farm4.static.flickr.com/3584/3291620563_cdfc280d25_z.jpg?zz=1" width="211" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;In these two languages, and even more so in English, there are more sounds than available letters, so the language ends up with complex associations of letters to produce sounds, and it is not rare to find letters or associations of letters that are pronounced differently in different words, even though they are written the exact same way.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;This has led both English and French teachers of young children to develop new techniques to learn to read, based on recognizing whole words instead of phonemes.  English teachers called it 'Look Say' (also known as '&lt;a href="http://en.wikipedia.org/wiki/Sight_word"&gt;Sight Word&lt;/a&gt;' or 'Whole-Word') method, while in France it was called 'Méthode globale'. These methods were used extensively in the 80s, often with very mitigated results. While children were able to read common words, however complicated their phonemes were, they often lacked the skills to decipher words they had not yet learned, and those were many.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The early 21st century has seen a return to reading basics, namely a revival of the 'Phonics' method, widely used before the era of the 'Look Say' last century. It is true that some words eventually have to be learned the global way, but most words can be learned phoneme by phoneme, if the method used is properly set. In the UK, the government has made a set of recommendations as to how this method should be implemented to teach young children to read.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.usborne.com/veryfirstreading/images/homepage/book-1-spread.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="166" src="http://www.usborne.com/veryfirstreading/images/homepage/book-1-spread.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;The British editor of children books &lt;a href="http://www.usborne.com/"&gt;Usborne&lt;/a&gt; produces a series of 15 books called &lt;a href="http://www.usborne-riviera.fr/2010/09/usborne-very-first-reading.html"&gt;'Very First Reading'&lt;/a&gt; to help children who are just starting to read, introducing letters by sets, as recommended by the &lt;a href="http://www.letters-and-sounds.com/phase-2.html"&gt;DfES Letters and Sounds phonics programe&lt;/a&gt;. In the first books of the series, children are simply encouraged to complete the story read by an adult by reading simple words. As the child moves on in the series, the part read by the adult diminishes, until the whole story is read by the child alone.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.jeuxpourlaclasse.fr/img/exe/gcompris.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"&gt;&lt;img border="0" height="150" src="http://www.jeuxpourlaclasse.fr/img/exe/gcompris.jpg" width="200" /&gt;&lt;/a&gt;In the open-source world, we have good programs to help children start reading, too. &lt;a href="http://gcompris.net/"&gt;Gcompris&lt;/a&gt; is a great example of such programs for young children,  and it takes phonics into consideration in its modules.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Do you teach your young children to read? What books or methods do you use for this?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-7943703858401994695?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NL39HGMu8PaQfnUX8fQzx4FfeNc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NL39HGMu8PaQfnUX8fQzx4FfeNc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NL39HGMu8PaQfnUX8fQzx4FfeNc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NL39HGMu8PaQfnUX8fQzx4FfeNc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/WXI6_dgDyeY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/7943703858401994695/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=7943703858401994695" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/7943703858401994695?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/7943703858401994695?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/WXI6_dgDyeY/helping-young-children-learn-to-read.html" title="Helping young children learn to read" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://www.raphink.info/2010/09/helping-young-children-learn-to-read.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEANR3gzeyp7ImA9Wx5XFko.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-4265259963129475278</id><published>2010-09-13T21:07:00.000+02:00</published><updated>2010-09-16T23:33:16.683+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-16T23:33:16.683+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="books" /><category scheme="http://www.blogger.com/atom/ns#" term="usborne" /><category scheme="http://www.blogger.com/atom/ns#" term="riviera" /><title>Usborne Books on the Riviera</title><content type="html">Today, I am very happy to announce that my wife is starting a business here on the French Riviera. She loves the children books by the British editor Usborne, so she will be selling them at homes in the region.&lt;br /&gt;
&lt;br /&gt;
Feel free to drop by &lt;a href="http://www.usborne-riviera.fr"&gt;her website&lt;/a&gt; and check the next days for Book Parties!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-4265259963129475278?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/arpClyjmC2-6JhhEHi5UI-Pv5_U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/arpClyjmC2-6JhhEHi5UI-Pv5_U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/arpClyjmC2-6JhhEHi5UI-Pv5_U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/arpClyjmC2-6JhhEHi5UI-Pv5_U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/yCQuErRqEPU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/4265259963129475278/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=4265259963129475278" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/4265259963129475278?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/4265259963129475278?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/yCQuErRqEPU/usborne-books-on-riviera.html" title="Usborne Books on the Riviera" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2010/09/usborne-books-on-riviera.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAMQHc8fip7ImA9WxFUF04.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-1982519713830645955</id><published>2010-06-11T11:27:00.000+02:00</published><updated>2010-06-28T15:13:01.976+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-28T15:13:01.976+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="flammard" /><category scheme="http://www.blogger.com/atom/ns#" term="wave" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Flammard is an official Wave extension</title><content type="html">Flammard was approved in the Extensions gallery on Google Wave. This means you can now add it by going to "Extensions -&gt; All" in the Navigation column.&lt;br /&gt;&lt;br /&gt;Quite a few changes have been made to it in order to get it accepted, mostly on the gadget style. The gadget now has tabs and a nicer look.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-1982519713830645955?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/q-zWW0-blkcBOjT2VPHG6s34PfU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/q-zWW0-blkcBOjT2VPHG6s34PfU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/q-zWW0-blkcBOjT2VPHG6s34PfU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/q-zWW0-blkcBOjT2VPHG6s34PfU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/cfZp-ZkImEg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/1982519713830645955/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=1982519713830645955" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/1982519713830645955?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/1982519713830645955?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/cfZp-ZkImEg/flammard-is-official-wave-extension.html" title="Flammard is an official Wave extension" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2010/06/flammard-is-official-wave-extension.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AFR3k5eSp7ImA9WxFWFUs.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-6504350037348768367</id><published>2010-06-03T14:38:00.000+02:00</published><updated>2010-06-03T14:55:16.721+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-06-03T14:55:16.721+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="bible" /><category scheme="http://www.blogger.com/atom/ns#" term="flammard" /><category scheme="http://www.blogger.com/atom/ns#" term="release" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="christian" /><category scheme="http://www.blogger.com/atom/ns#" term="wave" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><title>Flammard v2 is out</title><content type="html">After 6 months of loyal services, it was time for the Flammard Bible bot version 1 to leave.&lt;br /&gt;&lt;br /&gt;Several reasons pushed me to rewrite the bot:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;I had begun to rewrite the underlying modules used by the bot and wanted to use them;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I wanted to have a go at Natural Language Processing and get rid of all (or as many as possible) tags;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Finally, the robot API for Google Wave was updated, leaving me with a code that depended on an obsolete API. That was the spark to get me started;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;In short, version 2 of the Bible bot:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Has no '&amp;lt;blah&amp;gt;', 'v/blah/' or 'vl/blah/' tags. It just recognizes Bible references in the text and processes them automatically. The only bit of a tag that persists is 'q' or 'quote' in front of a verse reference, such as 'quote gen 1:3', which tells the bot to quote the verse instead of just making it a link to an external website;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Comes with a Wave gadget to configure it which replaces the '&amp;lt;bible&amp;gt;' and '&amp;lt;pref&amp;gt;' tags.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Two pretty much unused functionalities were dropped in version 2:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;The '&amp;lt;votd&amp;gt;' tag has no equivalent. My logs showed that nobody was using it. If you still want it, ping me. I might replace it with a Wave gadget once I expose the Flammard API publicly;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It is no longer possible to set the default Bible version per language, you can only set one default version per Wave.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;You can install the bot by visiting &lt;a href="https://wave.google.com/wave/#minimized:nav,minimized:contact,minimized:search,restored:wave:googlewave.com!w%252BCAl2tcajD.4"&gt;this wave&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-6504350037348768367?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CUx3-fzVDl96IdAh5KhCFvO6NPc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CUx3-fzVDl96IdAh5KhCFvO6NPc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CUx3-fzVDl96IdAh5KhCFvO6NPc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CUx3-fzVDl96IdAh5KhCFvO6NPc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/hWJ-2OExnCg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/6504350037348768367/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=6504350037348768367" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6504350037348768367?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6504350037348768367?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/hWJ-2OExnCg/flammard-v2-is-out.html" title="Flammard v2 is out" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.raphink.info/2010/06/flammard-v2-is-out.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cARnY8fSp7ImA9WxNaGUg.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-6166142044657833411</id><published>2009-11-14T13:38:00.000+01:00</published><updated>2009-12-04T19:24:07.875+01:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-12-04T19:24:07.875+01:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="open-source" /><category scheme="http://www.blogger.com/atom/ns#" term="bible" /><category scheme="http://www.blogger.com/atom/ns#" term="flammard" /><category scheme="http://www.blogger.com/atom/ns#" term="python" /><category scheme="http://www.blogger.com/atom/ns#" term="christian" /><category scheme="http://www.blogger.com/atom/ns#" term="wave" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="chrétien" /><title>Wave Bible Bot</title><content type="html">After a month of using Google Wave, I finally made my first Wave bot. My initial idea was to make a Bible bot using the sword API, but I couldn't find an easy way of doing that in python, and I am very reluctant to use Java. So instead, I did a python bot which parses BibleGateway.com to retrieve the results. Later, I added modules to deal with other translations, such as ESV, NET and specific French versions such as Colombe, TOB or NBS.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;What does it do?&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;Flammard is a Bible bot for Google Wave. You can add it to a wave, and it will replace some specific patterns with other content.&lt;br /&gt;&lt;br /&gt;Currently, it recognizes two kinds of patterns:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&amp;lt;verse verseReference [from Version]&amp;gt; is replaced by the verse. The version is optional. Examples: &amp;lt;verse Gen 1:1 from NIV&amp;gt; or &amp;lt;verse Acts 3:5-15&amp;gt;&lt;br /&gt;&lt;li&gt;&amp;lt;verselink verseReference [from Version]&amp;gt; is replaced by a link to the verse on another website. The version is optional. Examples: &amp;lt;verselink Gen 1:1 from NIV&amp;gt; or &amp;lt;verselink Acts 3:5-15&amp;gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Known versions&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;The Bible bot uses several resources in order to support as many Bible versions as possible.&lt;br /&gt;&lt;br /&gt;The versions currently supported are:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;All versions from &lt;a href="http://www.biblegateway.com/"&gt;BibleGateway.com&lt;/a&gt;, referenced by their code (e.g. KJV, NIV, LSG) or their ID (the full list can be found &lt;a href="http://www.biblegateway.com/usage/linking/versionslist.php"&gt;on this page&lt;/a&gt;);&lt;br /&gt;&lt;li&gt;The &lt;a href="http://www.gnpcb.org/esv/"&gt;ESV (English Standard Version) Bible&lt;/a&gt;;&lt;br /&gt;&lt;li&gt;The NET Bible, from &lt;a href="http://bible.org/"&gt;Bible.org&lt;/a&gt;;&lt;br /&gt;&lt;li&gt;The BFC (La Bible en francais courant), PDV (Parole de Vie), Colombe (La Colombe), NBS (Nouvelle Bible de Segond), TOB (Traduction OEcumenique de la Bible) from &lt;a href="http://lire.la-bible.net/"&gt;La-Bible.net&lt;/a&gt;.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In all cases, the version is optional. When possible, the bot will try to find the right version for your blip depending on the language you have typed in the context of the tag.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Example&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_15jf2NID4Wo/Sv6t1YZfy9I/AAAAAAAABcg/EZz-5ZhEIDk/s1600-h/wave_bible_bot1.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 191px;" src="http://1.bp.blogspot.com/_15jf2NID4Wo/Sv6t1YZfy9I/AAAAAAAABcg/EZz-5ZhEIDk/s320/wave_bible_bot1.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5403947735485238226" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_15jf2NID4Wo/Sv6t9PGdlMI/AAAAAAAABco/vHSbZ7brnQc/s1600-h/wave_bible_bot2.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 266px;" src="http://2.bp.blogspot.com/_15jf2NID4Wo/Sv6t9PGdlMI/AAAAAAAABco/vHSbZ7brnQc/s320/wave_bible_bot2.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5403947870428435650" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Live demo&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;Here is a video demo of the bot working (as of today's functionalities):&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/IgNzd1ULJhs&amp;hl=en_US&amp;fs=1&amp;"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/IgNzd1ULJhs&amp;hl=en_US&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;How can I add this bot to a wavelet ?&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;Simply add flammard@appspot.com as a participant to your wavelet.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h4&gt;Where can I find the source code?&lt;/h4&gt;&lt;br /&gt;&lt;br /&gt;The project is hosted on Launchpad: &lt;a href="https://launchpad.net/wavebiblebot"&gt;https://launchpad.net/wavebiblebot&lt;/a&gt;. You are welcome to report bugs and wishes, or to send patches.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-6166142044657833411?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7fALcs1TYsgyZa3OHO4d4VPGxqU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7fALcs1TYsgyZa3OHO4d4VPGxqU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7fALcs1TYsgyZa3OHO4d4VPGxqU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7fALcs1TYsgyZa3OHO4d4VPGxqU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/otqv55eJLH8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/6166142044657833411/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=6166142044657833411" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6166142044657833411?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/6166142044657833411?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/otqv55eJLH8/wave-bible-bot.html" title="Wave Bible Bot" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_15jf2NID4Wo/Sv6t1YZfy9I/AAAAAAAABcg/EZz-5ZhEIDk/s72-c/wave_bible_bot1.png" height="72" width="72" /><thr:total>7</thr:total><feedburner:origLink>http://www.raphink.info/2009/11/wave-bible-bot.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMGQ3k8eCp7ImA9WxNWE0o.&quot;"><id>tag:blogger.com,1999:blog-8012505786049526776.post-5922040791570910074</id><published>2009-10-12T21:38:00.000+02:00</published><updated>2009-10-12T21:57:02.770+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-10-12T21:57:02.770+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="inkscape" /><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="presentation" /><title>Dynamic presentations with Jessyink</title><content type="html">Some time ago, I attended a presentation made with &lt;a href="http://prezi.com/"&gt;Prezi&lt;/a&gt; and I was pretty impressed. As I looked into it, a few things bugged me though:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;it's in flash&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I can't really share my presentations with anyone&lt;/li&gt;&lt;br /&gt;&lt;li&gt;I have to design my slides online, or use an offline app (paid) which will connect online&lt;/li&gt; &lt;br /&gt;&lt;li&gt;There is no good support for full screen presentations in Linux&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It doesn't use a portable format&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From looking at the features, I really couldn't see why it couldn't be implemented using SVG (except for the flash movies embedded in the presentation maybe...), so I began to search for a project that would do the same, using SVG, and I found Jessyink. &lt;br /&gt;&lt;br /&gt;&lt;a href="https://launchpad.net/jessyink"&gt;Jessyink&lt;/a&gt; is exactly what I was searching for. It's a plugin for Inkscape which adds the possibility to design slides from an SVG, and ships a javascript library inside the resulting SVG for execution. The result is that:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;It's portable: apps that understands SVG and javascript can play it (e.g. Firefox, on any platform. Arora did fine too, but Konqueror wouldn't work)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It's an open format, with open standards: I can send the svg to someone, and they can edit it with inkscape using the Jessyink plugin&lt;/li&gt;&lt;br /&gt;&lt;li&gt;The possibilities are endless: I'm not limited to styles and fonts found on prezi.com, I can choose whatever font I want, whatever style I want&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It's open-source!&lt;/li&gt;&lt;br /&gt;&lt;li&gt;It not only supports prezi-like effects inside slides, but also traditional slides, that can each behave like prezi-like presentations&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Jessyink is harder to use than prezi.com though, but if you know how to use Inkscape, you will soon be able to do what you want with it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is a &lt;a href="http://r.pinson.free.fr/jessyink/mapnice.svg"&gt;quick &amp; dirty example&lt;/a&gt; I made with Jessyink. Some tips:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Use the arrows to navigate through the presentation&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Use the 'i' key to get an index of the slides (two slides in that case)&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Use the 'd' key to draw on the presentation as you go through it!&lt;/li&gt;&lt;br /&gt;&lt;li&gt;See &lt;a href='http://code.google.com/p/jessyink/wiki/keyBindings'&gt;this page&lt;/a&gt; for more tips!&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8012505786049526776-5922040791570910074?l=www.raphink.info' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/DOs_9kAB-TYEZopQedF99c6aTbg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DOs_9kAB-TYEZopQedF99c6aTbg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/DOs_9kAB-TYEZopQedF99c6aTbg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/DOs_9kAB-TYEZopQedF99c6aTbg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/ChristianThoughtsInATechWorld/~4/ddY5SzAbbuI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.raphink.info/feeds/5922040791570910074/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=8012505786049526776&amp;postID=5922040791570910074" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/5922040791570910074?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8012505786049526776/posts/default/5922040791570910074?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ChristianThoughtsInATechWorld/~3/ddY5SzAbbuI/dynamic-presentations-with-jessyink.html" title="Dynamic presentations with Jessyink" /><author><name>Raphaël Pinson</name><uri>http://www.blogger.com/profile/10521695166843919067</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>5</thr:total><feedburner:origLink>http://www.raphink.info/2009/10/dynamic-presentations-with-jessyink.html</feedburner:origLink></entry></feed>

