<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
	<title>blogOSX</title>
	<link>http://blogosx.homeunix.org</link>
	<dc:creator>Harry-Proton</dc:creator> 
	<description><![CDATA[le petit blog-note d'un switcher... avec de vrais morceaux d'informatique (Mac OS X, AppleScript, logiciels libres...) et des tranches de vie numérique : beaucoup de geekeries et même un peu d'UNIX
]]></description>
	<geo:lat>48.085705</geo:lat>
	<geo:long>7.347493</geo:long> 
	<copyright>Harry-Proton</copyright>
	<creativeCommons:license>http://www.creativecommons.org/licenses/by-nc-sa/2.0</creativeCommons:license>
	<language>fr</language>
	<generator>AngelineCMS Lite 0.4.1</generator>
	<lastBuildDate>Thu, 25 Dec 2008 22:36:42 +0100</lastBuildDate>
	<ttl>60</ttl>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	
<item>
	<title>French Language Pack (fr-FR) 3.0.5</title>
	<link>http://blogosx.homeunix.org/18.12.08/billet-1229629566.html</link>
	<pubDate>Thu, 18 Dec 2008 20:46:06 +0100</pubDate>
	<dc:creator>Harry-Proton</dc:creator> 
	<description>&lt;p&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/Firefox.png&quot; alt=&quot;Firefox&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;&lt;/p&gt;


&lt;h3&gt;Pack de langue français complet pour Firefox 3&lt;/h3&gt;


&lt;p&gt;Pas de grosses nouveautés pour ce &lt;em&gt;French Language Pack&lt;/em&gt;, une mise à jour mineure, puisque le &lt;code&gt;fr.jar&lt;/code&gt; n'a pas été modifié, ni les dictionnaires.&lt;/p&gt;


&lt;p&gt;Le travail de modification des options, entamé précédemment&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/18.12.08/billet-1229629566.html#note-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt;, continue avec la modification d'une nouvelle option&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/18.12.08/billet-1229629566.html#note-2&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt; en lien avec la valeur &lt;code&gt;%LOCALE%&lt;/code&gt;, valeur qui est supprimée de l'option puisque les serveurs de mozilla.com détectent très bien ceci à l'aide des entêtes &lt;acronym title=&quot;Hypertext Transfer Protocol&quot;&gt;HTTP&lt;/acronym&gt; &lt;code&gt;Accept-Language&lt;/code&gt;&amp;nbsp;:&lt;/p&gt;


&lt;pre class=&quot;javascript&quot;&gt;pref&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;startup.homepage_override_url&quot;&lt;/span&gt;, &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;http://www.mozilla.com/%APP%/%VERSION%/whatsnew/&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/pre&gt;



&lt;p&gt;Fonctionne avec Firefox&amp;nbsp;: 3.0 &amp;#8211; 3.0.*&lt;br /&gt;
&lt;a href=&quot;http://blogosx.homeunix.org/share/xpi/langpack-fr-Fx3.0.5.xpi&quot;&gt;Télécharger&amp;nbsp;: langpack-fr-Fx3.0.5.xpi&lt;/a&gt;&lt;br /&gt;
MD5 (langpack-fr-Fx3.0.5.xpi) = 0a788cee3ea595e3efcb85de7a6f541a&lt;/p&gt;

</description>
	<comments>http://blogosx.homeunix.org/18.12.08/billet-1229629566.html#co</comments>
	<guid>http://blogosx.homeunix.org/18.12.08/billet-1229629566.html</guid>
</item>

<item>
	<title>growlStyle simpleHUD</title>
	<link>http://blogosx.homeunix.org/19.11.08/billet-1227093283.html</link>
	<pubDate>Wed, 19 Nov 2008 12:14:43 +0100</pubDate>
	<dc:creator>Harry-Proton</dc:creator> 
	<description>&lt;p&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/growl.png&quot; alt=&quot;Growl&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;&lt;/p&gt;


&lt;p&gt;J'utilisais le &lt;a href=&quot;http://macthemes2.net/forum/viewtopic.php?id=16782330&quot; hreflang=&quot;en&quot;&gt;Niqu Growlstyle&lt;/a&gt;, mais je le trouvais un peu trop compact, et il commençais à me lasser&amp;#8230; mais j'aimais assez la police utilisée (famille, couleur, taille). Et puis je suis tombé sur le thème &quot;tab horizontal mini&quot; par &lt;a href=&quot;http://lbaumann.com/&quot; hreflang=&quot;en&quot;&gt;Laurent Baumann&lt;/a&gt; pour Bowtie dans le &lt;a href=&quot;http://macthemes2.net/forum/viewtopic.php?id=16790844&quot; hreflang=&quot;en&quot;&gt;Bowtie Start Pack&lt;/a&gt;, l'image de background utilisée m'a tout de suite inspiré pour modifier le Niqu Growlstyle.&lt;/p&gt;


&lt;p&gt;Ci-dessous, une démonstration en utilisant l'&lt;a href=&quot;http://blogosx.homeunix.org/16.11.08/billet-1226815332.html&quot;&gt;AdiumScript Firefox 3 Current Page v1.2b&lt;/a&gt;&amp;nbsp;:&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://blogosx.homeunix.org/medias/captures/Growl-simpleHUD.png&quot; rel=&quot;lightbox&quot;&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/captures/Growl-simpleHUD.png&quot; alt=&quot;growlStyle simpleHUD&quot; title=&quot;growlStyle simpleHUD&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h3&gt;simpleHUD.growlStyle&lt;/h3&gt;


&lt;p&gt;&lt;a href=&quot;http://blogosx.homeunix.org/share/misc/simpleHUD.zip&quot; rel=&quot;download&quot;&gt;Télécharger&amp;nbsp;: simpleHUD.zip&lt;/a&gt;&lt;br /&gt;
MD5 (simpleHUD.zip) = ac617618466755a8e650cdd41120d95b&lt;/p&gt;</description>
	<comments>http://blogosx.homeunix.org/19.11.08/billet-1227093283.html#co</comments>
	<guid>http://blogosx.homeunix.org/19.11.08/billet-1227093283.html</guid>
</item>

<item>
	<title>French Language Pack (fr-FR) 3.0.4</title>
	<link>http://blogosx.homeunix.org/19.11.08/billet-1227092122.html</link>
	<pubDate>Wed, 19 Nov 2008 11:55:22 +0100</pubDate>
	<dc:creator>Harry-Proton</dc:creator> 
	<description>&lt;p&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/Firefox.png&quot; alt=&quot;Firefox&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;&lt;/p&gt;


&lt;h3&gt;Pack de langue français complet pour Firefox 3&lt;/h3&gt;


&lt;p&gt;Pas de grandes nouveautés dans ce pack, si ce n'est quelques clefs de configuration qui auraient dû être modifiées depuis fort longtemps.&lt;/p&gt;


&lt;p&gt;C'est le format&amp;nbsp;: &lt;code&gt;&amp;lt;language&amp;gt;-&amp;lt;region&amp;gt;&lt;/code&gt; qui a été choisi pour le pack de langue, depuis la première version le &lt;a href=&quot;http://blogosx.homeunix.org/08.10.07/&quot;&gt;08/10/2007&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Puisque les &quot;&lt;em&gt;Language Pack fr-FR&lt;/em&gt;&quot; embarquent un dictionnaire s'identifiant lui même comme étant &lt;code&gt;fr_FR-classique&lt;/code&gt;. En toute logique, la clé &lt;code&gt;general.useragent.locale&lt;/code&gt; est donc modifiée en &lt;code&gt;fr-FR&lt;/code&gt;, au sens que si l'on installe ce pack, et non un de ceux disponibles sur les serveurs de mozilla&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/19.11.08/billet-1227092122.html#note-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt;, c'est peut être parce que l'on est aussi intéressé par le dictionnaire inclus dans l'extension&amp;#8230; je n'en sais rien, je dis çà comme ça, parce que à part le trafic, en l'absence de commentaires, il est doit être hasardeux de tirer des conclusions.&lt;/p&gt;


&lt;p&gt;Comme le confirme le MozillaWiki, à la page &lt;a href=&quot;https://wiki.mozilla.org/L10n:Simple_locale_names&quot; hreflang=&quot;en&quot;&gt;L10n:Simple locale names&lt;/a&gt;, il est tout à fait possible d'utiliser ce schéma pour la clé &lt;code&gt;general.useragent.locale&lt;/code&gt;, cependant, ce choix semble pouvoir aussi amener à certains ajustements sur certaines clefs utilisant la chaîne &lt;code&gt;%LOCALE%&lt;/code&gt; dans des &lt;acronym title=&quot;Uniform Resource Locator&quot;&gt;URL&lt;/acronym&gt; sur les serveurs de mozilla. Et c'est ce que corrige, enfin, ce nouveau &lt;em&gt;Language Pack fr-FR&lt;/em&gt;&amp;nbsp;:&lt;/p&gt;


&lt;pre class=&quot;javascript&quot;&gt;pref&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;app.update.url.details&quot;&lt;/span&gt;, &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;http://www.mozilla.com/%APP%/releases/&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
pref&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;app.update.url.manual&quot;&lt;/span&gt;, &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;http://www.mozilla.com/%APP%/&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
pref&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;app.update.url.details&quot;&lt;/span&gt;, &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;http://www.mozilla.com/%APP%/releases/&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;
pref&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;app.releaseNotesURL&quot;&lt;/span&gt;, &lt;span style=&quot;color: #3366CC;&quot;&gt;&quot;http://www.mozilla.com/%APP%/%VERSION%/releasenotes/&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/pre&gt;


&lt;h3&gt;Version 3.0.4&lt;/h3&gt;


&lt;p&gt;Fonctionne avec Firefox&amp;nbsp;: 3.0 &amp;#8211; 3.0.*&lt;br /&gt;
&lt;a href=&quot;http://blogosx.homeunix.org/share/xpi/langpack-fr-Fx3.0.4.xpi&quot;&gt;Télécharger&amp;nbsp;: langpack-fr-Fx3.0.4.xpi&lt;/a&gt;&lt;br /&gt;
MD5 (langpack-fr-Fx3.0.4.xpi) = 3661cef441141f05865827ec3cb92c3d&lt;/p&gt;

</description>
	<comments>http://blogosx.homeunix.org/19.11.08/billet-1227092122.html#co</comments>
	<guid>http://blogosx.homeunix.org/19.11.08/billet-1227092122.html</guid>
</item>

<item>
	<title>AdiumScript: Firefox 3 Current Page v1.2b</title>
	<link>http://blogosx.homeunix.org/16.11.08/billet-1226815332.html</link>
	<pubDate>Sun, 16 Nov 2008 07:02:12 +0100</pubDate>
	<dc:creator>Harry-Proton</dc:creator> 
	<description>&lt;p&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/Adium.png&quot; alt=&quot;AdiumScript&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;&lt;/p&gt;


&lt;p&gt;La précédente version &lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html&quot;&gt;AdiumScript: Firefox 3 Current Page v1.2a&lt;/a&gt; a été mise à jour pour être compatible avec Mac&amp;#160;OS&amp;#160;X&amp;#160;10.4.&lt;/p&gt;


&lt;p&gt;Entraînant, comme je le supposais dans &lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#c1225908678&quot;&gt;mes commentaires&lt;/a&gt;, l'ajout d'une binaire &lt;acronym title=&quot;Power PC&quot;&gt;PPC&lt;/acronym&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/16.11.08/billet-1226815332.html#note-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt; de &lt;code&gt;GNU Wget 1.8.2&lt;/code&gt; qui sera utilisée pour les versions de Mac&amp;#160;OS&amp;#160;X antérieures à Leopard.&lt;/p&gt;


&lt;p&gt;C'était, à la rigueur, le &quot;bug&quot; le plus facile à fixer. Pour mémoire, pour détecter la version de Mac&amp;#160;OS&amp;#160;X en Bash, j'ai utilisé &lt;code&gt;uname&lt;/code&gt; de cette façon&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/16.11.08/billet-1226815332.html#note-2&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt;&amp;nbsp;:&lt;/p&gt;


&lt;pre class=&quot;bash&quot;&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(uname -r | awk -F '.' '{print $1}')&quot;&lt;/span&gt; -lt &lt;span style=&quot;color: #cc66cc;&quot;&gt;9&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Pour les  &lt;a href=&quot;http://blogosx.homeunix.org/medias/captures/growl-adiumscripts-firefox3currentpage.png&quot; rel=&quot;lightbox&quot;&gt;notifications Growl&lt;/a&gt; qui sont gérées par un script Bash &lt;code&gt;osascript&lt;/code&gt;, c'était tout &quot;simplement&quot; Mac&amp;#160;OS&amp;#160;X&amp;#160;10.4 qui, semble ne pas tenir compte de l'encodage des fichiers et interpréter les scripts Bash avec l'encodage &lt;code&gt;mac-roman&lt;/code&gt; &lt;img class=&quot;smile&quot; src=&quot;http://blogosx.homeunix.org/layout/shared/smileys/omg.png&quot; alt=&quot;:omg:&quot; title=&quot;:omg:&quot; /&gt;&amp;nbsp;!&lt;/p&gt;


&lt;p&gt;Ou, encore est ce AppleScript qui envoie les paramètres vers les scripts Bash en &lt;code&gt;mac-roman&lt;/code&gt;&amp;nbsp;? C'est, du moins, ce que peut laisser à penser la fonction suivante, que j'ai écrite pour fixer ce souci sous Mac&amp;#160;OS&amp;#160;X&amp;#160;10.4&amp;nbsp;:&lt;/p&gt;


&lt;pre class=&quot;bash&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; fix-oldencoding &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(uname -r | awk -F '.' '{print $1}')&quot;&lt;/span&gt; -lt &lt;span style=&quot;color: #cc66cc;&quot;&gt;9&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(echo $1 | iconv -f utf-8 -t macroman)&quot;&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt; || &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$1&quot;&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Heureusement que, depuis Leopard, le Terminal et Bash utilisent de l'&lt;code&gt;UTF-8&lt;/code&gt;, c'est quand même vachement plus facile&amp;nbsp;!&lt;/p&gt;


&lt;h3&gt;Firefox 3 Current Page v1.2b&lt;/h3&gt;


&lt;p&gt;&lt;a href=&quot;http://blogosx.homeunix.org/share/scpt/Firefox3CurrentPage-1.2b.zip&quot; rel=&quot;download&quot;&gt;Télécharger&amp;nbsp;: Firefox3CurrentPage-1.2b.zip&lt;/a&gt;&lt;br /&gt;
MD5 (Firefox3CurrentPage-1.2b.zip) = 42a8d2de97a0c269520251b549a61eab&lt;/p&gt;


&lt;p&gt;Après avoir téléchargé l'archive et installé Firefox3CurrentPage, il suffira d'utiliser la chaîne &lt;code&gt;%_fx&lt;/code&gt; pour que celle-ci soit remplacée par le lien hypertexte correspondant à la page en cours de consultation dans Firefox 3.&lt;/p&gt;

</description>
	<comments>http://blogosx.homeunix.org/16.11.08/billet-1226815332.html#co</comments>
	<guid>http://blogosx.homeunix.org/16.11.08/billet-1226815332.html</guid>
</item>

<item>
	<title>French Language Pack (fr-FR) 3.0.3</title>
	<link>http://blogosx.homeunix.org/11.11.08/billet-1226399708.html</link>
	<pubDate>Tue, 11 Nov 2008 11:35:08 +0100</pubDate>
	<dc:creator>Harry-Proton</dc:creator> 
	<description>&lt;p&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/Firefox.png&quot; alt=&quot;Firefox&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;&lt;/p&gt;


&lt;h3&gt;Pack de langue français complet pour Firefox 3&lt;/h3&gt;


&lt;p&gt;Nouvelle mise à jour du &lt;em&gt;French Language Pack (fr-FR)&lt;/em&gt;, puisque Firefox à eu le temps de passer en version 3.0.3 depuis la précédente version&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.11.08/billet-1226399708.html#note-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt; du pack de langue, mais surtout parce que les dictionnaires de &lt;a href=&quot;http://dicollecte.free.fr/home.php?prj=fr&quot; hreflang=&quot;fr&quot;&gt;dicollecte&lt;/a&gt; sont passés en version 3.0 au 02/11/2008.&lt;/p&gt;


&lt;p&gt;Le &lt;code&gt;fr.jar&lt;/code&gt; a aussi été mis à jour, il est issu de Firefox 3.0.3, et la signature &lt;acronym title=&quot;Message Digest 5&quot;&gt;MD5&lt;/acronym&gt; du &lt;code&gt;fr.jar&lt;/code&gt; a effectivement changé, signe de mises à jour. C'est le même que celui de Firefox 3.0.4, là aussi, c'est le MD5 qui le dit &lt;img class=&quot;smile&quot; src=&quot;http://blogosx.homeunix.org/layout/shared/smileys/wink.png&quot; alt=&quot;:wink:&quot; title=&quot;:wink:&quot; /&gt;.&lt;/p&gt;


&lt;p&gt;Pour plus de détails se reporter aux billets concernant les précédents &lt;em&gt;French Language Packs&lt;/em&gt; Français et, plus particulièrement, celui concernant le &lt;a href=&quot;http://blogosx.homeunix.org/04.07.08/billet-1215180632.html&quot;&gt;French Language Pack (fr-FR) 3.0.2&lt;/a&gt;.&lt;/p&gt;


&lt;h3&gt;Version 3.0.3&lt;/h3&gt;


&lt;p&gt;Fonctionne avec Firefox&amp;nbsp;: 3.0 &amp;#8211; 3.0.*&lt;br /&gt;
&lt;a href=&quot;http://blogosx.homeunix.org/share/xpi/langpack-fr-Fx3.0.3.xpi&quot;&gt;Télécharger&amp;nbsp;: langpack-fr-Fx3.0.3.xpi&lt;/a&gt;&lt;br /&gt;
MD5 (langpack-fr-Fx3.0.3.xpi) = 4667a9d2e30de85a76e5954579c479db&lt;/p&gt;

</description>
	<comments>http://blogosx.homeunix.org/11.11.08/billet-1226399708.html#co</comments>
	<guid>http://blogosx.homeunix.org/11.11.08/billet-1226399708.html</guid>
</item>

<item>
	<title>firefox-url (script bash/osascript)</title>
	<link>http://blogosx.homeunix.org/31.10.08/billet-1225653994.html</link>
	<pubDate>Sun, 02 Nov 2008 20:26:34 +0100</pubDate>
	<dc:creator>Harry-Proton</dc:creator> 
	<description>&lt;p&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/Terminal.png&quot; alt=&quot;Terminal&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;&lt;/p&gt;


&lt;p&gt;Un petite fonction bash, pouvant être utilisée comme un script, ou dans un &lt;code&gt;bash_aliases&lt;/code&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225653994.html#note-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt;, pour récupérer l'adresse de la page en cours de consultation dans Firefox, grâce à AppleScript. Cette commande peut être utile pour, par exemple, utiliser plus aisément des scripts comme &lt;a href=&quot;http://www.arrakis.es/~rggi3/youtube-dl/&quot; hreflang=&quot;en&quot;&gt;youtube-dl&lt;/a&gt; ou &lt;code&gt;dailymotion-dl&lt;/code&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225653994.html#note-2&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt;.&lt;/p&gt;


&lt;p&gt;On pourra aussi installer, puisque ce n'est pas le cas par défaut sous Mac OS X, &lt;code&gt;bash-completion&lt;/code&gt;, à l'aide de DarwinPorts&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225653994.html#note-3&quot;&gt;3&lt;/a&gt;]&lt;/sup&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225653994.html#note-4&quot;&gt;4&lt;/a&gt;]&lt;/sup&gt; par exemple&amp;nbsp;; ce qui est quand même plus pratique pour les noms de commandes plus ou moins longs &lt;img class=&quot;smile&quot; src=&quot;http://blogosx.homeunix.org/layout/shared/smileys/wink.png&quot; alt=&quot;:wink:&quot; title=&quot;:wink:&quot; /&gt;.&lt;/p&gt;


&lt;pre class=&quot;bash&quot;&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Time-stamp: &amp;lt;2008-10-29 19:13:45 (blogosx.homeunix.org)&amp;gt;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; firefox-url &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; pidof &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt; 
	&lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; $&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;ps axc | &lt;span style=&quot;&quot;&gt;awk&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;{if (&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\$&lt;/span&gt;5==&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;$1&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;) print &lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\$&lt;/span&gt;1}&quot;&lt;/span&gt;| tr &lt;span style=&quot;color: #ff0000;&quot;&gt;'&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;'&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;' '&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; applescript-firefox-url &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;cmd=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(cat &amp;lt;&amp;lt; EOF
if ((count of windows of application &quot;&lt;/span&gt;Minefield&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;) &amp;gt; 0) then
	tell application &quot;&lt;/span&gt;Minefield&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot; to return («class curl» of window 1)
end if
EOF
)&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;url=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(osascript -e &quot;&lt;/span&gt;&lt;span style=&quot;color: #0000ff;&quot;&gt;$cmd&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;)&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;%s&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$url&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
    
    &lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; main &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;msg_e=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'Error: Firefox is not running'&lt;/span&gt;
&amp;nbsp;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; -n &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(pidof 'firefox-bin')&quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	    &lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;%s&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(applescript-firefox-url)&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
	    &lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt; || &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	    &lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;%s&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$msg_e&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;
	    &lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    main
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
firefox-url
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Local Variables: &lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# mode: Shell-script &lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# coding: mule-utf-8 &lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# End: &lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Ensuite, récupérer la vidéo en cours de consultation dans Firefox, sur YouTube, pourrait se résumer à une commande du style&amp;nbsp;:&lt;/p&gt;


&lt;pre class=&quot;bash&quot;&gt;youtube-dl $&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;firefox-url&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;Évitant les fastidieux copier/coller, et les manipulations d'une fenêtre à une autre.&lt;/p&gt;

</description>
	<comments>http://blogosx.homeunix.org/31.10.08/billet-1225653994.html#co</comments>
	<guid>http://blogosx.homeunix.org/31.10.08/billet-1225653994.html</guid>
</item>

<item>
	<title>AdiumScript: Firefox 3 Current Page v1.2a</title>
	<link>http://blogosx.homeunix.org/31.10.08/billet-1225447850.html</link>
	<pubDate>Fri, 31 Oct 2008 11:10:50 +0100</pubDate>
	<dc:creator>Harry-Proton</dc:creator> 
	<description>&lt;p&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/Adium.png&quot; alt=&quot;AdiumScript&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;&lt;/p&gt;


&lt;p&gt;Comme dit dans ce précédent billet&amp;nbsp;: &lt;a href=&quot;http://blogosx.homeunix.org/10.07.08/billet-1215720016.html&quot;&gt;AdiumScript: Firefox 3 Current Page&lt;/a&gt;, un bug AppleScript&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#note-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt; dans Firefox 3 empêche les AdiumScripts de récupérer le titre de la page en cours de consultation dans Firefox par Adium&amp;#8230; c'est pourquoi j'avais déjà écrit un précédent AdiumScript se basant sur &lt;code&gt;curl&lt;/code&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#note-2&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt;, cependant la &lt;code&gt;libcurl&lt;/code&gt; présente quelques limitations&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#note-3&quot;&gt;3&lt;/a&gt;]&lt;/sup&gt; (du moins sur ma machine&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#note-4&quot;&gt;4&lt;/a&gt;]&lt;/sup&gt; sous Mac OS X 10.5.5). Ces limitations de la &lt;code&gt;libcurl&lt;/code&gt;, la présence du même bug après que plusieurs versions de Firefox se soient succédées et certaines limites inhérentes au mode de rédaction du précédent script m'ont amenés à écrire une nouvelle version du &quot;même&quot; script.&lt;/p&gt;


&lt;p&gt;Celui-ci embarque désormais une &lt;a href=&quot;http://en.wikipedia.org/wiki/Universal_binary&quot; hreflang=&quot;en&quot;&gt;Universal Binary&lt;/a&gt; (compatible Intel et &lt;acronym title=&quot;PowerPC&quot;&gt;PPC&lt;/acronym&gt;) de &lt;code&gt;wget&lt;/code&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#note-5&quot;&gt;5&lt;/a&gt;]&lt;/sup&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#note-6&quot;&gt;6&lt;/a&gt;]&lt;/sup&gt; pour récupérer le contenu sur le web. L'utilisation de &lt;code&gt;wget&lt;/code&gt; permettant aussi de s'affranchir de certaines limitations en apportant, notamment, le support de &lt;a href=&quot;http://fr.wikipedia.org/wiki/Https#HTTPS&quot; hreflang=&quot;fr&quot;&gt;HTTPS&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Bien que ce nouvel AdiumScript conserve un mode de fonctionnement similaire au précédent, un certain nombre de nouvelles fonctionnalités ont été apportées dont le support de Growl&amp;nbsp;; grâce à un script Bash, utilisant &lt;code&gt;osascript&lt;/code&gt;, nommé &lt;code&gt;growlnotify&lt;/code&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#note-7&quot;&gt;7&lt;/a&gt;]&lt;/sup&gt;.&lt;/p&gt;


&lt;p&gt;De plus, il est maintenant possible de localiser cet AdiumScript, du moins en ce qui concerne la plupart des messages affichés grâce à Growl.&lt;/p&gt;


&lt;h3&gt;Structure des fichiers&lt;/h3&gt;


&lt;pre&gt;Firefox3CurrentPage.AdiumScripts
|-- Contents
|   |-- Resources
|   |   |-- English.lproj
|   |   |   `-- Localizable.strings
|   |   |-- Firefox3CurrentPage.scpt
|   |   |-- French.lproj
|   |   |   `-- Localizable.strings
|   |   |-- fetch-title
|   |   |-- growlnotify
|   |   `-- wget
|   `-- Resources Disabled
`-- Info.plist

5 directories, 7 files&lt;/pre&gt;


&lt;p&gt;Cette structure est assez similaire à celle de n'importe quel AppleScript, avec notamment la présence des dossiers &lt;code&gt;.lproj&lt;/code&gt; dans le dossier &lt;code&gt;Resources&lt;/code&gt;.&lt;/p&gt;


&lt;h3&gt;Firefox3CurrentPage.scpt&lt;/h3&gt;


&lt;pre class=&quot;applescript&quot;&gt;&lt;span style=&quot;color: #808080;&quot;&gt;(*
	Firefox3CurrentPage.AdiumScripts
	Harry-Proton &amp;lt;http://blogosx.homeunix.org/&amp;gt;
 
	updated 2008-11-01T22:20:22+01:00
	
	Copyright (C) 2005 Free Software Foundation, Inc.
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.
*)&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;script&lt;/span&gt; Firefox3CurrentPageObj
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; scriptPath &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;missing value&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; bundlePath &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;missing value&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; scriptName &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;Firefox3CurrentPage.AdiumScripts&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; aliasFolder &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;missing value&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; UA &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; firefoxProperties &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;missing value&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; cURL &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; title &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; processFirefox &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;0&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; processAdium &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;0&lt;/span&gt;
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; setBunldeProperties&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; scriptPath &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;do shell script&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&quot;dirname &quot;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;quoted form&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;POSIX path&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;path to&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;me&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;/&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; aliasFolder &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;POSIX file&lt;/span&gt; scriptPath
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; setBunldeProperties
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; setUA&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;processAdium &lt;span style=&quot;color: #000;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;then&lt;/span&gt;
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;application&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;Adium&quot;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;¬&lt;/span&gt;
				&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; adiumProperties &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;its&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;properties&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
			
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; UA &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;name&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; adiumProperties &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;/&quot;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;version&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; adiumProperties &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot; (+http://www.adiumx.com)&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;string&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;if&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; setUA
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; setFirefoxProperties&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;application&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;Minefield&quot;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;¬&lt;/span&gt;
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; firefoxProperties &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;properties&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;window&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; cURL &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; «&lt;span style=&quot;color: #00f;&quot;&gt;class&lt;/span&gt; curl» &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; firefoxProperties
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; title &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; «&lt;span style=&quot;color: #00f;&quot;&gt;class&lt;/span&gt; pTit» &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; firefoxProperties
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; setFirefoxProperties
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; countProcesses&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;application&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;System Events&quot;&lt;/span&gt;
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; processFirefox &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;¬&lt;/span&gt;
				&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;application&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;processes&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;whose&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;name&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;equal&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;firefox-bin&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;count&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;integer&lt;/span&gt;
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; processAdium &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;¬&lt;/span&gt;
				&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;application&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;processes&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;whose&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;name&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;is&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;equal&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;Adium&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;count&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;integer&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; countProcesses
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;script&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;script&lt;/span&gt; notifier
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; appName &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;missing value&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; gmsg &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; gtit &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; appIcon &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;Adium&quot;&lt;/span&gt;
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; setAppName&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; appName &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;get&lt;/span&gt; scriptName &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; Firefox3CurrentPageObj
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; setAppName
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; notify&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;tit, msg&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;gmsg, gtit&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;msg, tit&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; obj &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; Firefox3CurrentPageObj
		setAppName&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; args &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;¬&lt;/span&gt;
			&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;quoted form&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;appName&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span style=&quot;color: #00f;&quot;&gt;quoted form&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;gtit&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span style=&quot;color: #00f;&quot;&gt;quoted form&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;gmsg&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span style=&quot;color: #00f;&quot;&gt;quoted form&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;appIcon&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
		&lt;span style=&quot;color: #00f;&quot;&gt;do shell script&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;quoted form&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;scriptPath &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;growlnotify&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;¬&lt;/span&gt;
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;space&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;args &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot; &amp;amp;&amp;gt; /dev/null &amp;amp;&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; notify
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;script&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;script&lt;/span&gt; Wget
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; UA &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #00f;&quot;&gt;property&lt;/span&gt; cURL &lt;span style=&quot;color: #000;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;missing value&lt;/span&gt;
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; fetch_title&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;trgt&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; cURL &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; trgt
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; obj &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; Firefox3CurrentPageObj
		
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; xbin &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;quoted form&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; scriptPath &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;fetch-title&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; args &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;quoted form&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; trgt&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;space&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;quoted form&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; UA&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;do shell script&lt;/span&gt; xbin &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;space&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;args &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; fetch_title
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;script&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; substitute&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;text &lt;span style=&quot;color: #00f;&quot;&gt;item&lt;/span&gt; delimiters&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;space&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; Firefox3CurrentPageObj
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; obj &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; Firefox3CurrentPageObj
		setBunldeProperties&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		countProcesses&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		setUA&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt;
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;get&lt;/span&gt; processFirefox &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;then&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;try&lt;/span&gt;
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; Firefox3CurrentPageObj &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; setFirefoxProperties&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;error&lt;/span&gt; m &lt;span style=&quot;color: #00f;&quot;&gt;number&lt;/span&gt; n
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; notifier &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; notify&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; localized_string&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&quot;Error&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;space&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; n&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;, m&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;try&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;else&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; notifier
			notify&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; localized_string&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&quot;Error&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;, &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; localized_string&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&quot;Firefox is not running.&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;if&lt;/span&gt;
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;count&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;items&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;get&lt;/span&gt; title &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;then&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; notifier
			notify&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; localized_string&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&quot;Fetching&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;, localized_string&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&quot;Fetching content from web.&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;try&lt;/span&gt;
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; Wget
				&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;its&lt;/span&gt; UA &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; UA &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj
				&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; title &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; fetch_title&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;cURL &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;error&lt;/span&gt; m &lt;span style=&quot;color: #00f;&quot;&gt;number&lt;/span&gt; n
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; notifier
				notify&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;my&lt;/span&gt; localized_string&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&quot;Error&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;space&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; n, m&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt;
			&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;get&lt;/span&gt; cURL &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;try&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;if&lt;/span&gt;
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;text &lt;span style=&quot;color: #00f;&quot;&gt;item&lt;/span&gt; delimiters&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;return&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000;&quot;&gt;&quot;&amp;lt;HTML&amp;gt;&amp;lt;a href=&lt;span style=&quot;color: #000;&quot;&gt;\&quot;&lt;/span&gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;get&lt;/span&gt; cURL &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;&lt;span style=&quot;color: #000;&quot;&gt;\&quot;&lt;/span&gt;&amp;gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;first&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;text&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;item&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; title &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;&amp;lt;/a&amp;gt;&amp;lt;/HTML&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;as&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;string&lt;/span&gt;
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; substitute
&amp;nbsp;
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; localized_string&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;str&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; obj &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; Firefox3CurrentPageObj
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;set&lt;/span&gt; uFolder &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;to&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;POSIX file&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #00f;&quot;&gt;do shell script&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;cd &quot;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;quoted form&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;scriptPath &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;of&lt;/span&gt; obj&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&amp;amp;&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot; &amp;amp;&amp;amp; cd ../.. &amp;amp;&amp;amp; echo &lt;span style=&quot;color: #000;&quot;&gt;\&quot;&lt;/span&gt;$(pwd)&lt;span style=&quot;color: #000;&quot;&gt;\&quot;&lt;/span&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
	
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;application&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;System Events&quot;&lt;/span&gt;
		&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;get&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;localized string&lt;/span&gt; str &lt;span style=&quot;color: #000;&quot;&gt;¬&lt;/span&gt;
			&lt;span style=&quot;color: #00f;&quot;&gt;from table&lt;/span&gt; &lt;span style=&quot;color: #000;&quot;&gt;&quot;Localizable&quot;&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;bundle&lt;/span&gt; &lt;span style=&quot;color: #00f;&quot;&gt;alias&lt;/span&gt; uFolder
	&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;tell&lt;/span&gt;
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; localized_string
&amp;nbsp;
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;on&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;run&lt;/span&gt;
	substitute&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;end&lt;/span&gt; &lt;span style=&quot;color: #00f; font-weight: bold;&quot;&gt;run&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;La partie en AppleScript a été réécrite avec une plus grande orientation objet. Comme on peut le constater, il est nécessaire de faire appel à de nombreuses applications, qui peuvent être en train de fonctionner ou non&amp;nbsp;: Firefox, Adium, &lt;del&gt;Finder&lt;/del&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#note-8&quot;&gt;8&lt;/a&gt;]&lt;/sup&gt;, System Events, Growl&amp;nbsp;; et la &lt;acronym title=&quot;Programmation orientée objet&quot;&gt;POO&lt;/acronym&gt; permet, tout en allégeant le code, et en, je l'espère, le rendant plus compréhensible, de limiter les appels redondants à certaines applications&amp;nbsp;; je pensais principalement au Finder, jusqu'à temps que je ne m'aperçoive qu'il ne semble pas possible de l'utiliser depuis un AdiumScript &lt;img class=&quot;smile&quot; src=&quot;http://blogosx.homeunix.org/layout/shared/smileys/sad.png&quot; alt=&quot;:sad:&quot; title=&quot;:sad:&quot; /&gt;&amp;nbsp;; mais aussi à System Events.&lt;/p&gt;


&lt;h3&gt;Licence&lt;/h3&gt;

&lt;p&gt;Comme cet AdiumScript embarque avec lui une binaire &lt;code&gt;GNU Wget 1.11.4&lt;/code&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#note-9&quot;&gt;9&lt;/a&gt;]&lt;/sup&gt;, j'ai choisi de mettre ce script et le reste du bundle sous la même licence.&lt;/p&gt;



&lt;h3&gt;fetch-title&lt;/h3&gt;


&lt;pre class=&quot;bash&quot;&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Time-stamp: &amp;lt;2008-10-31 10:52:26 (blogosx.homeunix.org)&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Copyright (C) 2005 Free Software Foundation, Inc.&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# This program is distributed in the hope that it will be useful,&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# but WITHOUT ANY WARRANTY; without even the implied warranty of&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# GNU General Public License for more details.&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; fetch-title &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;wget=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(dirname &quot;&lt;/span&gt;$0&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;)/wget&quot;&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; fetch &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;URL=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$1&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; -z &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$2&quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;UA=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(bash --version | grep -o &quot;&lt;/span&gt;version&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;)&quot;&lt;/span&gt; || &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;UA=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$2&quot;&lt;/span&gt;
&amp;nbsp;
	&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$wget&quot;&lt;/span&gt; -q -O - &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$URL&quot;&lt;/span&gt; -&lt;span style=&quot;color: #0000ff;&quot;&gt;U=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$UA&quot;&lt;/span&gt; --no-check-certificate | &lt;span style=&quot;&quot;&gt;cat&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; main &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;content=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;fetch &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$1&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$2&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;charset=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$content&quot;&lt;/span&gt; | egrep -o &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;charset=([A-z0-9-]+)&quot;&lt;/span&gt; | &lt;span style=&quot;&quot;&gt;awk&lt;/span&gt; -F &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;=&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;'{print $2}'&lt;/span&gt; | tr &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;a-z&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;A-Z&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;pgtitle=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$content&quot;&lt;/span&gt; | egrep -o &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;&amp;lt;title&amp;gt;(.*)&amp;lt;/title&amp;gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; -n &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$pgtitle&quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	    &lt;span style=&quot;color: #0000ff;&quot;&gt;pgtitle=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$pgtitle&quot;&lt;/span&gt; | &lt;span style=&quot;&quot;&gt;awk&lt;/span&gt; -F &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;&amp;lt;title&amp;gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;'{print $2}'&lt;/span&gt; | &lt;span style=&quot;&quot;&gt;awk&lt;/span&gt; -F &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;&amp;lt;/title&amp;gt;&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;'{print $1}'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	    &lt;span style=&quot;color: #0000ff;&quot;&gt;pgtitle=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;pgtitle//&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;'&quot;&lt;/span&gt;/&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\'&lt;/span&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
	    &lt;span style=&quot;color: #0000ff;&quot;&gt;pgtitle=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;php -r &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;echo(html_entity_decode('$pgtitle'));&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; -n &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$charset&quot;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$charset&quot;&lt;/span&gt; != &lt;span style=&quot;color: #ff0000;&quot;&gt;'UTF-8'&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span style=&quot;color: #0000ff;&quot;&gt;pgtitle=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$pgtitle&quot;&lt;/span&gt; | iconv  -f &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$charset&quot;&lt;/span&gt; -t utf-&lt;span style=&quot;color: #cc66cc;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; || &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
		    &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$pgtitle&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
		    &lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
		&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
	    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
	    &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${pgtitle}&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt; || &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	    &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;Can not fetch title from: $1&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;
	    &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$1&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
	    &lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;145&lt;/span&gt;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
    main &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${@}&quot;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
fetch-title &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${@}&quot;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Local Variables: &lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# mode: Shell-script &lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# coding: mule-utf-8 &lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# End: &lt;/span&gt;&lt;/pre&gt;


&lt;h3&gt;Growl&lt;/h3&gt;


&lt;p&gt;&lt;a href=&quot;http://img136.imageshack.us/img136/6470/image1ec2.png&quot; rel=&quot;lightbox&quot;&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/captures/thumbs/growl-firefox3-adiumscript.png&quot; alt=&quot;Growl - Préférences Système&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;La notification utilisée par le script peut être configurée ou désactivée grâce au PrefPane de Growl dans les Préférences Système. Cette notification porte le nom du scrip et utilise l'icône de l'application Adium.&lt;/p&gt;


&lt;p&gt;La notification, bien que ne portant qu'un seul nom, a deux rôles. Premier rôle&amp;nbsp;: notifier que la récupération du contenu a commencé&amp;nbsp;; certaines fois le reste du script se déroule si vite, dépendamment de la &lt;acronym title=&quot;Bande passante&quot;&gt;BP&lt;/acronym&gt; et du poids du document, que Growl ne se déclenche qu'après le résultat du script. Deuxième rôle&amp;nbsp;: signaler les erreurs, comme par exemple l'impossibilité de récupérer le titre d'une page, si les balises &lt;code&gt;&amp;lt;title&amp;gt;&lt;/code&gt; et &lt;code&gt;&amp;lt;/title&amp;gt;&lt;/code&gt; sont écrites en majuscules, notamment, ce qui n'est pas conforme au standards définis par le &lt;acronym title=&quot;World Wide Web Consortium&quot;&gt;W3C&lt;/acronym&gt; de toute façon.&lt;/p&gt;


&lt;h3&gt;Firefox 3 Current Page v1.2a&lt;/h3&gt;


&lt;p&gt;&lt;a href=&quot;http://blogosx.homeunix.org/share/scpt/Firefox3CurrentPage-1.2a.zip&quot; rel=&quot;download&quot;&gt;Télécharger&amp;nbsp;: Firefox3CurrentPage-1.2a.zip&lt;/a&gt;&lt;br /&gt;
MD5 (Firefox3CurrentPage-1.2a.zip) = e99c5d5d6abb52cf7ce67ab7bfd1c783&lt;/p&gt;

</description>
	<comments>http://blogosx.homeunix.org/31.10.08/billet-1225447850.html#co</comments>
	<guid>http://blogosx.homeunix.org/31.10.08/billet-1225447850.html</guid>
</item>

<item>
	<title>Utiliser le &quot;color picker&quot; depuis le Terminal</title>
	<link>http://blogosx.homeunix.org/21.09.08/billet-1222012044.html</link>
	<pubDate>Sun, 21 Sep 2008 17:47:24 +0200</pubDate>
	<dc:creator>Harry-Proton</dc:creator> 
	<description>&lt;p&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/Terminal.png&quot; alt=&quot;Terminal&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;&lt;/p&gt;


&lt;p&gt;Je voulais utiliser le &lt;em&gt;color picker&lt;/em&gt; de Mac OS X pour obtenir des couleur hexadécimales&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/21.09.08/billet-1222012044.html#note-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt;&amp;#8230; à cela, rien de bien compliqué, en AppleScript, un simple &lt;code&gt;choose color&lt;/code&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/21.09.08/billet-1222012044.html#note-2&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt; est largement suffisant&amp;#8230;&lt;/p&gt;


&lt;p&gt;En Python, avec Tkinter&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/21.09.08/billet-1222012044.html#note-3&quot;&gt;3&lt;/a&gt;]&lt;/sup&gt;, c'est à peine plus compliqué&amp;nbsp;:&lt;/p&gt;


&lt;pre class=&quot;python&quot;&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#!/usr/bin/env python&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# -*- coding: utf-8 -*-&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;import&lt;/span&gt; &lt;span style=&quot;color: #dc143c;&quot;&gt;Tkinter&lt;/span&gt; as tk
&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;from&lt;/span&gt; tkColorChooser &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;import&lt;/span&gt; askcolor
&amp;nbsp;
&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;triple, hexstr&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt; = askcolor&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;
&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt; hexstr&lt;/pre&gt;


&lt;p&gt;De plus, on obtient directement la valeur hexadécimale&amp;nbsp;! Sauf que le &quot;Color Picker&quot; n'est pas une fenêtre mais un panneau, et qu'il est alors nécessaire de prendre le focus sur l'icône de Python dans le Dock, puisque il n'y a pas de frame/fenêtre.&lt;/p&gt;


&lt;p&gt;Donc, je décidais de me tourner vers Bash, puisque, avec AppleScript et la commande &lt;code&gt;osascript&lt;/code&gt;, j'allais attacher le panneau du &lt;em&gt;color picker&lt;/em&gt; à la fenêtre d'une application scriptable, en l'occurrence, le Terminal&amp;nbsp;; même si, alors, il allait être nécessaire de faire les conversions de décimal à hexadécimal et que, &lt;em&gt;a priori&lt;/em&gt;, Bash n'est pas le langage de choix pour faire des calculs &lt;img class=&quot;smile&quot; src=&quot;http://blogosx.homeunix.org/layout/shared/smileys/wink.png&quot; alt=&quot;:wink:&quot; title=&quot;:wink:&quot; /&gt;.&lt;/p&gt;


&lt;p&gt;En effet, dans l'exemple ci-après, la commande &lt;code&gt;choose color&lt;/code&gt; retourne, une valeur &lt;acronym title=&quot;Red Green Blue&quot;&gt;RGB&lt;/acronym&gt; sous la forme d'une liste AppleScript, &lt;code&gt;{65535, 13107, 13107}&lt;/code&gt;.&lt;/p&gt;


&lt;p&gt;&lt;a href=&quot;http://img216.imageshack.us/img216/9275/imgdw6.png&quot; rel=&quot;lightbox&quot;&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/captures/thumbs/choosecolor_term.jpg&quot; alt=&quot;Color Picker et Terminal de Mac OS X&quot; title=&quot;choose color (color picker) &quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Ce qui donne, en Bash&amp;nbsp;:&lt;/p&gt;


&lt;pre class=&quot;bash&quot;&gt;&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Time-stamp: &amp;lt;2008-09-23 20:40:52 (blogosx.homeunix.org)&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #0000ff;&quot;&gt;version=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;1.0.2a&quot;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# last color used &lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# $1 `temp file`&lt;/span&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; get_lastcolor &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;tmpfile=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$1&quot;&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;color=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'0, 0, 0'&lt;/span&gt;
    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; -e &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${tmpfile}&quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;color=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;cat&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${tmpfile}&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$color&quot;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# $1 `default color`&lt;/span&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; get_color&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;cmd=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;tell application &lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt;Terminal&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\&quot;&lt;/span&gt; to set c to choose color default color {${1}}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;return c&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;color=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;&quot;&gt;osascript&lt;/span&gt; -e &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$cmd&quot;&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;&amp;gt; /dev/null&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$color&quot;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# $1 `color to convert`&lt;/span&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; convert_color&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;color=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$1&quot;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;IFS=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;','&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;for&lt;/span&gt; i &lt;span style=&quot;color: #b1b100;&quot;&gt;in&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$color&lt;/span&gt;; &lt;span style=&quot;color: #b1b100;&quot;&gt;do&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;c256=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;bc &amp;lt;&amp;lt;&amp;lt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${i}/256&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;hexa=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;bc &amp;lt;&amp;lt;&amp;lt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;ibase=10;obase=16;${c256}&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;c_css=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${c_css}${hexa}&quot;&lt;/span&gt;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;done&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$c_css&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# parse arguments&lt;/span&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; parse_args&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;eval&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;CUROPT=&lt;/span&gt;\$$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;OPTIND&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;getopts&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;vh-:&quot;&lt;/span&gt; opt &lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;&amp;gt; /dev/null; &lt;span style=&quot;color: #b1b100;&quot;&gt;do&lt;/span&gt;
	&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$opt&lt;/span&gt; = &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;-&quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; ; &lt;span style=&quot;color: #b1b100;&quot;&gt;then&lt;/span&gt;
	    &lt;span style=&quot;color: #b1b100;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$OPTARG&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;in&lt;/span&gt;
		&lt;span style=&quot;color: #000066;&quot;&gt;help&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; 
		    &lt;span style=&quot;color: #0000ff;&quot;&gt;opt=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'h'&lt;/span&gt; ;;
		version &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; 
		    &lt;span style=&quot;color: #0000ff;&quot;&gt;opt=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'v'&lt;/span&gt; ;;
		nocopy &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;  
		    &lt;span style=&quot;color: #0000ff;&quot;&gt;opt_copy=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; 
		    &lt;span style=&quot;color: #0000ff;&quot;&gt;opt=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;''&lt;/span&gt; ;;
		css &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;  
		    &lt;span style=&quot;color: #0000ff;&quot;&gt;opt_css=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; 
		    &lt;span style=&quot;color: #0000ff;&quot;&gt;opt=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;''&lt;/span&gt; ;;
		* &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; 
		    &lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;Invalid option&amp;#8230;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;
		    &lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; ;;
	    &lt;span style=&quot;color: #b1b100;&quot;&gt;esac&lt;/span&gt;
	&lt;span style=&quot;color: #b1b100;&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
	&lt;span style=&quot;color: #b1b100;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;$opt&lt;/span&gt; &lt;span style=&quot;color: #b1b100;&quot;&gt;in&lt;/span&gt;
	    h &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;Usage: $(str_bin) [OPTIONS]&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;$(usage 0)&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; 
		&lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; ;;
	    v &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(str_bin), version ${version}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt;  &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; 
		&lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; ;;
	    ? &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; 
		&lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;Invalid option&amp;#8230;&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;
		&lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; ;;
	&lt;span style=&quot;color: #b1b100;&quot;&gt;esac&lt;/span&gt;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;done&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# display usage (--help)&lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# exit $1&lt;/span&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; usage&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	&lt;span style=&quot;&quot;&gt;cat&lt;/span&gt; &amp;lt;&amp;lt; EOF
Options:
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;--nocopy&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;--css&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;--version&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;--&lt;span style=&quot;color: #000066;&quot;&gt;help&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;
EOF
	&lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; $&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; str_bin &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;dir=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;dirname &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$0&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;bin=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${0}&quot;&lt;/span&gt; | &lt;span style=&quot;&quot;&gt;awk&lt;/span&gt; -F &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${dir}/&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;'{print $2}'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${bin}&quot;&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# main function&lt;/span&gt;
&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; main&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;hash=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;md5 &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$0&quot;&lt;/span&gt; | &lt;span style=&quot;&quot;&gt;awk&lt;/span&gt; -F &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot; = &quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;'{print $2}'&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;tmpfile=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;/tmp/$(str_bin)_${hash}&quot;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;color=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;get_lastcolor &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$tmpfile&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;flag=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
    &lt;span style=&quot;color: #0000ff;&quot;&gt;opt_copy=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
    &lt;span style=&quot;color: #0000ff;&quot;&gt;opt_css=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;
&amp;nbsp;
    parse_args &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${@}&quot;&lt;/span&gt;
&amp;nbsp;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;while&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$flag&quot;&lt;/span&gt; -gt &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span style=&quot;color: #b1b100;&quot;&gt;do&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;color=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;get_color &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$color&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
&amp;nbsp;
	&lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; -n &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$color&quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span style=&quot;color: #b1b100;&quot;&gt;then&lt;/span&gt;
	    &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; -n &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$hash&quot;&lt;/span&gt; &amp;amp;&amp;amp; -n &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(str_bin)&quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span style=&quot;color: #b1b100;&quot;&gt;then&lt;/span&gt;
		&lt;span style=&quot;color: #000066;&quot;&gt;echo&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$color&quot;&lt;/span&gt; &amp;gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$tmpfile&quot;&lt;/span&gt;
	    &lt;span style=&quot;color: #b1b100;&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
	    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;color_out=&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;convert_color &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$color&quot;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt;
&amp;nbsp;
	    &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$opt_css&quot;&lt;/span&gt; -gt &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span style=&quot;color: #b1b100;&quot;&gt;then&lt;/span&gt;
		&lt;span style=&quot;color: #0000ff;&quot;&gt;color_out=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;#${color_out}&quot;&lt;/span&gt;
	    &lt;span style=&quot;color: #b1b100;&quot;&gt;fi&lt;/span&gt;
&amp;nbsp;
	    &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$opt_copy&quot;&lt;/span&gt; -gt &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span style=&quot;color: #b1b100;&quot;&gt;then&lt;/span&gt;
		&lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$color_out&quot;&lt;/span&gt; | pbcopy &amp;amp;&amp;amp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
		    &lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;copied to clipboard: ${color_out}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; 
		&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
	    &lt;span style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt;
		&lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${color_out}&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt; 
	    &lt;span style=&quot;color: #b1b100;&quot;&gt;fi&lt;/span&gt;
	    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;flag=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
	&lt;span style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt;
	    &lt;span style=&quot;color: #000066;&quot;&gt;local&lt;/span&gt; &lt;span style=&quot;color: #0000ff;&quot;&gt;flag=&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;
	&lt;span style=&quot;color: #b1b100;&quot;&gt;fi&lt;/span&gt; 
    &lt;span style=&quot;color: #b1b100;&quot;&gt;done&lt;/span&gt;;
&amp;nbsp;
    &lt;span style=&quot;color: #000066;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;      
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
main &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${@}&quot;&lt;/span&gt;
&amp;nbsp;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# Local Variables: &lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# mode: Shell-script &lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# coding: mule-utf-8 &lt;/span&gt;
&lt;span style=&quot;color: #808080; font-style: italic;&quot;&gt;# End: &lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;Le script &quot;se souvient&quot;, au cours d'une même session, de la dernière couleur utilisée, grâce à un fichier temporaire. Le &lt;em&gt;color picker&lt;/em&gt; reste affiché jusqu'à ce qu'on le quitte en utilisant le bouton Annuler. Par défaut, chaque couleur sélectionnée est copiée dans le presse-papier en utilisant le bouton OK. Le &lt;em&gt;color picker&lt;/em&gt; est &lt;em&gt;attaché&lt;/em&gt; aux fenêtres du Terminal.&lt;/p&gt;


&lt;p&gt;Voilà, c'est tout &lt;img class=&quot;smile&quot; src=&quot;http://blogosx.homeunix.org/layout/shared/smileys/smile.png&quot; alt=&quot;:smile:&quot; title=&quot;:smile:&quot; /&gt;.&lt;/p&gt;

</description>
	<comments>http://blogosx.homeunix.org/21.09.08/billet-1222012044.html#co</comments>
	<guid>http://blogosx.homeunix.org/21.09.08/billet-1222012044.html</guid>
</item>

<item>
	<title>Fonction bash pour création de XPI</title>
	<link>http://blogosx.homeunix.org/11.08.08/billet-1218439462.html</link>
	<pubDate>Mon, 11 Aug 2008 09:24:22 +0200</pubDate>
	<dc:creator>Harry-Proton</dc:creator> 
	<description>&lt;p&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/Terminal.png&quot; alt=&quot;Terminal&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;&lt;/p&gt;


&lt;p&gt;Bon, zipper un dossier avec une interface graphique, c'est pas que ce soit la loose, quoique, mais encore faudra-t-il modifier l'extension de zip à &lt;acronym title=&quot;Cross Platform Installer&quot;&gt;xpi&lt;/acronym&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.08.08/billet-1218439462.html#note-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt;, une fois que ce sera fini&amp;#8230; imaginons que vous faites çà à chaque fois que vous modifiez l'extension sur laquelle vous êtes en train de travailler&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.08.08/billet-1218439462.html#note-2&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt;&amp;#8230; et vous allez vite devenir fou&amp;nbsp;!&lt;/p&gt;


&lt;p&gt;Aussi, c'est pourquoi, je me suis écrit une petit fonction&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.08.08/billet-1218439462.html#note-3&quot;&gt;3&lt;/a&gt;]&lt;/sup&gt; pour mettre dans mon &lt;code&gt;~/.bash_aliases&lt;/code&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.08.08/billet-1218439462.html#note-4&quot;&gt;4&lt;/a&gt;]&lt;/sup&gt;&amp;nbsp;:&lt;/p&gt;


&lt;pre class=&quot;bash&quot;&gt;&lt;span style=&quot;color: #b1b100;&quot;&gt;function&lt;/span&gt; xpif &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span style=&quot;color: #b1b100;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; ! -z &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${1}&quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;; &lt;span style=&quot;color: #b1b100;&quot;&gt;then&lt;/span&gt;
	&lt;span style=&quot;color: #0000ff;&quot;&gt;CPATH=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(pwd)&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #0000ff;&quot;&gt;ZNAME=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(basename &quot;&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;)&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #0000ff;&quot;&gt;UPATH=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(dirname &quot;&lt;/span&gt;$&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;)&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #0000ff;&quot;&gt;ZARGS=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'-rT'&lt;/span&gt;
&amp;nbsp;
	&lt;span style=&quot;color: #000066;&quot;&gt;cd&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$1&quot;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
	    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#91;&lt;/span&gt; -e &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;../${ZNAME}.xpi&quot;&lt;/span&gt; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#93;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
		find &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(pwd)&quot;&lt;/span&gt; \&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#40;&lt;/span&gt; -name &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;.DS_Store&quot;&lt;/span&gt; -or -name &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;.Trashes&quot;&lt;/span&gt; -or -name &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;._*&quot;&lt;/span&gt; \&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#41;&lt;/span&gt; -&lt;span style=&quot;color: #000066;&quot;&gt;exec&lt;/span&gt; &lt;span style=&quot;&quot;&gt;rm&lt;/span&gt; -rf &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;{}&quot;&lt;/span&gt; \; -prune 
&amp;nbsp;
		cp &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;../${ZNAME}.xpi&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$(pwd)&quot;&lt;/span&gt;
		&lt;span style=&quot;color: #0000ff;&quot;&gt;ZARGS=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;'-urT'&lt;/span&gt;
	    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
	    zip &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${ZARGS}&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${ZNAME}.xpi&quot;&lt;/span&gt; * &amp;amp;&amp;amp;
	    mv &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${ZNAME}.xpi&quot;&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;../&quot;&lt;/span&gt; || &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#123;&lt;/span&gt;
		&lt;span style=&quot;&quot;&gt;rm&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;${ZNAME}.xpi&quot;&lt;/span&gt;
		&lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;  ${ZNAME}.xpi: does not need any change&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
	    &lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;
	&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;color: #000066;&quot;&gt;cd&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$CPATH&quot;&lt;/span&gt; || &lt;span style=&quot;color: #000066;&quot;&gt;cd&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;$CPATH&quot;&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;0&lt;/span&gt;
     &lt;span style=&quot;color: #b1b100;&quot;&gt;else&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;printf&lt;/span&gt; &lt;span style=&quot;color: #ff0000;&quot;&gt;&quot;  xpif requires an argument&lt;span style=&quot;color: #000099; font-weight: bold;&quot;&gt;\n&lt;/span&gt;&quot;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&quot;color: #cc66cc;&quot;&gt;2&lt;/span&gt;
	&lt;span style=&quot;color: #000066;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #cc66cc;&quot;&gt;1&lt;/span&gt;
     &lt;span style=&quot;color: #b1b100;&quot;&gt;fi&lt;/span&gt;
&lt;span style=&quot;color: #66cc66;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;


&lt;p&gt;&lt;a href=&quot;http://blogosx.homeunix.org/medias/captures/xpif-terminal.png&quot; rel=&quot;lightbox&quot;&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/captures/xpif-terminal.png&quot; alt=&quot;Terminal de Mac OS X&quot; title=&quot;xpif&quot; /&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;la fonction reçoit simplement en argument le dossier à changer en xpi&amp;#8230; en utilisant, évidemment, la commande &lt;code&gt;zip&lt;/code&gt;.&lt;/p&gt;

</description>
	<comments>http://blogosx.homeunix.org/11.08.08/billet-1218439462.html#co</comments>
	<guid>http://blogosx.homeunix.org/11.08.08/billet-1218439462.html</guid>
</item>

<item>
	<title>Profiter de son Terminal à 100%</title>
	<link>http://blogosx.homeunix.org/11.08.08/billet-1218439362.html</link>
	<pubDate>Mon, 11 Aug 2008 09:22:42 +0200</pubDate>
	<dc:creator>Harry-Proton</dc:creator> 
	<description>&lt;p&gt;&lt;img src=&quot;http://blogosx.homeunix.org/medias/Terminal.png&quot; alt=&quot;Terminal&quot; style=&quot;float:right; margin: 0 0 1em 1em;&quot; /&gt;&lt;/p&gt;


&lt;p&gt;On va commencer par un peu de &quot;monitoring réseau&quot; avec &lt;a href=&quot;http://humdi.net/vnstat/&quot; hreflang=&quot;en&quot;&gt;vnStat - network traffic monitor for Linux&lt;/a&gt;, qui est aussi sympa qu'intéressant, voir &lt;a href=&quot;http://img80.imageshack.us/img80/8918/image1bb6.png&quot; rel=&quot;lightbox&quot;&gt;cette capture d'écran&lt;/a&gt; avec un affichage horaire.&lt;/p&gt;


&lt;p&gt;Des outils sympas (et libres) pour Mac OS X&amp;nbsp;: &lt;a href=&quot;http://www.sveinbjorn.org/osxutils_docs&quot; hreflang=&quot;en&quot;&gt;osxutils&lt;/a&gt;&amp;#8230; J'apprécie tout particulièrement &lt;code&gt;setsuffix&lt;/code&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.08.08/billet-1218439362.html#note-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt; et &lt;code&gt;geticon&lt;/code&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.08.08/billet-1218439362.html#note-2&quot;&gt;2&lt;/a&gt;]&lt;/sup&gt;. Et, pour rester dans les outils en ligne de commande plus ou moins spécifiques à Mac OS X, quelques &lt;a href=&quot;http://hayne.net/MacDev/Bash/&quot; hreflang=&quot;en&quot;&gt;Bash Scripts&lt;/a&gt; et des &lt;a href=&quot;http://hayne.net/MacDev/Bash/aliases.bash&quot; hreflang=&quot;en&quot;&gt;Bash aliases and functions&lt;/a&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.08.08/billet-1218439362.html#note-3&quot;&gt;3&lt;/a&gt;]&lt;/sup&gt;. Et pour continuer dans les machins spécifiques&amp;#8230; une utilisation assez géniale des onglets du Terminal&amp;nbsp;: &lt;a href=&quot;http://www.entropy.ch/blog/Mac+OS+X/2008/06/27/Terminal-Tricks-%E2%80%9Cterm%E2%80%9D-revisited-with-tabs.html&quot; hreflang=&quot;en&quot;&gt;Terminal Tricks: &amp;#8220;term&amp;#8221; revisited, with tabs&lt;/a&gt;, permettant de choisir d'exécuter une commande dans une nouvelle fenêtre ou dans un onglet &lt;code&gt;term -t&lt;/code&gt;.&lt;/p&gt;


&lt;p&gt;Générer de la documentation au format &lt;acronym title=&quot;Hypertext Markup Language&quot;&gt;HTML&lt;/acronym&gt; à partir de texte, avec une syntaxe similaire à une syntaxe wiki&amp;nbsp;? Avec &lt;a href=&quot;http://www.methods.co.nz/asciidoc/asciidoc.css-embedded.html&quot; hreflang=&quot;en&quot; title=&quot;AsciiDoc User Guide&quot;&gt;AsciiDoc&lt;/a&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.08.08/billet-1218439362.html#note-4&quot;&gt;4&lt;/a&gt;]&lt;/sup&gt;. Que l'on pourra, ensuite, convertir au format &lt;acronym title=&quot;Portable Document Format&quot;&gt;PDF&lt;/acronym&gt; avec &lt;a href=&quot;http://wkpdf.plesslweb.ch/&quot; hreflang=&quot;en&quot; title=&quot;command-line HTML to PDF converter for Mac OS X&quot;&gt;wkpdf&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Redonner des couleurs au Terminal&amp;nbsp;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.infinitered.com/entries/show/6&quot; hreflang=&quot;en&quot;&gt;A black OS X Leopard Terminal theme that is actually readable&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.infinitered.com/entries/show/4&quot; hreflang=&quot;en&quot;&gt;Fun and profit by modifying your Bash startup files in OS X, Linux and *NIX&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Un Terminal avec affichage tête haute&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.08.08/billet-1218439362.html#note-5&quot;&gt;5&lt;/a&gt;]&lt;/sup&gt;&amp;nbsp;? Avec &lt;a href=&quot;http://code.google.com/p/blacktree-visor/&quot; hreflang=&quot;en&quot;&gt;Visor (Quake-style terminal)&lt;/a&gt;&lt;sup&gt;[&lt;a href=&quot;http://blogosx.homeunix.org/11.08.08/billet-1218439362.html#note-6&quot;&gt;6&lt;/a&gt;]&lt;/sup&gt;.&lt;/p&gt;


&lt;p&gt;Et, pour finir, uploader vos images vers ImageShack&amp;nbsp;: simplement avec &lt;a href=&quot;http://bachnik.com/projects/shackshag/&quot; hreflang=&quot;en&quot;&gt;ShackShag&lt;/a&gt;, générer des &lt;em&gt;Lorem Ipsum&lt;/em&gt; avec &lt;a href=&quot;http://code.google.com/p/lorem/&quot; hreflang=&quot;en&quot;&gt;Lorem Ipsum Generator (lorem)&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Renommer vos fichiers dans un format plus &quot;user friendly&quot; avec &lt;a href=&quot;http://code.google.com/p/fixname/&quot; hreflang=&quot;en&quot;&gt;fixname&lt;/a&gt;.&lt;/p&gt;

</description>
	<comments>http://blogosx.homeunix.org/11.08.08/billet-1218439362.html#co</comments>
	<guid>http://blogosx.homeunix.org/11.08.08/billet-1218439362.html</guid>
</item>

	<atom:link href="http://blogosx.homeunix.org/rss.xml" rel="self" type="application/rss+xml" />
	</channel>
</rss>