sogoumap2pdf 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -18,3 +18,7 @@
18
18
  == 0.0.9 2008-08-19
19
19
  * 1 minor enhancement:
20
20
  * add command sogoumap2disk
21
+
22
+ == 0.0.10 2008-09-09
23
+ * 1 minor enhancement:
24
+ * add command sogoumap2pdf_from_disk
data/Manifest.txt CHANGED
@@ -4,8 +4,10 @@ Manifest.txt
4
4
  PostInstall.txt
5
5
  README.txt
6
6
  Rakefile
7
+ TODO
7
8
  bin/sogoumap2pdf
8
9
  bin/sogoumap2disk
10
+ bin/sogoumap2pdf_from_disk
9
11
  config/hoe.rb
10
12
  config/requirements.rb
11
13
  lib/sogoumap2pdf.rb
data/TODO ADDED
@@ -0,0 +1 @@
1
+ * fix the type errors when the pixels are to large
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # Created on 2008-8-19.
4
+ # Copyright (c) 2008. All rights reserved.
5
+
6
+ begin
7
+ require 'rubygems'
8
+ rescue LoadError
9
+ # no rubygems to load, so we fail silently
10
+ end
11
+
12
+ require 'optparse'
13
+ require 'sogoumap2pdf'
14
+ include Sogoumap2pdf
15
+ # NOTE: the option -p/--path= is given as an example, and should probably be replaced in your application.
16
+
17
+ OPTIONS = {
18
+ :path => '~'
19
+ }
20
+ MANDATORY_OPTIONS = %w( )
21
+
22
+ parser = OptionParser.new do |opts|
23
+ opts.banner = <<BANNER
24
+ This application is wonderful because...
25
+
26
+ Usage: #{File.basename($0)} [options]
27
+
28
+ Options are:
29
+ BANNER
30
+ opts.separator ""
31
+ opts.on("-p", "--path=PATH", String,
32
+ "The root path for selecting files",
33
+ "Default: ~") { |OPTIONS[:path]| }
34
+ opts.on("-h", "--help",
35
+ "Show this help message.") { puts opts; exit }
36
+ opts.parse!(ARGV)
37
+
38
+ if MANDATORY_OPTIONS && MANDATORY_OPTIONS.find { |option| OPTIONS[option.to_sym].nil? }
39
+ puts opts; exit
40
+ end
41
+ end
42
+
43
+ path = OPTIONS[:path]
44
+
45
+ # do stuff
46
+ #
47
+ # guangzhou: ruby map2pdf.rb http://hbpic3.go2map.com/seamless/0/180/792/504/105/100899_21033.JPG 0 0 30 30 guangzhou.pdf sp
48
+ # guangzhou: ruby map2pdf.rb http://hbpic3.go2map.com/seamless/0/180/792/504/105/100899_21033.JPG 0x0 30x30 guangzhou.pdf sp
49
+ link=ARGV[0]
50
+ option=ARGV[4]
51
+ x,y=ARGV[1].split("x")
52
+ r,c=ARGV[2].split("x")
53
+ g=SogouMapImage.new(link, option)
54
+ gmpdf=ImageToPdf.new(".JPG",x,y)
55
+ xres, yres = gmpdf.perfect_fit(x.to_i,y.to_i,r.to_i,c.to_i)
56
+ # g.fill_map(xres,yres)
57
+ gmpdf.front_page(g)
58
+ gmpdf.create_pages(g)
59
+ gmpdf.save(ARGV[3])
@@ -2,7 +2,7 @@ module Sogoumap2pdf
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 9
5
+ TINY = 10
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/website/index.html CHANGED
@@ -59,7 +59,6 @@ sogoumap2pdf link x_pixels x y_pixels row x column save_file.pdf &lt;s|sp|m&gt;
59
59
  <li><a href="http://rubyforge.org/frs/download.php/41583/guangzhou.pdf">Example map</a></li>
60
60
  </ul>
61
61
  <p>The trunk repository is <code>git://rubyforge.org/sogoumap2pdf.git</code> for anonymous access.</p>
62
- <p><span class="caps">OOOORRRR</span></p>
63
62
  <p>You can fetch the source from:</p>
64
63
  <ul>
65
64
  <li>rubyforge: <a href="http://rubyforge.org/scm/?group_id=6825">http://rubyforge.org/scm/?group_id=6825</a></li>
@@ -76,7 +75,7 @@ rake install_gem</pre>
76
75
  <h2>Screencast</h2>
77
76
  <object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/SxEZ1lhUDH4"> </param> <embed src="http://www.youtube.com/v/SxEZ1lhUDH4" type="application/x-shockwave-flash" width="425" height="350"> </embed> </object>
78
77
  <p class="coda">
79
- <a href="mailto:ruanwz@gmail.com">David Ruan</a>, 22nd August 2008<br>
78
+ <a href="mailto:ruanwz@gmail.com">David Ruan</a>, 2nd September 2008<br>
80
79
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
81
80
  </p>
82
81
  </div>
data/website/index.txt CHANGED
@@ -24,8 +24,6 @@ h2. Demonstration of usage
24
24
 
25
25
  The trunk repository is <code>git://rubyforge.org/sogoumap2pdf.git</code> for anonymous access.
26
26
 
27
- OOOORRRR
28
-
29
27
  You can fetch the source from:
30
28
 
31
29
  <% rubyforge_project_id="6825" %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sogoumap2pdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Ruan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-02 00:00:00 +08:00
12
+ date: 2008-09-09 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -48,6 +48,7 @@ email:
48
48
  executables:
49
49
  - sogoumap2pdf
50
50
  - sogoumap2disk
51
+ - sogoumap2pdf_from_disk
51
52
  extensions: []
52
53
 
53
54
  extra_rdoc_files:
@@ -64,8 +65,10 @@ files:
64
65
  - PostInstall.txt
65
66
  - README.txt
66
67
  - Rakefile
68
+ - TODO
67
69
  - bin/sogoumap2pdf
68
70
  - bin/sogoumap2disk
71
+ - bin/sogoumap2pdf_from_disk
69
72
  - config/hoe.rb
70
73
  - config/requirements.rb
71
74
  - lib/sogoumap2pdf.rb