<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>moebius/output/Y-The_Last_Man-001-Excerpt.pdf</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -6,14 +6,14 @@
 &gt;&gt;
 endobj
 2 0 obj
-&lt;&lt; /Type /Pages
-/Count 1
+&lt;&lt; /Count 1
+/Type /Pages
 /Kids [5 0 R]
 &gt;&gt;
 endobj
 3 0 obj
-&lt;&lt; /Type /Catalog
-/Pages 2 0 R
+&lt;&lt; /Pages 2 0 R
+/Type /Catalog
 &gt;&gt;
 endobj
 4 0 obj
@@ -630,24 +630,24 @@ Q
 endstream
 endobj
 5 0 obj
-&lt;&lt; /Type /Page
+&lt;&lt; /ProcSet 6 0 R
 /Parent 2 0 R
 /MediaBox [0 0 612.0 792.0]
-/Contents 4 0 R
-/ProcSet 6 0 R
 /Resources &lt;&lt; /Font &lt;&lt; /F1 7 0 R
 &gt;&gt;
 &gt;&gt;
+/Type /Page
+/Contents 4 0 R
 &gt;&gt;
 endobj
 6 0 obj
 [/PDF /Text]
 endobj
 7 0 obj
-&lt;&lt; /Type /Font
-/Subtype /Type1
+&lt;&lt; /Encoding /MacRomanEncoding
+/Type /Font
 /BaseFont /Times-Roman
-/Encoding /MacRomanEncoding
+/Subtype /Type1
 &gt;&gt;
 endobj
 xref
@@ -661,9 +661,9 @@ xref
 0000009242 00000 n 
 0000009270 00000 n 
 trailer
-&lt;&lt; /Size 8
+&lt;&lt; /Info 1 0 R
+/Size 8
 /Root 3 0 R
-/Info 1 0 R
 &gt;&gt;
 startxref
 9370</diff>
      <filename>invoice-gtb/output/invoice.pdf</filename>
    </modified>
    <modified>
      <diff>@@ -11,10 +11,10 @@ h2. Usage
 &lt;/code&gt;
 &lt;/pre&gt;
 
-It'll output a Y-The_Last_Man-001-Excerpt.pdf_ file in your current directory.
+It'll output a Y-The_Last_Man-001-Excerpt.pdf_ file in the output/ directory
 
 h2. Requirements
 
 * Ruby 1.8
-* Unzip
-* Unrar
\ No newline at end of file
+* Unzip (for .cbz)
+* Unrar (for .cbr)
\ No newline at end of file</diff>
      <filename>moebius/README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,15 @@
-#!/usr/bin/ruby
+#!/usr/bin/env ruby
+
+# Moebius: Simple comic book converter script.
+#
+# Things Prawn can do to make this script nicer:
+#   * Allow :margins =&gt; [0,0,0,0] or :margins =&gt; :none (or something like that)  
+
+
 require &quot;rubygems&quot;    
 require &quot;prawn&quot;
 require 'fileutils'
+require 'tempfile'
 
 # Check filename exists
 if ARGV[0].nil?
@@ -10,24 +18,25 @@ if ARGV[0].nil?
 end
 
 basename = File.basename(ARGV[0], File.extname(ARGV[0]))
-target = &quot;/tmp/#{basename}/&quot;
-
-# Extract comic images
-FileUtils.mkdir_p target unless File.exists? target
-`unzip -j #{ARGV[0]} -d #{target}` if File.extname(ARGV[0]) == &quot;cbz&quot;
-`unrar e #{ARGV[0]} #{target}` if File.extname(ARGV[0]) == &quot;cbr&quot;
-comicFiles = Dir.new(target).entries.sort.delete_if { |x| ! (x =~ /jpg$/) }
+target = &quot;/#{Dir::tmpdir}/#{basename}/&quot;
+                     
+# Extract comic images      
+FileUtils.mkdir_p target unless File.exists? target      
+`unzip -j #{ARGV[0]} -d #{target}` if File.extname(ARGV[0]) =~ /cbz/i
+`unrar e #{ARGV[0]} #{target}` if File.extname(ARGV[0]) =~ /cbr/i
+comicFiles = Dir[&quot;#{target}*.jpg&quot;]      
 
-# Generate PDF file
-Prawn::Document.generate(&quot;#{basename}.pdf&quot;,
-                        :top_margin =&gt; 0, 
-                        :right_margin =&gt; 0, 
-                        :bottom_margin =&gt; 0, 
-                        :left_margin =&gt; 0,
-                        :skip_page_creation =&gt; true) do
+settings =  { :skip_page_creation =&gt; true,
+                   :bottom_margin =&gt; 0,        
+                      :top_margin =&gt; 0, 
+                    :right_margin =&gt; 0, 
+                     :left_margin =&gt; 0       }
+ 
+# Generate PDF file            
+Prawn::Document.generate(&quot;output/#{basename}.pdf&quot;, settings) do
   comicFiles.each do |file|
     start_new_page
-    image &quot;#{target}#{file}&quot;, :at =&gt; [0,802], :height =&gt; 842
+    image file, :at =&gt; [0,802], :height =&gt; 842
   end
 end
 </diff>
      <filename>moebius/moebius.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6677c954c50cc550ab86254cfdb8d1c39c6d46c4</id>
    </parent>
  </parents>
  <author>
    <name>Gregory</name>
    <email>gregory.t.brown@gmail.com</email>
  </author>
  <url>http://github.com/sandal/prawn-gallery/commit/e9b082c8b5c60e28009485d939ec073edb50f1cb</url>
  <id>e9b082c8b5c60e28009485d939ec073edb50f1cb</id>
  <committed-date>2008-08-13T10:47:20-07:00</committed-date>
  <authored-date>2008-08-13T10:47:20-07:00</authored-date>
  <message>Tweaks to make things a little more general</message>
  <tree>f6296152bd37bd41fe617ee5f6fb1240a0146d8a</tree>
  <committer>
    <name>Gregory</name>
    <email>gregory.t.brown@gmail.com</email>
  </committer>
</commit>
