<?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>Offroad &#187; apple</title>
	<atom:link href="http://offroad.gonzofamily.com/category/it/apple/feed/" rel="self" type="application/rss+xml" />
	<link>http://offroad.gonzofamily.com</link>
	<description>Chris&#039; blog</description>
	<lastBuildDate>Sat, 04 Feb 2012 13:44:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Git Server on Debian</title>
		<link>http://offroad.gonzofamily.com/2011/04/29/git-server-on-debian/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=git-server-on-debian</link>
		<comments>http://offroad.gonzofamily.com/2011/04/29/git-server-on-debian/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 11:19:16 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://offroad.gonzofamily.com/?p=1205</guid>
		<description><![CDATA[After testing GIT, and without hesitation, I decided to abandon SVN/Subversion. I won&#8217;t write here one more article comparing them but I wrote (and update regularly) a wiki page explaining how to install it on Debian and give access via HTTP, SSH and HTML. http://wiki.gonzofamily.com/a/Install_GIT_as_public_repository_on_Debian I also noted how I transfered my existing local XCode repositories [...]]]></description>
			<content:encoded><![CDATA[<p>After testing GIT, and without hesitation, I decided to abandon SVN/Subversion. I won&#8217;t write here one more article comparing them but I wrote (and update regularly) a wiki page explaining how to install it on Debian and give access via HTTP, SSH and HTML.</p>
<p><a title="Wiki page" href="http://wiki.gonzofamily.com/a/Install_GIT_as_public_repository_on_Debian" target="_self">http://wiki.gonzofamily.com/a/Install_GIT_as_public_repository_on_Debian</a></p>
<p>I also noted how I transfered my existing local XCode repositories to this server, but I will improve this doc soon:</p>
<p><a title="Wiki Page" href="http://wiki.gonzofamily.com/a/GIT_and_XCode" target="_self">http://wiki.gonzofamily.com/a/GIT_and_XCode</a></p>
]]></content:encoded>
			<wfw:commentRss>http://offroad.gonzofamily.com/2011/04/29/git-server-on-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retrieve local IPv4/IPv6 on Wifi/Cellular on iPhone</title>
		<link>http://offroad.gonzofamily.com/2011/04/29/retrieve-local-ipv4ipv6-on-wificellular-on-iphone/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=retrieve-local-ipv4ipv6-on-wificellular-on-iphone</link>
		<comments>http://offroad.gonzofamily.com/2011/04/29/retrieve-local-ipv4ipv6-on-wificellular-on-iphone/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 10:47:35 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[phone]]></category>

		<guid isPermaLink="false">http://offroad.gonzofamily.com/?p=1202</guid>
		<description><![CDATA[On iOS, you want to know your local IP (for example, when an application opens a webpage on the wifi interface) but the iOS SDK provides no simple way to get the IP Address for the wifi connection. I found an interesting Method in Objective-C which retrieve the IPv4 address of the wifi connexion as [...]]]></description>
			<content:encoded><![CDATA[<p>On iOS, you want to know your local IP (for example, when an application opens a webpage on the wifi interface) but the iOS SDK provides no simple way to get the IP Address for the wifi connection.</p>
<p>I found an interesting Method in Objective-C which retrieve the IPv4 address of the wifi connexion as a NSString on <a title="Zach Waugh's blog" href="http://blog.zachwaugh.com/post/309927273/programmatically-retrieving-ip-address-of-iphone" target="_blank">Zach Waugh&#8217;s blog</a>.</p>
<p>Sadly it doesn&#8217;t work with IPv6. So I modified it and here is the code:</p>
<p><a title="Wiki page" href="http://wiki.gonzofamily.com/a/Retrieve_local_IPv4/IPv6_on_Wifi/Cellular" target="_self">http://wiki.gonzofamily.com/a/Retrieve_local_IPv4/IPv6_on_Wifi/Cellular</a></p>
]]></content:encoded>
			<wfw:commentRss>http://offroad.gonzofamily.com/2011/04/29/retrieve-local-ipv4ipv6-on-wificellular-on-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PID on Mac OS X without Netstat</title>
		<link>http://offroad.gonzofamily.com/2011/04/28/pid-on-mac-os-x-without-netstat/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=pid-on-mac-os-x-without-netstat</link>
		<comments>http://offroad.gonzofamily.com/2011/04/28/pid-on-mac-os-x-without-netstat/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 16:12:32 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://offroad.gonzofamily.com/?p=1196</guid>
		<description><![CDATA[On Linux we use to see the Processes associated to a listening network port with the following command netstat -p On Windows it&#8217;s netstat -o Sadly on Mac OS X this option doesn&#8217;t exist. The equivalent will be sudo lsof -P So we can imagine that we need to know which program dare listening on [...]]]></description>
			<content:encoded><![CDATA[<p>On Linux  we use to see the Processes associated to a listening network port with the following command<br />
<code>netstat -p</code></p>
<p>On Windows it&#8217;s<br />
<code>netstat -o</code></p>
<p>Sadly on Mac OS X this option doesn&#8217;t exist. The equivalent will be<br />
<code>sudo lsof -P</code></p>
<p>So we can imagine that we need to know which program dare listening on port 123<br />
<code>sudo lsof -Pn | grep 123</code></p>
<p>You will see something like that:<br />
<code><br />
ntpd         21           root   20u     IPv4 0x0899ace4        0t0      UDP *:123<br />
ntpd         21           root   21u     IPv6 0x0899ac08        0t0      UDP *:123<br />
ntpd         21           root   22u     IPv6 0x0899baa4        0t0      UDP [::1]:123<br />
ntpd         21           root   23u     IPv6 0x0899b8ec        0t0      UDP [fe80:1::1]:123<br />
ntpd         21           root   24u     IPv4 0x0899b810        0t0      UDP 127.0.0.1:123<br />
ntpd         21           root   25u     IPv6 0x098b5658        0t0      UDP [fe80:4::cabc:c8ff:fe90:6472]:123<br />
ntpd         21           root   27u     IPv6 0x098b5b80        0t0      UDP [2002:3ba7:d4b1::cabc:c8ff:fe90:6472]:123<br />
ntpd         21           root   28u     IPv4 0x15463370        0t0      UDP 10.0.130.101:123<br />
ntpd         21           root   30u     IPv6 0x15464b80        0t0      UDP [2002:3ba7:d4b1::c3e:e29a:8de6:68cc]:123<br />
</code></p>
<p>So it was the NTP Daemon with the process ID 21&#8230;. petit coquin !</p>
<p>(Cf this page of my Wiki: <a title="wiki page" href="http://wiki.gonzofamily.com/a/Port_listening_on_Mac,_Windows_or_Linux" target="_blank">http://wiki.gonzofamily.com/a/Port_listening_on_Mac,_Windows_or_Linux</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://offroad.gonzofamily.com/2011/04/28/pid-on-mac-os-x-without-netstat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPv6 and Privacy</title>
		<link>http://offroad.gonzofamily.com/2011/01/04/ipv6-and-privacy/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ipv6-and-privacy</link>
		<comments>http://offroad.gonzofamily.com/2011/01/04/ipv6-and-privacy/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 22:27:27 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://offroad.gonzofamily.com/?p=1150</guid>
		<description><![CDATA[IPv6 makes it easy to track you. Let me explain. IPv6 is composed of a Prefix and a suffix: IPv6 address: 2001:0DB8:1fc3:481:b357:83ff:fecb:4c30 Prefix: 2001:0DB8:1fc3:481: Suffix: b357:83ff:fecb:4c30 The prefix changes according to your internet access (at home, work, friend&#8217;s&#8230;) but the Suffix is deduced from your MAC address and will be always the same for one [...]]]></description>
			<content:encoded><![CDATA[<p>IPv6 makes it easy to track you. Let me explain.</p>
<p>IPv6 is composed of a Prefix and a suffix:<br />
<strong> IPv6 address:</strong> 2001:0DB8:1fc3:481:b357:83ff:fecb:4c30<br />
<strong> Prefix: </strong>2001:0DB8:1fc3:481:<br />
<strong> Suffix:</strong> b357:83ff:fecb:4c30</p>
<p>The prefix changes according to your internet access (at home, work, friend&#8217;s&#8230;) but <strong>the Suffix is deduced from your MAC address and will be always the same for one computer.</strong><br />
So even if your IPv6 Adresse changes, the end of it is unique and identifies your device for sure.</p>
<p><strong>The counter mesure is called IPv6 Privacy Address.<br />
</strong> When you enable this policy on your computer, a second IPv6 is randomly affected during autoconfiguration, called <strong>Temporary IPv6 address</strong>. Even if you cannot change the Prefix, the Suffix changes each time.<br />
It means: you can still contact your computer with the previous IPv6 address, but in the other way (when the computer connect to the internet) it will have a different random address. It has got 2 addresses.<br />
<strong>Windows Vista/Seven:</strong> it&#8217;s enabled by default, you certainly saw &#8220;Temporary IPv6 Address&#8221; in your ipconfig<br />
<strong> Mac OS X 10.6:</strong> you have to enable it</p>
<p><strong>How to enable IPv6 Privacy Address on Mac?</strong></p>
<p>you must create the file /etc/sysctl.conf with the following content:</p>
<blockquote><p>net.inet6.ip6.use_tempaddr=1<br />
net.inet6.ip6.prefer_tempaddr=1</p></blockquote>
<p>Next restart you&#8217;ll get a second IPv6 address and it will be prefered for every internet access.</p>
<p><a href="http://offroad.gonzofamily.com/files/2011/01/Screen-shot-2011-01-01-at-2.17.03-AM.png" rel="lightbox[1150]" title="IPv6 and Privacy"><img class="aligncenter size-full wp-image-1156" src="http://offroad.gonzofamily.com/files/2011/01/Screen-shot-2011-01-01-at-2.17.03-AM.png" alt="" width="331" height="282" /></a></p>
<p><strong>But I use to protect my servers via the IP address!</strong></p>
<p>Many SSH/FTP/HTTPS servers use IP Addresses to filter access. You would like to keep always the same IP.</p>
<p>I think that every client software should be able to choose which IPv6 address it want to use (since we have 2 IPv6 in Privacy Mode), I guess it will become common very soon. For example in ssh you can add the following line in .ssh/config :</p>
<blockquote><p>BindAddress 2001:0DB8:1fc3:481:b357:83ff:fecb:4c30</p></blockquote>
<p>But I think, most of the time, a limited access can be based on the prefix of your IPv6 address. Allowing all your local network to access.</p>
]]></content:encoded>
			<wfw:commentRss>http://offroad.gonzofamily.com/2011/01/04/ipv6-and-privacy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>change the SSH port on Mac OS X</title>
		<link>http://offroad.gonzofamily.com/2010/12/14/change-the-ssh-port-on-mac-os-x/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=change-the-ssh-port-on-mac-os-x</link>
		<comments>http://offroad.gonzofamily.com/2010/12/14/change-the-ssh-port-on-mac-os-x/#comments</comments>
		<pubDate>Tue, 14 Dec 2010 02:29:19 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://offroad.gonzofamily.com/?p=1131</guid>
		<description><![CDATA[Being a user of Linux, I got used to change the port of SSH on my Mac with the following line: sudo vi /etc/sshd_config Then I could change the number and uncomment the following line: #Port 22 Sadly I noticed that it makes my IPv6 SSH connection unavailable on the new port (neither on the [...]]]></description>
			<content:encoded><![CDATA[<p>Being a user of Linux, I got used to change the port of SSH on my Mac with the following line:<br />
<code>sudo vi /etc/sshd_config</code><br />
Then I could change the number and uncomment the following line:<br />
<code>#Port 22</code></p>
<p>Sadly I noticed that it makes my IPv6 SSH connection unavailable on the new port (neither on the previous port 22).</p>
<p>The real clean way of changing a Mac OS X Daemon is in the <a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html" target="_blank">plist files</a></p>
<p>So now I just changed the port in the ssh.plist file and my SSH Daemon runs on IPv4 and IPv6, on the new port.<br />
<code>sudo vi /System/Library/LaunchDaemons/ssh.plist</code></p>
<p>And modify as following if you want the port to become 22222:</p>
<pre>&lt;key&gt;Sockets&lt;/key&gt;
    &lt;dict&gt;
            &lt;key&gt;Listeners&lt;/key&gt;
            &lt;dict&gt;
                    &lt;key&gt;SockServiceName&lt;/key&gt;
                    &lt;string&gt;22222&lt;/string&gt;
                    &lt;key&gt;Bonjour&lt;/key&gt;
                    &lt;array&gt;
                            &lt;string&gt;22222&lt;/string&gt;
                            &lt;string&gt;sftp-ssh&lt;/string&gt;
                    &lt;/array&gt;
            &lt;/dict&gt;
    &lt;/dict&gt;
</pre>
<p>You can add 2 lines to make SSH available only via IPv4:</p>
<pre>&lt;key&gt;Sockets&lt;/key&gt;
    &lt;dict&gt;
            &lt;key&gt;Listeners&lt;/key&gt;
            &lt;dict&gt;
                    &lt;key&gt;SockServiceName&lt;/key&gt;
                    &lt;string&gt;22222&lt;/string&gt;
                    &lt;key&gt;SockFamily&lt;/key&gt;
                    &lt;string&gt;IPv4&lt;/string&gt;
                    &lt;key&gt;Bonjour&lt;/key&gt;
                    &lt;array&gt;
                            &lt;string&gt;22222&lt;/string&gt;
                            &lt;string&gt;sftp-ssh&lt;/string&gt;
                    &lt;/array&gt;
            &lt;/dict&gt;
    &lt;/dict&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://offroad.gonzofamily.com/2010/12/14/change-the-ssh-port-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>App Store for Globe Trotters</title>
		<link>http://offroad.gonzofamily.com/2010/07/14/app-store-for-globe-trotters/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=app-store-for-globe-trotters</link>
		<comments>http://offroad.gonzofamily.com/2010/07/14/app-store-for-globe-trotters/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 15:52:31 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[phone]]></category>

		<guid isPermaLink="false">http://offroad.gonzofamily.com/?p=1065</guid>
		<description><![CDATA[After only 2 weeks in China I can give you some keys to avoid the waste of time I got. See the following apps: Only one guide for 44 languages, it gives you translation of hundreds useful words and sentence from and to the 44 languages, very well made, easy to use: Lingopal 44 Only [...]]]></description>
			<content:encoded><![CDATA[<p>After only 2 weeks in China I can give you some keys to avoid the waste of time I got. See the following apps:</p>
<p>Only one guide for 44 languages, it gives you translation of hundreds useful words and sentence from and to the 44 languages, very well made, easy to use:<br />
<a href="http://ax.itunes.apple.com/fr/app/metro-maximus/id309557101?mt=8" target="_blank">Lingopal 44</a></p>
<p>Only one subway guide for 33 cities around the world:<br />
<a href="http://ax.itunes.apple.com/fr/app/metro-maximus/id309557101?mt=8" target="_blank">Metro Maximus</a></p>
<p>700 offline cities maps to save Location and to be geolocalised via GPS:<br />
<a href="http://ax.itunes.apple.com/fr/app/700-city-maps/id381920038?mt=8#ls=1" target="_blank">700 City Maps</a> (this apps is free, but each offline map must be bought, otherwise you just access an online map like google maps)</p>
<p>Currency exchange rates, works offline :<br />
<a href="http://ax.itunes.apple.com/fr/app/currency/id284220417?mt=8" target="_blank">Currency</a></p>
<p>How could we survive before iPhones and iPads ??</p>
]]></content:encoded>
			<wfw:commentRss>http://offroad.gonzofamily.com/2010/07/14/app-store-for-globe-trotters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPad 3G in China</title>
		<link>http://offroad.gonzofamily.com/2010/07/09/ipad-3g-in-china/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ipad-3g-in-china</link>
		<comments>http://offroad.gonzofamily.com/2010/07/09/ipad-3g-in-china/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 04:02:39 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[phone]]></category>

		<guid isPermaLink="false">http://offroad.gonzofamily.com/2010/07/09/ipad-3g-in-china/</guid>
		<description><![CDATA[I wanted to use the 3G connection of my iPad in China. After &#8220;visiting&#8221; the 3 big companies in Shanghai, I can say they don&#8217;t sell data subscription for less than one year and unlimited does not exist. I also have bought (180 yuan) a SIM card from China Mobile. I noticed that I can [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to use the 3G connection of my iPad in China. After &#8220;visiting&#8221; the 3 big companies in Shanghai, I can say they don&#8217;t sell data subscription for less than one year and unlimited does not exist.</p>
<p>I also have bought (180 yuan) a SIM card from China Mobile. I noticed that I can go on the internet. I noticed the APN was &#8220;cmnet&#8221;.<br />
Then I tried successfully to use the China Mobile SIM card you can buy everywhere for less then 10€.</p>
<p>I will have to refund it once empty, but I&#8217;ll comment that post then. I think I will have to plug the SIM card back in a real mobile phone.</p>
<p>Of course I had to cut the SIM card to the micro SIM size.</p>
<p>I was connected to China Mobile and just added APN Settings :<br />
APN name : cmnet<br />
Login : (empty)<br />
Password : (empty)</p>
]]></content:encoded>
			<wfw:commentRss>http://offroad.gonzofamily.com/2010/07/09/ipad-3g-in-china/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Partage d&#8217;écran activé via le Terminal</title>
		<link>http://offroad.gonzofamily.com/2010/05/02/partage-decran-active-via-le-terminal/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=partage-decran-active-via-le-terminal</link>
		<comments>http://offroad.gonzofamily.com/2010/05/02/partage-decran-active-via-le-terminal/#comments</comments>
		<pubDate>Sun, 02 May 2010 11:02:00 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[fr]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://offroad.gonzofamily.com/?p=903</guid>
		<description><![CDATA[Nous souhaitons activer le contrôle d&#8217;écran à distance sur un Mac OS X grace à la ligne de commande sur Leopard : $ echo -n enabled &#62; /Library/Preferences/com.apple.ScreenSharing.launchd sur Snow Leopard Mac OS 10.6 : $ echo -n enabled &#62; /private/etc/ScreenSharing.launchd sur Lion Mac OS 10.7 : $ sudo /bin/launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist Pour le désactiver : [...]]]></description>
			<content:encoded><![CDATA[<p>Nous souhaitons activer le contrôle d&#8217;écran à distance sur un Mac OS X grace à la ligne de commande</p>
<p>sur Leopard :<br />
<code>$ echo -n enabled &gt; /Library/Preferences/com.apple.ScreenSharing.launchd</code></p>
<p>sur Snow Leopard Mac OS 10.6 :<br />
<code>$ echo -n enabled &gt; /private/etc/ScreenSharing.launchd</code></p>
<p>sur Lion Mac OS 10.7 :<br />
<code>$ sudo /bin/launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist</code></p>
<p>Pour le désactiver :</p>
<p>sur Leopard<br />
<code>$ rm /Library/Preferences/com.apple.ScreenSharing.launchd</code></p>
<p>sur Snow Leopard 10.6 :<br />
<code>$ rm /private/etc/ScreenSharing.launchd</code></p>
<p>sur Lion 10.7 :<br />
<code>$ sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/com.apple.screensharing.plist</code></p>
]]></content:encoded>
			<wfw:commentRss>http://offroad.gonzofamily.com/2010/05/02/partage-decran-active-via-le-terminal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>exporter iPhoto dans des dossiers</title>
		<link>http://offroad.gonzofamily.com/2010/04/14/exporter-iphoto-dans-des-dossiers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=exporter-iphoto-dans-des-dossiers</link>
		<comments>http://offroad.gonzofamily.com/2010/04/14/exporter-iphoto-dans-des-dossiers/#comments</comments>
		<pubDate>Wed, 14 Apr 2010 10:33:13 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[fr]]></category>
		<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://offroad.gonzofamily.com/?p=843</guid>
		<description><![CDATA[iPhoto est bien sympa mais il a des limites, à commencer par le fait qu&#8217;il n&#8217;exporte pas dans des dossiers. Si on utilise les outils d&#8217;exportation on se retrouve avec toutes les photos dans un seul dossier ! grace aux commentaires sur cette page j&#8217;ai utilisé le script python suivant qui a fonctionné sur ma [...]]]></description>
			<content:encoded><![CDATA[<p>iPhoto est bien sympa mais il a des limites, à commencer par le fait qu&#8217;il n&#8217;exporte pas dans des dossiers. Si on utilise les outils d&#8217;exportation on se retrouve avec toutes les photos dans un seul dossier !</p>
<p>grace aux commentaires sur <a href="http://www.macosxhints.com/article.php?story=20081108132735425" target="_blank">cette page</a> j&#8217;ai utilisé le script python suivant qui a fonctionné sur ma configuration :</p>
<ul>
<li>Mac OS 10.6.3 (Snow Leopard), avec le python intégré</li>
<li>iPhoto 8.1.2</li>
</ul>
<p>Je l&#8217;ai enregistré dans un fichier nommé <strong>&#8220;export-iphoto.py&#8221;</strong> dans le dossier &#8220;<strong>documents&#8221;</strong> de l&#8217;utilisateur &#8220;<strong>chris&#8221;</strong>, puis en lançant le terminal pour l&#8217;executer (en réalité je crois qu&#8217;on peut se contenter de double cliquer dessus, mais j&#8217;aime bien le mode ligne de commande <img src='http://offroad.gonzofamily.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) :</p>
<blockquote><p>cd /Users/chris/Documents<br />
python export-iphoto.py</p></blockquote>
<p>Voici le contenu du fichier export-iphoto où il faut bien prendre soint de changer ces 2 lignes<br />
<code>albumDataXml="/Users/YOURUSERNAME/Pictures/iPhoto Library/AlbumData.xml"<br />
targetDir="/Volumes/share/pictures"</code></p>
<p>export-iphoto.py :<br />
<code><br />
from xml.dom.minidom import parse, parseString, Node<br />
import os, time, stat, shutil, sys</code></p>
<p><code>def findChildElementsByName(parent, name):<br />
result = []<br />
for child in parent.childNodes:<br />
if child.nodeName == name:<br />
result.append(child)<br />
return result</code></p>
<p><code>def getElementText(element):<br />
if element is None: return None<br />
if len(element.childNodes) == 0: return None<br />
else: return element.childNodes[0].nodeValue</code></p>
<p><code>def getValueElementForKey(parent, keyName):<br />
for key in findChildElementsByName(parent, "key"):<br />
if getElementText(key) == keyName:<br />
sib = key.nextSibling<br />
while(sib is not None and sib.nodeType != Node.ELEMENT_NODE):<br />
sib = sib.nextSibling<br />
return sib</code></p>
<p><code>albumDataXml="/Users/chris/Pictures/iPhoto Library/AlbumData.xml"<br />
targetDir="/Volumes/FAT/pictures"<br />
copyImg=True #set to false to run with out copying files or creating directories</p>
<p>print "Parsing AlbumData.xml"<br />
albumDataDom = parse(albumDataXml)<br />
topElement = albumDataDom.documentElement<br />
topMostDict = topElement.getElementsByTagName('dict')[0]<br />
listOfRollsArray = getValueElementForKey(topMostDict, "List of Rolls")<br />
masterImageListDict = getValueElementForKey(topMostDict, "Master Image List")</p>
<p>#walk through all the rolls (events)<br />
for rollDict in findChildElementsByName(listOfRollsArray, 'dict'):<br />
rollName = getElementText(getValueElementForKey(rollDict, "RollName"))<br />
print "\n\nProcessing Roll: %s" % (rollName)</p>
<p>#walk through all the images in this roll/event<br />
imageIdArray = getValueElementForKey(rollDict, "KeyList")<br />
for imageIdElement in findChildElementsByName(imageIdArray, 'string'):<br />
imageId = getElementText(imageIdElement)<br />
imageDict = getValueElementForKey(masterImageListDict, imageId)<br />
modifiedFilePath = getElementText(getValueElementForKey(imageDict, "ImagePath"))<br />
originalFilePath = getElementText(getValueElementForKey(imageDict, "OriginalPath"))</p>
<p>sourceImageFilePath = modifiedFilePath</p>
<p>modifiedStat = os.stat(sourceImageFilePath)<br />
basename = os.path.basename(sourceImageFilePath)<br />
year = str(time.gmtime(modifiedStat[stat.ST_CTIME])[0])<br />
targetFileDir = targetDir + "/" + year + "/" + rollName</p>
<p>if not os.path.exists(targetFileDir):<br />
print "Directory did not exist - Creating: %s" % targetFileDir<br />
if copyImg:<br />
os.makedirs(targetFileDir)</p>
<p>targetFilePath = targetFileDir + "/" + basename<br />
iPhotoFileIsNewer = False</p>
<p>if os.path.exists(targetFilePath):<br />
targetStat = os.stat(targetFilePath)</p>
<p>#print "modified: %d %d" % (modifiedStat[stat.ST_MTIME], modifiedStat[stat.ST_SIZE])<br />
#print "target  : %d %d" % (targetStat[stat.ST_MTIME], targetStat[stat.ST_SIZE])</p>
<p>#why oh why is modified time not getting copied over exactly the same?<br />
if abs(targetStat[stat.ST_MTIME] - modifiedStat[stat.ST_MTIME]) &gt; 10 or targetStat[stat.ST_SIZE] != modifiedStat[stat.ST_SIZE]:<br />
iPhotoFileIsNewer = True<br />
else:<br />
iPhotoFileIsNewer = True</p>
<p>if iPhotoFileIsNewer:<br />
msg = "copy from:%s to:%s" % (sourceImageFilePath, targetFilePath)<br />
if copyImg:<br />
print msg<br />
shutil.copy2(sourceImageFilePath, targetFilePath)<br />
else:<br />
print "test - %s" % (msg)<br />
else:<br />
sys.stdout.write(".")<br />
sys.stdout.flush()</p>
<p>albumDataDom.unlink()</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://offroad.gonzofamily.com/2010/04/14/exporter-iphoto-dans-des-dossiers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS 10.5 &amp; 10.6 : accent manquant dans Helvetica et Helvetica Neue</title>
		<link>http://offroad.gonzofamily.com/2010/03/30/mac-os-105-106-accent-manquant-dans-helvetica-et-helvetica-neue/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mac-os-105-106-accent-manquant-dans-helvetica-et-helvetica-neue</link>
		<comments>http://offroad.gonzofamily.com/2010/03/30/mac-os-105-106-accent-manquant-dans-helvetica-et-helvetica-neue/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 15:50:09 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[fr]]></category>
		<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://offroad.gonzofamily.com/?p=827</guid>
		<description><![CDATA[Sur Leopard et Snow Leopard, les polices systèmes sont restaurées dès qu&#8217;on essai de les supprimer. Ainsi il est sacrément embattant de remplacer les polices Helvetica et Helvetica Neue qui ont pourtant le défaut majeur de ne pas intégrer les accents Français lorsqu&#8217;on exporte au format PDF à partir d&#8217;Adobe InDesigne, Photoshop, Illustrator&#8230; J&#8217;ai trouvé [...]]]></description>
			<content:encoded><![CDATA[<p>Sur Leopard et Snow Leopard, les polices systèmes sont restaurées dès qu&#8217;on essai de les supprimer.</p>
<p>Ainsi il est sacrément embattant de remplacer les polices Helvetica et Helvetica Neue qui ont pourtant le défaut majeur de ne pas intégrer les accents Français lorsqu&#8217;on exporte au format PDF à partir d&#8217;Adobe InDesigne, Photoshop, Illustrator&#8230;</p>
<p>J&#8217;ai trouvé sur la doc fournie par Extensis Universal Type Client (version réseau de Suitecase) une procédure permettant de les supprimer afin de pouvoir enfin les gérer via notre logiciel de gestion des polices :</p>
<ol>
<li>Ouvrir une session où l&#8217;utilisateur est Administrateur sur le Mac concerné</li>
<li>Ouvrir le livre des polices</li>
<li>Choisir &#8220;<strong>Livre des polices</strong>&#8221; &gt; &#8220;<strong>Préférences</strong>&#8220;</li>
<li>Désactiver &#8220;<strong>M&#8217;avertir si les polices système changent</strong>&#8220;</li>
<li>Copier le dossier suivant vers un endroit où il sera en sécurité :<br />
<em>/System/Bibliothèque/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.Framework/Versions/A/Resources/ProtectedFonts</em><br />
<em><strong>note</strong></em> : ne jamais supprimer votre copie de sauvegarde du dossier &#8220;<strong>ProtectedFonts</strong>&#8220;, pour le cas où vous auriez besoin de ces polices dans le futur</li>
<li>Ouvrir le dossier <strong>ProtectedFonts</strong> original et y supprimer <strong>Helvetica</strong> et <strong>HelveticaNeue</strong></li>
<li>Entrer un login administrateur lorsqu&#8217;il le demande</li>
<li>Ouvrir /System/Bibliothèque/Fonts et y supprimer <strong>Helvetica</strong> et <strong>HelveticaNeue</strong></li>
<li>Ouvrir votre gestionnaire de police (Extensis dans notre cas) et activer <strong>EN PERMANENCE</strong> vos versions d&#8217;<strong>Helvetica</strong> et <strong>Helvetica Neue</strong></li>
<li>Redémarrer votre ordinateur</li>
</ol>
<p><a rel="attachment wp-att-828" href="http://offroad.gonzofamily.com/files/2010/03/capture-de28099ecran-2010-03-30-a-172001.png"></a><a rel="attachment wp-att-838" href="http://offroad.gonzofamily.com/files/2010/03/capture-de28099ecran-2010-03-30-a-1720011.png" title="Mac OS 10.5 &amp; 10.6 : accent manquant dans Helvetica et Helvetica Neue"><img class="aligncenter size-medium wp-image-838" src="http://offroad.gonzofamily.com/files/2010/03/capture-de28099ecran-2010-03-30-a-1720011-300x123.png" alt="extensis_helvetica" width="300" height="123" /></a></p>
<p>Explications : le contenu du dossier ProtectedFonts de Leopard et Snow Leopard assure que les polices qui s&#8217;y trouvent ne soient jamais supprimé du dossier /System/Library/Fonts . En effet il les restaure aussi vite qu&#8217;on essai de les supprimer. Ayant rencontré plusieurs Mac inutilisable après l&#8217;effacement de polices du système avant la version 10.5, je suis très content qu&#8217;une telle sécurité empêche les graphistes de faire du ménage eux-même.</p>
<p>Malheureusement, il vaudra tout de même qu&#8217;une police Helvetica et Helvetica Neue soit toujours disponible (grâce au gestionnaire de police utilisé), sinon le fonctionnement du système n&#8217;est pas assuré</p>
]]></content:encoded>
			<wfw:commentRss>http://offroad.gonzofamily.com/2010/03/30/mac-os-105-106-accent-manquant-dans-helvetica-et-helvetica-neue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

