<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Libre Things</title>
	<atom:link href="http://positon.org/feed" rel="self" type="application/rss+xml" />
	<link>http://positon.org</link>
	<description></description>
	<lastBuildDate>Tue, 23 Feb 2016 20:01:11 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.7.1</generator>
	<item>
		<title>Is OVH blocking port 445 ?</title>
		<link>http://positon.org/is-ovh-blocking-port-445</link>
		<comments>http://positon.org/is-ovh-blocking-port-445#comments</comments>
		<pubDate>Wed, 04 Nov 2015 21:59:49 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://positon.org/?p=215</guid>
		<description><![CDATA[Many users reported me that port 445 is blocked on portquiz.net. Sorry about that : my hosting company, OVH, is probably blocking this port. I opened a support ticket but got a response stating that no port is blocked. I opened a thread on OVH forum (french). Feel free to post your tcptraceroute, or contact [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Many users reported me that port 445 is blocked on portquiz.net.</p>
<p>Sorry about that : my hosting company, OVH, is probably blocking this port.</p>
<p>I opened a support ticket but got a response stating that no port is blocked.</p>
<p>I opened a <a href="https://forum.ovh.com/showthread.php/106901-OVH-bloque-le-port-445-vers-mon-serveur-d%C3%A9di%C3%A9">thread on OVH forum (french).</a></p>
<p>Feel free to post your tcptraceroute, or contact OVH.</p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/is-ovh-blocking-port-445/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Portquiz.net : how it works</title>
		<link>http://positon.org/portquiz-net-how-it-works</link>
		<comments>http://positon.org/portquiz-net-how-it-works#comments</comments>
		<pubDate>Tue, 27 Oct 2015 19:11:53 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://positon.org/?p=209</guid>
		<description><![CDATA[I&#8217;ve been asked a few time how Portquiz.net works. It&#8217;s really simple. It&#8217;s just made of a few iptables rules. I&#8217;m using the iptables-persistent Debian package to make the rules persist a reboot. Here is the content of /etc/iptables/rules.v4: # Generated by iptables-save v1.4.14 on Sun Aug 25 12:43:34 2013 *nat :PREROUTING ACCEPT [0:0] :POSTROUTING [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been asked a few time how Portquiz.net works.</p>
<p>It&#8217;s really simple. It&#8217;s just made of a few <strong>iptables</strong> rules. I&#8217;m using the iptables-persistent Debian package to make the rules persist a reboot.</p>
<p>Here is the content of <strong>/etc/iptables/rules.v4</strong>:</p>
<p><code><br />
# Generated by iptables-save v1.4.14 on Sun Aug 25 12:43:34 2013<br />
*nat<br />
:PREROUTING ACCEPT [0:0]<br />
:POSTROUTING ACCEPT [0:0]<br />
:OUTPUT ACCEPT [0:0]<br />
-A PREROUTING -i lo -j RETURN<br />
-A PREROUTING -p icmp -j RETURN<br />
-A PREROUTING -m state --state RELATED,ESTABLISHED -j RETURN<br />
-A PREROUTING -p tcp -m tcp --dport 22 -j RETURN<br />
-A PREROUTING -p tcp -m tcp --dport 21 -j RETURN<br />
-A PREROUTING -p tcp -m tcp --dport 25 -j RETURN<br />
-A PREROUTING -p tcp -m tcp --dport 80 -j RETURN<br />
-A PREROUTING -p tcp -m tcp --dport 443 -j RETURN<br />
-A PREROUTING -p tcp -j DNAT --to-destination :80<br />
COMMIT<br />
# Completed on Sun Aug 25 12:43:34 2013<br />
# Generated by iptables-save v1.4.14 on Sun Aug 25 12:43:34 2013<br />
*filter<br />
:INPUT ACCEPT [0:0]<br />
:FORWARD ACCEPT [0:0]<br />
:OUTPUT ACCEPT [0:0]<br />
-A INPUT -p icmp -j ACCEPT<br />
-A INPUT -i lo -j ACCEPT<br />
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT<br />
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT<br />
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT<br />
-A INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT<br />
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT<br />
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT<br />
-A INPUT -j DROP<br />
COMMIT<br />
# Completed on Sun Aug 25 12:43:34 2013<br />
</code></p>
<p>The filter table is classical: ACCEPT a few services, then DROP the rest.</p>
<p>Portquiz.net logic is in the nat table:</p>
<ul>
<li>Forward connection on any port to port 80 (DNAT &#8211;to-destination :80)</li>
<li>Except for normal services (just RETURN for normal activity)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/portquiz-net-how-it-works/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Nautilus script to search opensubtitles.org</title>
		<link>http://positon.org/nautilus-script-to-search-opensubtitles-org</link>
		<comments>http://positon.org/nautilus-script-to-search-opensubtitles-org#comments</comments>
		<pubDate>Sun, 31 Aug 2014 09:55:28 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Nautilus]]></category>

		<guid isPermaLink="false">http://positon.org/?p=202</guid>
		<description><![CDATA[Mathilde&#8217;s contribution: This script allows you to launch a search by filesize on opensubtitles.org, with a simple right-click on a video file. If it does not exist, create the .local/share/nautilus/scripts directory in your personnal folder (from Nautilus, you can use the Ctrl+H shortcut to display hidden files and be able to see the .local directory). [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Mathilde&#8217;s contribution:</p>
<p>This script allows you to launch a search by filesize on  <a href="http://www.opensubtitles.org">opensubtitles.org</a>, with a simple right-click on a video file.</p>
<p>If it does not exist, create the <code>.local/share/nautilus/scripts</code> directory in your personnal folder (from Nautilus, you can use the Ctrl+H shortcut to display hidden files and be able to see the <code>.local</code> directory).</p>
<p>Save the <a href="/wp-content/uploads/files/subtitle">subtitle</a> file in <code>.local/share/nautilus/scripts</code></p>
<p>Add execution permission to the script, in file properties, or running the command <code>chmod +x ~/.local/share/nautilus/scripts/subtitle</code></p>
<p>Open Nautilus (aka &#8220;Files&#8221;). Select the film you want to search subtitles for, right-click > scripts > subtitle.<br />
A browser window will open directly on <a href="http://www.opensubtitles.org">opensubtitles.org</a> with your search results.</p>
<p>NB:<br />
By default, the script will search subtitles in english. To change the language, open the script and change the LANG variable.</p>
<p>Content of <a href="/wp-content/uploads/files/subtitle">subtitle</a> script:</p>
<pre>
#!/bin/bash

LANG=eng
#LANG=fr

FILE=$1
SIZE=$(stat -c %s $FILE)

xdg-open "http://www.opensubtitles.org/eng/search/sublanguageid-$LANG/moviebytesize-$SIZE"
</pre>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/nautilus-script-to-search-opensubtitles-org/feed</wfw:commentRss>
		<slash:comments></slash:comments>
		</item>
		<item>
		<title>MPD clients for AdaFruit Character LCD Keypad on Raspberry Pi</title>
		<link>http://positon.org/mpd-clients-for-adafruit-character-lcd-keypad-on-raspberry-pi</link>
		<comments>http://positon.org/mpd-clients-for-adafruit-character-lcd-keypad-on-raspberry-pi#comments</comments>
		<pubDate>Wed, 09 Jul 2014 21:10:51 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[MPD]]></category>
		<category><![CDATA[Raspberry Pi]]></category>

		<guid isPermaLink="false">http://positon.org/?p=195</guid>
		<description><![CDATA[I just pushed some small python Music Player Daemon clients on github. It may be of use for MPD fans using the device! https://github.com/dooblem/adampd]]></description>
				<content:encoded><![CDATA[<p>I just pushed some small python Music Player Daemon clients on github.</p>
<p>It may be of use for MPD fans using the device!</p>
<p><a href="https://github.com/dooblem/adampd" title="https://github.com/dooblem/adampd">https://github.com/dooblem/adampd</a></p>
<p><a href="http://positon.org/wp-content/uploads/2014/07/adampd_pi.jpg"><img src="http://positon.org/wp-content/uploads/2014/07/adampd_pi-300x234.jpg" alt="adampd_pi" width="300" height="234" class="alignnone size-medium wp-image-198" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/mpd-clients-for-adafruit-character-lcd-keypad-on-raspberry-pi/feed</wfw:commentRss>
		<slash:comments></slash:comments>
		</item>
		<item>
		<title>Lenovo Thinkpad BIOS Update with Linux and USB</title>
		<link>http://positon.org/lenovo-thinkpad-bios-update-with-linux-and-usb</link>
		<comments>http://positon.org/lenovo-thinkpad-bios-update-with-linux-and-usb#comments</comments>
		<pubDate>Thu, 29 May 2014 16:59:54 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Arch Linux]]></category>
		<category><![CDATA[BIOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Thinkpad]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[USB]]></category>

		<guid isPermaLink="false">http://positon.org/?p=190</guid>
		<description><![CDATA[Here are the steps I used to upgrade the BIOS of my Lenovo Thinkpad X1 Carbon Gen 2. You have to download the bootable ISO file from Lenovo support site, convert it and copy it to a usb flash drive. You will need a USB key you can erase. First Get the bootable ISO file [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Here are the steps I used to upgrade the BIOS of my Lenovo Thinkpad X1 Carbon Gen 2.<br />
You have to download the bootable ISO file from Lenovo support site, convert it and copy it to a usb flash drive.</p>
<p>You will need a USB key you can erase.</p>
<p>First Get the bootable ISO file from Lenovo support website. To get your product number:</p>
<pre>
sudo dmidecode -t system | grep Product
</pre>
<p>To check your BIOS version: <code>sudo dmidecode -t bios</code></p>
<p>Get the <strong>geteltorito</strong> program from your packages or download it:</p>
<pre>
cd /tmp/
wget http://userpages.uni-koblenz.de/~krienke/ftp/noarch/geteltorito/geteltorito
chmod +x geteltorito
</pre>
<p>Extract the img from the ISO:</p>
<pre>
./geteltorito -o bios.img gruj09us.iso
</pre>
<p>Copy the img to the USB key (<strong>make sure sdb is you USB key!!</strong>):</p>
<pre>
sudo fdisk -l /dev/sdb #at least check that device size is right
sudo dd if=bios.img of=/dev/sdb
</pre>
<p>That&#8217;s it. Boot on USB stick and follow the instructions to update your BIOS.</p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/lenovo-thinkpad-bios-update-with-linux-and-usb/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Disable SSH askpass in git push</title>
		<link>http://positon.org/disable-ssh-askpass-in-git-push</link>
		<comments>http://positon.org/disable-ssh-askpass-in-git-push#comments</comments>
		<pubDate>Sun, 27 Apr 2014 12:24:37 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://positon.org/?p=178</guid>
		<description><![CDATA[If you have the problem when pushing to github for example. You can just empty the core.askpass param: git config --global core.askpass '' See also man git config]]></description>
				<content:encoded><![CDATA[<p>If you have the problem when pushing to <a href="http://github.com" title="github">github</a> for example.</p>
<p>You can just empty the core.askpass param:</p>
<pre>
git config --global core.askpass ''
</pre>
<p>See also <code>man git config</code></p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/disable-ssh-askpass-in-git-push/feed</wfw:commentRss>
		<slash:comments></slash:comments>
		</item>
		<item>
		<title>Clone a Linux system install to another computer</title>
		<link>http://positon.org/clone-a-linux-system-install-to-another-computer</link>
		<comments>http://positon.org/clone-a-linux-system-install-to-another-computer#comments</comments>
		<pubDate>Sun, 06 Apr 2014 15:54:06 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gparted]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rsync]]></category>

		<guid isPermaLink="false">http://positon.org/?p=159</guid>
		<description><![CDATA[After searching a bit I could not find a simple and good howto to do that. The following method should work for any Linux distribution (Ubuntu, Debian, Manjaro, Archlinux, Fedora&#8230;). Source and target systems must be on the same processor architecture (though transfer from 32bit to 64bit should work). What you need: 2 live USB [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>After searching a bit I could not find a simple and good howto to do that.<br />
The following method should work for any Linux distribution (Ubuntu, Debian, Manjaro, Archlinux, Fedora&#8230;). Source and target systems must be on the same processor architecture (though transfer from 32bit to 64bit should work).</p>
<p>What you need:</p>
<ul>
<li>2 live USB keys (or cds)</li>
<li>To speed up data transfer: good quality ethernet cables (one cable between the 2 computers is OK), or a usb key/drive with a BIG ext4 partition. You can try over wifi, but it may be slow.</li>
</ul>
<h3>1. Boot source and target machines on live USB/CD</h3>
<p>Any live USB/CD should be OK.<br />
On the target computer, you will need a tool to partition your hard drive, like <a href="http://gparted.org/" title="gparted">gparted</a>.<br />
<a href="http://rsync.samba.org/" title="rsync">rsync</a> is also required for data transfer: it&#8217;s included in many live systems.</p>
<p><a href="http://www.ubuntu.com/" title="Ubuntu">Ubuntu</a> live cd is OK, <a href="http://manjaro.org/" title="Manjaro">Manjaro</a> live cd too.</p>
<h3>2. Partition your target hard drive</h3>
<p>Use a tool like <a href="http://gparted.org/" title="gparted">gparted</a> to partition the target hard drive, with the same partitions as your source system (slash, swap, home&#8230;).<br />
I recommend you to assign LABELs to your partitions: for the fstab, it&#8217;s easier than UUIDs.</p>
<h3>3. Mount all partitions on both machines</h3>
<p>On both systems, open a root terminal. Then, for each data partition (you can ignore swap):</p>
<pre>
mkdir /mnt/slash
mount /dev/sdaX /mnt/slash
</pre>
<p>If you have a home partition:</p>
<pre>
mkdir /mnt/home
mount /dev/sdaY /mnt/home
</pre>
<h3>4. Transfer the data (network or usb)</h3>
<p>This part may be tricky. Choose the method you prefer.</p>
<h4>Network</h4>
<ol>
<li><strong>Setup the network.</strong> Test the connectivity with ping command.<br />
The easier is to plug the PCs on a DHCP network (like your ISP box) so that you get automatic IP addresses. If you linked the 2 pcs with a single cable, you&#8217;ll have to setup the IPs with NetworkManager (static ips, or adhoc network).</li>
<li>On source system, as root, create a simple <code>/etc/rsyncd.conf</code> file:
<pre>
uid = root
gid = root
use chroot = no

[all]
    path = /
</pre>
</li>
<li>Then start the rsync daemon server: <code>rsync --daemon</code></li>
<li>On target PC, for each partition:
<pre>
rsync -avHX SOURCE_IP::all/mnt/slash/ /mnt/slash/
</pre>
<p>Don&#8217;t forget &#8216;/&#8217; at the end of paths. <code>-a</code> will preserve many file attributes like owner and permissions, <code>-H</code> will preserve hardlinks if any, <code>-X</code> will preserve extended attributes like setuid. You may also add <code>-A</code> if you are using acls. What is good with rsync is that you can stop and restart the transfer whenever you want.
</li>
</ol>
<h4>USB</h4>
<p>Prepare a USB drive with a BIG ext4 partition.</p>
<ol>
<li>Mount the USB partition on source system (<code>mount /dev/sdbX /mnt/usb</code>)</li>
<li>For each partition:
<pre>
rsync -avHX /mnt/slash/ /mnt/usb/slash/
</pre>
</li>
<li>umount, unplug and remount the USB disk on the target system.</li>
<li>For each partition:
<pre>
rsync -avHX /mnt/usb/slash/ /mnt/slash/
</pre>
</li>
</ol>
<h3>5. Change fstab on target system</h3>
<p>As root, edit <code>/mnt/slash/etc/fstab</code><br />
For each partition (including swap), replace the first field with the new UUID or LABEL (it&#8217;s straightforward with LABELs):<br />
<code>UUID=the-long-uuid</code>, or <code>LABEL=yourlabel</code></p>
<p>2 ways to get the UUIDs / LABELs:</p>
<pre>
ls -l /dev/disk/by-uuid/
blkid /dev/sdaX
</pre>
<h3>6. Reinstall Grub</h3>
<p>We will use a <strong>chroot</strong> (changed root environment) to be able to call the <a href="http://www.gnu.org/software/grub/" title="Grub">grub</a> install inside the migrated system.</p>
<p>First, bind mount some system directories needed by grub, then chroot:</p>
<pre>
mount --bind /proc /mnt/slash/proc
mount --bind /sys /mnt/slash/sys
mount --bind /dev /mnt/slash/dev
mount --bind /run /mnt/slash/run
chroot /mnt/slash
</pre>
<p>Then install grub in the <a href="http://en.wikipedia.org/wiki/Master_boot_record" title="master boot record">Master Boot Record</a> of your hard drive, and update grub config file (with the new uuids&#8230;):</p>
<pre>
grub-install /dev/sda
update-grub
</pre>
<h3>7. Reboot target machine</h3>
<p>That&#8217;s it! Your system should be working on the new computer now.<br />
Feel free to comment if you encounter problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/clone-a-linux-system-install-to-another-computer/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Bsync: Bidirectional Synchronization using Rsync</title>
		<link>http://positon.org/bsync-bidirectional-synchronization-using-rsync</link>
		<comments>http://positon.org/bsync-bidirectional-synchronization-using-rsync#comments</comments>
		<pubDate>Thu, 05 Dec 2013 22:22:36 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bsync]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Raspberry Pi]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://fr.positon.org/?p=152</guid>
		<description><![CDATA[Bsync is a bidirectional file synchronization tool, using rsync for transfers. Moved files are also synchronized in a smart way. It uses rsync for file transfers, find to generate filelist snapshots, and ssh for remote transfers. bsync is an alternative to Unison, written in Python 3. A big strength of bsync: it can detect and [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Bsync is a bidirectional file synchronization tool, using rsync for transfers. <strong>Moved files</strong> are also synchronized in a smart way.</p>
<p>It uses <a href="http://rsync.samba.org">rsync</a> for file transfers, <a href="http://www.gnu.org/software/findutils/">find</a> to generate filelist snapshots, and <a href="http://www.openssh.com/">ssh</a> for remote transfers.</p>
<p>bsync is an alternative to Unison, written in <a href="http://www.python.org/">Python 3</a>. A big strength of bsync: it can detect and apply moved files from one side to the other (Unison uses some copy calls to handle moved files).</p>
<p>I developped it to be able to synchronize my music directory from my laptop to my <a href="http://www.raspberrypi.org/">Raspberry Pi</a> in an efficient way, and to sync with my girlfriend laptop too.</p>
<p>Bsync is released under GPL. Feel free to report any bugs/wishes in <a href="https://github.com/dooblem/bsync/issues">GitHub issues</a>.</p>
<p><a href="https://github.com/dooblem/bsync">More info, Download and Install on the GitHub repo.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/bsync-bidirectional-synchronization-using-rsync/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>An ugly PHP script to migrate from Dotclear to WordPress</title>
		<link>http://positon.org/an-ugly-php-script-to-migrate-from-dotclear-to-wordpress</link>
		<comments>http://positon.org/an-ugly-php-script-to-migrate-from-dotclear-to-wordpress#comments</comments>
		<pubDate>Thu, 05 Dec 2013 20:18:04 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://fr.positon.org/?p=148</guid>
		<description><![CDATA[I just finished migrating my blog from Dotclear to WordPress. I quickly tried some existing plugins to do the migration but none worked. My setup is a bit complicated because I was using the dc_translate plugin to translate all my posts. Here is the migrate script. If it can be of use. Warning: you probably [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I just finished migrating my blog from Dotclear to WordPress.</p>
<p>I quickly tried some existing plugins to do the migration but none worked. My setup is a bit complicated because I was using the dc_translate plugin to translate all my posts.</p>
<p>Here is the migrate script. If it can be of use. Warning: you probably have to adapt the script to your needs, to remove some stuff, because it&#8217;s also reading Dotclear translation tables.</p>
<ul>
<li>The script is called in command line via PHP cli</li>
<li>The script is using plain SQL to read from Dotclear database and to write to WordPress database.</li>
<li>It uses the wiki2xhtml Dotclear library to convert dotclear wiki syntax to html.</li>
<li>It uses formatting WordPress library to convert Posts url to WordPress format.</li>
<li>For each post, it also imports comments and tags.</li>
</ul>
<p>I&#8217;m now using 3 plugins to manage my French translations in WordPress:</p>
<ul>
<li>qTranslate</li>
<li>qTranslate slug</li>
<li>qTranslate Separate Comments</li>
</ul>
<p><a href="http://positon.org/wp-content/uploads/2013/12/migrate_dc.tar.gz">migrate_dc.tar</a></p>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/an-ugly-php-script-to-migrate-from-dotclear-to-wordpress/feed</wfw:commentRss>
		<slash:comments></slash:comments>
		</item>
		<item>
		<title>Clever Alt+Tab alternative: a Run or Raise script</title>
		<link>http://positon.org/clever-alttab-alternative-a-run-or-raise-script</link>
		<comments>http://positon.org/clever-alttab-alternative-a-run-or-raise-script#comments</comments>
		<pubDate>Thu, 15 Aug 2013 22:29:00 +0000</pubDate>
		<dc:creator><![CDATA[dooblem]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[wmctrl]]></category>

		<guid isPermaLink="false">http://positon.org:81/?p=122</guid>
		<description><![CDATA[Thanks to: http://vickychijwani.github.io/2012/04/15/blazing-fast-application-switching-in-linux/ I made a few improvements on the script. If you want something with more features (but also more complex). Use /bin/sh so that it may use dash instead of bash (lighter) Use exec to start the command so that it replaces the current script (otherwise you get unneeded bash processes in ps) [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Thanks to:<br />
<a href="http://vickychijwani.github.io/2012/04/15/blazing-fast-application-switching-in-linux/" title="http://vickychijwani.github.io/2012/04/15/blazing-fast-application-switching-in-linux/">http://vickychijwani.github.io/2012/04/15/blazing-fast-application-switching-in-linux/</a></p>
<p>I made a few improvements on the script. If you want something with more features (but also more complex).</p>
<ul>
<li>Use /bin/sh so that it may use dash instead of bash (lighter)</li>
<li>Use exec to start the command so that it replaces the current script (otherwise you get unneeded bash processes in ps)</li>
<li>Raise all windows of the same class: useful to raise all terminals for example</li>
<li>&#8220;toggle mode&#8221; : when run a second time, the windows are minimized. For that I had to depend on xdotool, because wmctrl can&#8217;t do that (probably coming in a future wmctrl release. the author commited a -Y flag in github for that).</li>
</ul>
<p>Save it to <code>/home/USER/bin/run-or-raise</code>, then add some keyboard shortcuts in your window manager settings and enjoy!</p>
<pre>
&lt;Super&gt;f /home/USER/bin/run-or-raise Navigator.Firefox firefox
</pre>
<pre>
#!/bin/sh
# syntax: run-or-raise WM_CLASS_name COMMAND
#   WM_CLASS_name : the WM_CALL_name of the window (from wmctrl -lx output)
#   COMMAND : the command to run if nothing to raise

#logfile=/tmp/$(basename $0).log
#exec &gt; $logfile 2&gt;&amp;1

# get windows ids matching WM_CLASS_name
WINIDS=$(wmctrl -lx | awk '{ if ($3 == &quot;'&quot;$1&quot;'&quot;) print $1}')

# run if nothing started. exec will end the script
[ -z &quot;$WINIDS&quot; ] &amp;&amp; exec &quot;$2&quot;

# if the window is active, we minimize all the windows of the class
ACTIVEWIN=$(wmctrl -a :ACTIVE: -v 2&gt;&amp;1 | sed -n 's/^Using window: \(.*\)/\1/p')
MINIMIZE=false
if echo &quot;$WINIDS&quot; | grep -q &quot;$ACTIVEWIN&quot;; then
        MINIMIZE=true
fi

for ID in $WINIDS; do
        if $MINIMIZE; then
                xdotool windowminimize &quot;$ID&quot;
        else
                wmctrl -i -a &quot;$ID&quot;
        fi
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://positon.org/clever-alttab-alternative-a-run-or-raise-script/feed</wfw:commentRss>
		<slash:comments></slash:comments>
		</item>
	</channel>
</rss>
