<?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>Blog.Project13.pl &#187; cool</title>
	<atom:link href="http://www.blog.project13.pl/index.php/tag/cool/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.project13.pl</link>
	<description>The Blog of a Coder</description>
	<lastBuildDate>Sun, 05 Feb 2012 02:28:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>(Almost) Automatically convert files into PDF</title>
		<link>http://www.blog.project13.pl/index.php/fun/285/almost-automatically-convert-files-into-pdf/</link>
		<comments>http://www.blog.project13.pl/index.php/fun/285/almost-automatically-convert-files-into-pdf/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 00:56:55 +0000</pubDate>
		<dc:creator>Ktoso</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[freedom]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[terminal heroes]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[gnu/linux]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://www.blog.project13.pl/?p=285</guid>
		<description><![CDATA[I&#8217;m learning Numerical Analysis right now and a friend of mine found some really nice PS files by dr Marian Bubek ( http://www.icsr.agh.edu.pl/~mownit/mownit.html ). I was really happy to see some *.ps but some people from my fellow students started complaining that they&#8217;d rather have pdf&#8217;s and not ghostscript files (who knows why they&#8217;d do..?). [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m learning Numerical Analysis right now and a friend of mine found some really nice PS files by dr Marian Bubek ( <a href="http://www.icsr.agh.edu.pl/~mownit/mownit.html" onclick="urchinTracker('/outgoing/www.icsr.agh.edu.pl/_mownit/mownit.html?referer=');">http://www.icsr.agh.edu.pl/~mownit/mownit.html</a> ). I was really happy to see some *.ps but some people from my fellow students started complaining that they&#8217;d rather have pdf&#8217;s and not ghostscript files <em>(who knows why they&#8217;d do..?)</em>. Anyways, they all had &#8220;manual&#8221; repetitious methods for converting the files &#8211; even uploading to somewebsite to have them converted over there &#8220;in the cloud&#8221;&#8230; I though of a slightly quicker and more efficient way, here it is, hope you&#8217;ll like it. Ah, there is One &#8220;non standard&#8221; requirement for this to work, you have to install <strong>cups-pdf</strong> :-)</p>
<div class="geshi no bash">
<div class="head">wget http://www.icsr.agh.edu.pl/~mownit/mownit.html -r &#8211;level 1 -A.ps &#8211;cut-dirs 4</div>
<ol>
<li class="li1">
<div class="de1"><span class="kw2">mv</span> www.icsr.agh.edu.pl<span class="sy0">/*</span> .</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">rm</span> -rf www.icsr.agh.edu.pl<span class="sy0">/</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">for</span> <span class="kw2">file</span> <span class="kw1">in</span> `<span class="kw2">dir</span> -f <span class="sy0">*</span>` ; <span class="kw1">do</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw2">lpr</span> -P <span class="st0">&#39;cups-PDF&#39;</span> <span class="re1">$file</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw3">echo</span> <span class="st0">&quot;press enter when cups is done printing&#8230;&quot;</span> <span class="co0">#yeah, i got lazy here, one could watch lpq for changes etc.</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw2">read</span> oczekiwanie;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;<span class="kw2">mv</span> <span class="sy0">/</span>home<span class="sy0">/</span>ktoso<span class="sy0">/</span>Pulpit<span class="sy0">/</span>cups-pdf<span class="sy0">/</span>template.pdf .<span class="sy0">/</span><span class="re1">$file</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw1">done</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># ________________ </span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0">#&lt; Happy hacking! &gt;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &#8212;&#8212;&#8212;&#8212;&#8212;- </span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp; &nbsp; &nbsp;\ &nbsp; ^__^</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp; &nbsp; &nbsp; \ &nbsp;(oo)\_______</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(__)\ &nbsp; &nbsp; &nbsp; )\/\</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;||&#8212;-w |</span></div>
</li>
<li class="li1">
<div class="de1"><span class="co0"># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|| &nbsp; &nbsp; ||</span></div>
</li>
</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.project13.pl/index.php/fun/285/almost-automatically-convert-files-into-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

