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

<channel>
	<title>Movoin Studio &#187; Ubuntu</title>
	<atom:link href="http://www.movoin.com/tag/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.movoin.com</link>
	<description>专注Web开发, Python和Php技术 &#38;&#38; 关注开源及移动应用</description>
	<lastBuildDate>Wed, 14 Dec 2011 04:02:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>在Ubuntu中使用YUICompressor</title>
		<link>http://www.movoin.com/using-yuicompressor-in-ubuntu.html</link>
		<comments>http://www.movoin.com/using-yuicompressor-in-ubuntu.html#comments</comments>
		<pubDate>Wed, 25 Aug 2010 02:47:02 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[操作系统]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://movoin.com/?p=24</guid>
		<description><![CDATA[YUICompressor，是由Yahoo!提供的压缩（Minify）Javascript，CSS的工具。 YUICompressor是用Java写的，所以使用它之前必须先安装Jre: sudo apt-get install sun-java6-jre 然后，下载YUICompressor-2.4.2.zip，并解压至任意位置。 参数说明 Usage: java -jar yuicompressor-x.y.z.jar [options] [input file] Global Options -h, &#8211;help Displays this information &#8211;type Specifies the type of the input file &#8211;charset Read the input file using &#8211;line-break Insert a line break after the specified column number -v, &#8211;verbose Display informational messages and warnings -o Place [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="nofollow" href="http://developer.yahoo.com/yui/compressor/" rel="nofollow">YUICompressor</a>，是由Yahoo!提供的压缩（Minify）Javascript，CSS的工具。</p>
<p>YUICompressor是用Java写的，所以使用它之前必须先安装Jre:</p>
<blockquote><p>sudo apt-get install sun-java6-jre</p></blockquote>
<p>然后，下载YUICompressor-2.4.2.zip，并解压至任意位置。</p>
<p><strong>参数说明</strong></p>
<blockquote><p>Usage: java -jar yuicompressor-x.y.z.jar [options] [input file]</p>
<p>Global Options<br />
  -h, &#8211;help                Displays this information<br />
  &#8211;type <js |css>           Specifies the type of the input file<br />
  &#8211;charset <charset>       Read the input file using </charset><charset><br />
  &#8211;line-break<br />
<column>     Insert a line break after the specified column number<br />
  -v, &#8211;verbose             Display informational messages and warnings<br />
  -o <file>                 Place the output into </file><file>. Defaults to stdout.</p>
<p>JavaScript Options<br />
  &#8211;nomunge                 Minify only, do not obfuscate<br />
  &#8211;preserve-semi           Preserve all semicolons<br />
  &#8211;disable-optimizations   Disable all micro optimizations </file></column></charset></js></p></blockquote>
<p><strong>提示：</strong><br />
其实不用输入&#8211;type js 或 &#8211;type css, YUICompressor也会根据文件后缀名来自动判断。</p>
<p><strong>以下是我写的一段脚本：</strong></p>
<pre name="code" class="sh_python" linenum="off">
#!/usr/bin/python

import os
import sys

compressor_path = '/home/allen/.tools/yuicompressor.jar'
charset_code = 'utf-8'

def compressor(file):
    os.path.splitext(file)
    return '-min'.join([os.path.splitext(file)[0], os.path.splitext(file)[1]])

files = sys.argv[1:]

for file in files:
    os.system('java -jar %s %s -o %s --charset %s --preserve-semi' % (compressor_path, file, compressor(file), charset_code))
</pre>
<p>把脚本以任意名字保存，如“压缩JS文件”，并将文件放到你的用户目录下的.gnome2/nautilus-scripts/目录中，如：/home/allen/.gnome2/nautilus-scripts/</p>
<p>这样你就可以更加方便的使用YUICompressor了~</p>
<script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_python.js"></script><h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2010/08/19 -- <a href="http://www.movoin.com/ubuntu-11-04-animal-code.html" title="Ubuntu 11.04 动物代号">Ubuntu 11.04 动物代号</a></li><li>2010/09/11 -- <a href="http://www.movoin.com/sparkleshare-an-open-source-alternative-to-dropbox-hits-beta-for-linux.html" title="SparkleShare-Dropbox的开源替代品">SparkleShare-Dropbox的开源替代品</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/using-yuicompressor-in-ubuntu.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.04 动物代号</title>
		<link>http://www.movoin.com/ubuntu-11-04-animal-code.html</link>
		<comments>http://www.movoin.com/ubuntu-11-04-animal-code.html#comments</comments>
		<pubDate>Thu, 19 Aug 2010 08:00:09 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[操作系统]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://movoin.com/?p=17</guid>
		<description><![CDATA[Ubuntu 11.04的动物代号将是：Natty Narwhal（聪慧的独角鲸）。 维基百科对Natty的解释是(informal) Smart and fashionable，也就是兼具头脑和外表。 独角鲸是生活在北极冰冷海域的小型鲸鱼，因为头部前段3米左右的螺旋形犄角状物而得名，长久以来被认为是传说中的独角兽的化身。然而传说终归是传说，独角鲸的“犄角”并非是角，只是一颗外露的长牙，披有神话色彩外衣的东西往往在现实中是不复存在的。独角鲸的“独角”没有纯洁净化的魔力，也无法使它们永生不死。但不可否认的是，它们成为了这世上绝无仅有，这般独特而美丽的生物。（摘自互动百科） 来源: http://article.yeeyan.org/view/140496/127197 既然来了，也许你也会想看一下：2010/08/25 -- 在Ubuntu中使用YUICompressor2010/09/11 -- SparkleShare-Dropbox的开源替代品]]></description>
			<content:encoded><![CDATA[<p>Ubuntu 11.04的动物代号将是：Natty Narwhal（聪慧的独角鲸）。</p>
<p><img src="http://lh5.ggpht.com/_1QSDkzYY2vc/TGrjTrJsDZI/AAAAAAAABtI/7Q48Tb3vO24/s400/narwhal2.jpg" alt="narwhal2 Ubuntu 11.04 动物代号"  title="Ubuntu 11.04 动物代号" /></p>
<p>维基百科对Natty的解释是(informal) Smart and fashionable，也就是兼具头脑和外表。</p>
<p>独角鲸是生活在北极冰冷海域的小型鲸鱼，因为头部前段3米左右的螺旋形犄角状物而得名，长久以来被认为是传说中的独角兽的化身。然而传说终归是传说，独角鲸的“犄角”并非是角，只是一颗外露的长牙，披有神话色彩外衣的东西往往在现实中是不复存在的。独角鲸的“独角”没有纯洁净化的魔力，也无法使它们永生不死。但不可否认的是，它们成为了这世上绝无仅有，这般独特而美丽的生物。（摘自互动百科）</p>
<p>来源: http://article.yeeyan.org/view/140496/127197</p>
<h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2010/08/25 -- <a href="http://www.movoin.com/using-yuicompressor-in-ubuntu.html" title="在Ubuntu中使用YUICompressor">在Ubuntu中使用YUICompressor</a></li><li>2010/09/11 -- <a href="http://www.movoin.com/sparkleshare-an-open-source-alternative-to-dropbox-hits-beta-for-linux.html" title="SparkleShare-Dropbox的开源替代品">SparkleShare-Dropbox的开源替代品</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/ubuntu-11-04-animal-code.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

