rdtool 0.6.34 → 0.6.35

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY CHANGED
@@ -70,6 +70,9 @@ RDtool include files which is copyrighted by somebody elses.
70
70
  Please read these files for those lisence info.
71
71
 
72
72
  = CHANGES
73
+ :0.6.35
74
+ * Fix rd2man-lib for Ruby1.9.1. Thanks to Salvatore Bonaccorso.
75
+ See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=676154
73
76
  :0.6.34
74
77
  * Add LGPL-2.1 for setup.rb
75
78
  * Add rd2html-ext-lib from rubikitch. Thanks!!
@@ -4,10 +4,10 @@
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
5
  <html xmlns="http://www.w3.org/1999/xhtml">
6
6
  <head>
7
- <title>README.rd</title>
7
+ <title>Untitled</title>
8
8
  </head>
9
9
  <body>
10
- <h1><a name="label-0" id="label-0">RDtool 0.6.34</a></h1><!-- RDLabel: "RDtool 0.6.34" -->
10
+ <h1><a name="label-0" id="label-0">RDtool 0.6.35</a></h1><!-- RDLabel: "RDtool 0.6.35" -->
11
11
  <h2><a name="label-1" id="label-1">What is RDtool</a></h2><!-- RDLabel: "What is RDtool" -->
12
12
  <p>RD is Ruby's POD. RDtool is formatter for RD.</p>
13
13
  <h2><a name="label-2" id="label-2">What is Changed</a></h2><!-- RDLabel: "What is Changed" -->
@@ -41,51 +41,26 @@ files that are copyrighted by somebody else, and these files can be
41
41
  re-distributed under those own license.</p>
42
42
  <p>These files include the condition of those licenses in themselves. The
43
43
  license information for every files is as follows.</p>
44
- <dl>
45
- <dt><a name="label-8" id="label-8">Files: */</a></dt><!-- RDLabel: "Files: */" -->
46
- <dd>
47
- <ul>
48
- <li><p>Copyright: 2004 MoonWolf &lt;moonwolf@moonwolf.com&gt;</p>
49
- <pre>2011 Youhei SASAKI &lt;uwabami@gfd-dennou.org&gt;</pre></li>
50
- <li>License: Ruby's License or GPL-2+</li>
51
- </ul>
52
- </dd>
53
- <dt><a name="label-9" id="label-9">Files: lib/rd/rd2man-lib.rb</a></dt><!-- RDLabel: "Files: lib/rd/rd2man-lib.rb" -->
54
- <dd>
55
- <ul>
56
- <li>Copyright: 2000 WATANABE Hirofumi</li>
57
- <li>License: Ruby's License or GPL-2+</li>
58
- </ul>
59
- </dd>
60
- <dt><a name="label-10" id="label-10">Files: lib/rd/{head-filter,rd2html-ext-lib,rd2html-ext-opt}.rb</a></dt><!-- RDLabel: "Files: lib/rd/{head-filter,rd2html-ext-lib,rd2html-ext-opt}.rb" -->
61
- <dd>
62
- <ul>
63
- <li>Copyright: 2003 Rubikitch</li>
64
- <li>License: Ruby's License or GPL-2+</li>
65
- </ul>
66
- </dd>
67
- <dt><a name="label-11" id="label-11">Files: bin/rdswap</a></dt><!-- RDLabel: "Files: bin/rdswap" -->
68
- <dd>
69
- <ul>
70
- <li>Copyright: 1999 C.Hintze</li>
71
- <li>License: Ruby's License or GPL-2+</li>
72
- </ul>
73
- </dd>
74
- <dt><a name="label-12" id="label-12">Files: setup.rb</a></dt><!-- RDLabel: "Files: setup.rb" -->
75
- <dd>
76
- <ul>
77
- <li>Copyright: 2000-2006 Minero Aoki</li>
78
- <li>License: LGPL-2.1</li>
79
- </ul>
80
- </dd>
81
- <dt><a name="label-13" id="label-13">Files: utils/rd-mode.el</a></dt><!-- RDLabel: "Files: utils/rd-mode.el" -->
82
- <dd>
83
- <ul>
84
- <li>Copyright: 1999 Koji Arai, Toshiro Kuwabara.</li>
85
- <li>License: GPL-2+</li>
86
- </ul>
87
- </dd>
88
- </dl>
44
+ <pre>Files: */
45
+ * Copyright: 2004 MoonWolf &lt;moonwolf@moonwolf.com&gt;
46
+ 2011-2012 Youhei SASAKI &lt;uwabami@gfd-dennou.org&gt;
47
+ * License: Ruby's License or GPL-2+
48
+ Files: lib/rd/rd2man-lib.rb
49
+ * Copyright: 2000 WATANABE Hirofumi
50
+ 2012 Youhei SASAKI &lt;uwabami@gfd-dennou.org&gt;
51
+ * License: Ruby's License or GPL-2+
52
+ Files: lib/rd/{head-filter,rd2html-ext-lib,rd2html-ext-opt}.rb
53
+ * Copyright: 2003 Rubikitch
54
+ * License: Ruby's License or GPL-2+
55
+ Files: bin/rdswap
56
+ * Copyright: 1999 C.Hintze
57
+ * License: Ruby's License or GPL-2+
58
+ Files: setup.rb
59
+ * Copyright: 2000-2006 Minero Aoki
60
+ * License: LGPL-2.1
61
+ Files: utils/rd-mode.el
62
+ * Copyright: 1999 Koji Arai, Toshiro Kuwabara.
63
+ * License: GPL-2+</pre>
89
64
 
90
65
  </body>
91
66
  </html>
@@ -4,10 +4,10 @@
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
5
  <html xmlns="http://www.w3.org/1999/xhtml">
6
6
  <head>
7
- <title>README.rd.ja</title>
7
+ <title>Untitled</title>
8
8
  </head>
9
9
  <body>
10
- <h1><a name="label-0" id="label-0">RDtool 0.6.34</a></h1><!-- RDLabel: "RDtool 0.6.34" -->
10
+ <h1><a name="label-0" id="label-0">RDtool 0.6.35</a></h1><!-- RDLabel: "RDtool 0.6.35" -->
11
11
  <h2><a name="label-1" id="label-1">RDってなに?</a></h2><!-- RDLabel: "RDってなに?" -->
12
12
  <p>RDはRubyにおけるPOD(Plain Old Documentation)のようなものです。
13
13
  RDtoolはRDのフォーマッタであり、RDをHTMLなどに変換できます。</p>
@@ -48,43 +48,26 @@ RDtoolのパッケージにはTosh以外の人が著作権を持つファイル
48
48
  それらのファイルについての配布条件はファイル自体に書かれたライセンスの下で
49
49
  行ってください。</p>
50
50
  <p>ファイル毎のライセンス表記は以下の通りです。</p>
51
- <dl>
52
- <dt><a name="label-8" id="label-8">Files: */</a></dt><!-- RDLabel: "Files: */" -->
53
- <dd>
54
- <ul>
55
- <li>Copyright: 2004 MoonWolf</li>
56
- <li>License: Ruby's License or GPL-2+</li>
57
- </ul>
58
- </dd>
59
- <dt><a name="label-9" id="label-9">Files: bin/rdswap</a></dt><!-- RDLabel: "Files: bin/rdswap" -->
60
- <dd>
61
- <ul>
62
- <li>Copyright: 1999 C.Hintze</li>
63
- <li>License: Ruby's License or GPL-2+</li>
64
- </ul>
65
- </dd>
66
- <dt><a name="label-10" id="label-10">Files: lib/rd/rd2man-lib.rb</a></dt><!-- RDLabel: "Files: lib/rd/rd2man-lib.rb" -->
67
- <dd>
68
- <ul>
69
- <li>Copyright: 2000 WATANABE Hirofumi</li>
70
- <li>License: Ruby's License or GPL-2+</li>
71
- </ul>
72
- </dd>
73
- <dt><a name="label-11" id="label-11">Files: setup.rb</a></dt><!-- RDLabel: "Files: setup.rb" -->
74
- <dd>
75
- <ul>
76
- <li>Copyright: 2000-2006 Minero Aoki</li>
77
- <li>License: LGPL-2.1</li>
78
- </ul>
79
- </dd>
80
- <dt><a name="label-12" id="label-12">Files: utils/rd-mode.el</a></dt><!-- RDLabel: "Files: utils/rd-mode.el" -->
81
- <dd>
82
- <ul>
83
- <li>Copyright: 1999 Koji Arai, Toshiro Kuwabara.</li>
84
- <li>License: GPL-2+</li>
85
- </ul>
86
- </dd>
87
- </dl>
51
+ <pre>Files: */
52
+ * Copyright: 2004 MoonWolf &lt;moonwolf@moonwolf.com&gt;
53
+ 2011-2012 Youhei SASAKI &lt;uwabami@gfd-dennou.org&gt;
54
+ * License: Ruby's License or GPL-2+
55
+ Files: lib/rd/rd2man-lib.rb
56
+ * Copyright: 2000 WATANABE Hirofumi
57
+ 2012 Youhei SASAKI &lt;uwabami@gfd-dennou.org&gt;
58
+ * License: Ruby's License or GPL-2+
59
+ Files: lib/rd/{head-filter,rd2html-ext-lib,rd2html-ext-opt}.rb
60
+ * Copyright: 2003 Rubikitch
61
+ * License: Ruby's License or GPL-2+
62
+ Files: bin/rdswap
63
+ * Copyright: 1999 C.Hintze
64
+ * License: Ruby's License or GPL-2+
65
+ Files: setup.rb
66
+ * Copyright: 2000-2006 Minero Aoki
67
+ * License: LGPL-2.1
68
+ Files: utils/rd-mode.el
69
+ * Copyright: 1999 Koji Arai, Toshiro Kuwabara.
70
+ * License: GPL-2+</pre>
88
71
 
89
72
  </body>
90
73
  </html>
data/README.rd CHANGED
@@ -1,6 +1,6 @@
1
1
  # -*- mode: rd; coding: utf-8; indent-tabs-mode: nil -*-
2
2
  =begin
3
- = RDtool 0.6.34
3
+ = RDtool 0.6.35
4
4
  == What is RDtool
5
5
 
6
6
  RD is Ruby's POD. RDtool is formatter for RD.
@@ -52,24 +52,25 @@ re-distributed under those own license.
52
52
  These files include the condition of those licenses in themselves. The
53
53
  license information for every files is as follows.
54
54
 
55
- :Files: */
56
- * Copyright: 2004 MoonWolf <moonwolf@moonwolf.com>
57
- 2011 Youhei SASAKI <uwabami@gfd-dennou.org>
58
- * License: Ruby's License or GPL-2+
59
- :Files: lib/rd/rd2man-lib.rb
60
- * Copyright: 2000 WATANABE Hirofumi
61
- * License: Ruby's License or GPL-2+
62
- :Files: lib/rd/{head-filter,rd2html-ext-lib,rd2html-ext-opt}.rb
63
- * Copyright: 2003 Rubikitch
64
- * License: Ruby's License or GPL-2+
65
- :Files: bin/rdswap
66
- * Copyright: 1999 C.Hintze
67
- * License: Ruby's License or GPL-2+
68
- :Files: setup.rb
69
- * Copyright: 2000-2006 Minero Aoki
70
- * License: LGPL-2.1
71
- :Files: utils/rd-mode.el
72
- * Copyright: 1999 Koji Arai, Toshiro Kuwabara.
73
- * License: GPL-2+
55
+ Files: */
56
+ * Copyright: 2004 MoonWolf <moonwolf@moonwolf.com>
57
+ 2011-2012 Youhei SASAKI <uwabami@gfd-dennou.org>
58
+ * License: Ruby's License or GPL-2+
59
+ Files: lib/rd/rd2man-lib.rb
60
+ * Copyright: 2000 WATANABE Hirofumi
61
+ 2012 Youhei SASAKI <uwabami@gfd-dennou.org>
62
+ * License: Ruby's License or GPL-2+
63
+ Files: lib/rd/{head-filter,rd2html-ext-lib,rd2html-ext-opt}.rb
64
+ * Copyright: 2003 Rubikitch
65
+ * License: Ruby's License or GPL-2+
66
+ Files: bin/rdswap
67
+ * Copyright: 1999 C.Hintze
68
+ * License: Ruby's License or GPL-2+
69
+ Files: setup.rb
70
+ * Copyright: 2000-2006 Minero Aoki
71
+ * License: LGPL-2.1
72
+ Files: utils/rd-mode.el
73
+ * Copyright: 1999 Koji Arai, Toshiro Kuwabara.
74
+ * License: GPL-2+
74
75
 
75
76
  =end
@@ -1,6 +1,6 @@
1
1
  # -*- mode: rd; coding: utf-8; indent-tabs-mode: nil -*-
2
2
  =begin
3
- = RDtool 0.6.34
3
+ = RDtool 0.6.35
4
4
  == RDってなに?
5
5
 
6
6
  RDはRubyにおけるPOD(Plain Old Documentation)のようなものです。
@@ -61,20 +61,25 @@ RDtoolのパッケージにはTosh以外の人が著作権を持つファイル
61
61
 
62
62
  ファイル毎のライセンス表記は以下の通りです。
63
63
 
64
- :Files: */
65
- * Copyright: 2004 MoonWolf
66
- * License: Ruby's License or GPL-2+
67
- :Files: bin/rdswap
68
- * Copyright: 1999 C.Hintze
69
- * License: Ruby's License or GPL-2+
70
- :Files: lib/rd/rd2man-lib.rb
71
- * Copyright: 2000 WATANABE Hirofumi
72
- * License: Ruby's License or GPL-2+
73
- :Files: setup.rb
74
- * Copyright: 2000-2006 Minero Aoki
75
- * License: LGPL-2.1
76
- :Files: utils/rd-mode.el
77
- * Copyright: 1999 Koji Arai, Toshiro Kuwabara.
78
- * License: GPL-2+
64
+ Files: */
65
+ * Copyright: 2004 MoonWolf <moonwolf@moonwolf.com>
66
+ 2011-2012 Youhei SASAKI <uwabami@gfd-dennou.org>
67
+ * License: Ruby's License or GPL-2+
68
+ Files: lib/rd/rd2man-lib.rb
69
+ * Copyright: 2000 WATANABE Hirofumi
70
+ 2012 Youhei SASAKI <uwabami@gfd-dennou.org>
71
+ * License: Ruby's License or GPL-2+
72
+ Files: lib/rd/{head-filter,rd2html-ext-lib,rd2html-ext-opt}.rb
73
+ * Copyright: 2003 Rubikitch
74
+ * License: Ruby's License or GPL-2+
75
+ Files: bin/rdswap
76
+ * Copyright: 1999 C.Hintze
77
+ * License: Ruby's License or GPL-2+
78
+ Files: setup.rb
79
+ * Copyright: 2000-2006 Minero Aoki
80
+ * License: LGPL-2.1
81
+ Files: utils/rd-mode.el
82
+ * Copyright: 1999 Koji Arai, Toshiro Kuwabara.
83
+ * License: GPL-2+
79
84
 
80
85
  =end
@@ -4,7 +4,7 @@
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
5
  <html xmlns="http://www.w3.org/1999/xhtml">
6
6
  <head>
7
- <title>doc/rd-draft.rd</title>
7
+ <title>Untitled</title>
8
8
  </head>
9
9
  <body>
10
10
  <h1><a name="label-0" id="label-0">RD working draft</a></h1><!-- RDLabel: "RD working draft" -->
@@ -4,7 +4,7 @@
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
5
  <html xmlns="http://www.w3.org/1999/xhtml">
6
6
  <head>
7
- <title>doc/rd-draft.rd.ja</title>
7
+ <title>Untitled</title>
8
8
  </head>
9
9
  <body>
10
10
  <h1><a name="label-0" id="label-0">RD working draft 日本語版</a></h1><!-- RDLabel: "RD working draft 日本語版" -->
@@ -30,7 +30,7 @@ module RD
30
30
  def initialize
31
31
  @enumcounter = 0
32
32
  @index = {}
33
- @filename = nil
33
+ @filename = ARGF.filename
34
34
  end
35
35
 
36
36
  def visit(tree)
@@ -40,9 +40,8 @@ module RD
40
40
 
41
41
  def apply_to_DocumentElement(element, content)
42
42
  content = content.join
43
- title = @filename || ARGF.filename || "Untitled"
44
- title = File.basename title
45
- title = title.sub(/\.rd$/i, '')
43
+ title = File.basename(@filename) || "Untilled"
44
+ title = title.sub(/\.rd$/i, '').upcase
46
45
  <<"EOT"
47
46
  .\\" DO NOT MODIFY THIS FILE! it was generated by rd2
48
47
  .TH #{title} 1 "#{Time.now.strftime '%B %Y'}"
@@ -51,6 +50,7 @@ EOT
51
50
  end # "
52
51
 
53
52
  def apply_to_Headline(element, title)
53
+ title = title.join(" ")
54
54
  element.level <= 1 ? ".SH #{title}\n" : ".SS #{title}\n"
55
55
  end
56
56
 
@@ -58,18 +58,18 @@ EOT
58
58
 
59
59
  def apply_to_TextBlock(element, content)
60
60
  if RD::DescListItem === element.parent ||
61
- RD::ItemListItem === element.parent ||
62
- RD::EnumListItem === element.parent
63
- return content.join
61
+ RD::ItemListItem === element.parent ||
62
+ RD::EnumListItem === element.parent
63
+ return content.join
64
64
  else
65
- return ".PP\n" + content.join
65
+ return ".PP\n" + content.join
66
66
  end
67
67
  end
68
68
 
69
69
  def apply_to_Verbatim(element)
70
70
  content = []
71
71
  element.each_line do |i|
72
- content.push(apply_to_String(i))
72
+ content.push(apply_to_String(i))
73
73
  end
74
74
  # Can we use BLOCKQUOTE such like?
75
75
  %Q[.nf\n\\& #{content.join("\\& ")}.fi\n]
@@ -106,9 +106,9 @@ EOT
106
106
  def apply_to_DescListItem(element, term, description)
107
107
  anchor = refer(element)
108
108
  if description.empty?
109
- ".TP\n.fi\n.B\n#{term}"
109
+ ".TP\n.fi\n.B\n#{term.join(" ")}"
110
110
  else
111
- %[.TP\n.fi\n.B\n#{term}\n#{description.join("\n")}].chomp
111
+ %[.TP\n.fi\n.B\n#{term.join(" ")}\n#{description.join("\n")}].chomp
112
112
  end
113
113
  end
114
114
 
@@ -116,36 +116,36 @@ EOT
116
116
  term = parse_method(term) # maybe: term -> element.term
117
117
  anchor = refer(element)
118
118
  if description.empty?
119
- ".TP\n.fi\n.B\n#{term}"
119
+ ".TP\n.fi\n.B\n#{term.join(" ")}"
120
120
  else
121
- %[.TP\n.fi\n.B\n#{term}\n#{description.join("\n")}]
121
+ %[.TP\n.fi\n.B\n#{term.join(" ")}\n#{description.join("\n")}]
122
122
  end
123
123
  end
124
124
 
125
125
  def parse_method(method)
126
126
  klass, kind, method, args = MethodParse.analize_method(method)
127
-
127
+
128
128
  if kind == :function
129
- klass = kind = nil
129
+ klass = kind = nil
130
130
  else
131
- kind = MethodParse.kind2str(kind)
131
+ kind = MethodParse.kind2str(kind)
132
132
  end
133
-
133
+
134
134
  case method
135
135
  when "[]"
136
- args.strip!
137
- args.sub!(/^\((.*)\)$/, '\\1')
138
- "#{klass}#{kind}[#{args}]"
136
+ args.strip!
137
+ args.sub!(/^\((.*)\)$/, '\\1')
138
+ "#{klass}#{kind}[#{args}]"
139
139
  when "[]="
140
- args.strip!
141
- args.sub!(/^\((.*)\)$/, '\\1')
142
- args, val = /^(.*),([^,]*)$/.match(args)[1,2]
143
- args.strip!
144
- val.strip!
140
+ args.strip!
141
+ args.sub!(/^\((.*)\)$/, '\\1')
142
+ args, val = /^(.*),([^,]*)$/.match(args)[1,2]
143
+ args.strip!
144
+ val.strip!
145
145
 
146
- "#{klass}#{kind}[#{args}] = #{val}"
146
+ "#{klass}#{kind}[#{args}] = #{val}"
147
147
  else
148
- "#{klass}#{kind}#{method}#{args}"
148
+ "#{klass}#{kind}#{method}#{args}"
149
149
  end
150
150
  end
151
151
  private :parse_method
@@ -173,14 +173,14 @@ EOT
173
173
  def apply_to_Index(element, content)
174
174
  tmp = []
175
175
  element.each do |i|
176
- tmp.push(i) if i.is_a?(String)
176
+ tmp.push(i) if i.is_a?(String)
177
177
  end
178
178
  key = meta_char_escape(tmp.join)
179
179
  if @index.has_key?(key)
180
- # warning?
181
- ""
180
+ # warning?
181
+ ""
182
182
  else
183
- num = @index[key] = @index.size
183
+ num = @index[key] = @index.size
184
184
  %{\\&\\fB#{content.join.sub(/\./, '\\.')}\\fP}
185
185
  end
186
186
  end
@@ -188,13 +188,13 @@ EOT
188
188
  def apply_to_Reference(element, content)
189
189
  case element.label
190
190
  when Reference::URL
191
- apply_to_RefToURL(element, content)
191
+ apply_to_RefToURL(element, content)
192
192
  when Reference::RDLabel
193
- if element.label.filename
194
- apply_to_RefToOtherFile(element, content)
195
- else
196
- apply_to_RefToElement(element, content)
197
- end
193
+ if element.label.filename
194
+ apply_to_RefToOtherFile(element, content)
195
+ else
196
+ apply_to_RefToElement(element, content)
197
+ end
198
198
  end
199
199
  end
200
200
 
@@ -206,7 +206,7 @@ EOT
206
206
  def apply_to_RefToOtherFile(element, content)
207
207
  content.join
208
208
  end
209
-
209
+
210
210
  def apply_to_RefToURL(element, content)
211
211
  content.join
212
212
  end
@@ -237,5 +237,6 @@ $Visitor_Class = RD::RD2MANVisitor
237
237
  == script info.
238
238
  RD to MAN translate library for rdfmt.rb
239
239
  $Id: rd2man-lib.rb,v 1.9 2003/08/02 15:45:49 tosh Exp $
240
- copyright WATANABE Hirofumi <eban@os.rim.or.jp>, 2000
240
+ Copyright 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
241
+ 2012 Youhei SASAKI <uwabami@gfd-dennou.org>
241
242
  =end