File: rd2html-opt.rb

package info (click to toggle)
rdtool 0.6.38-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 940 kB
  • sloc: ruby: 8,213; lisp: 387; sh: 33; makefile: 16
file content (67 lines) | stat: -rw-r--r-- 1,223 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
=begin
= rd2html-opt.rb
sub-OptionParser for rd2html-lib.rb.
=end
require "optparse"

q = ARGV.options

q.on_tail("rd2html-lib options:")


#q.on_tail("--use-numbering-anchor",
#	  "use number for anchor name (old style)") do
#  $Visitor.use_old_anchor = true
#end

q.on_tail("--output-rbl",
	  "output external Label file") do
  $Visitor.output_rbl = true
end

q.on_tail("--with-css=FILE",
	  String,
	  "use FILE as CSS of output HTML") do |i|
  $Visitor.css = i
end

q.on_tail("--html-charset=CHARSET",
	  String,
	  "indicate CHARSET as charset(char encoding)") do |i|
  $Visitor.charset = i
end

q.on_tail("--html-lang=LANG",
	  String,
	  "indicate LANG as lang attribute of html") do |i|
  $Visitor.lang = i
end
  
q.on_tail("--html-title=TITLE",
	  String,
	  "content of TITLE element of HTML") do |i|
  $Visitor.title = i
end

q.on_tail("--html-link-rel=REL",
	  String,
	  "add forward LINK element.(\"<rel>:<href>\")") do |i|
  if /(\w+):(.+)/ =~ i
    $Visitor.html_link_rel[$1] = $2
  else
    # warning
  end
end

q.on_tail("--html-link-rev=REV",
	  String,
	  "add reverse LINK element.(\"<rev>:<href>\")") do |i|
  if /(\w+):(.+)/ =~ i
    $Visitor.html_link_rev[$1] = $2
  else
    # warning
  end
end