docbook_files 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/.DS_Store ADDED
Binary file
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.2.0 / 2011-10-10
2
+
3
+ * Added search for referenced files (e.g. media files included via a 'fileref' attribute)
4
+ * Minor fixes
5
+ ** Fixed output error for numbers and booleans
6
+
1
7
  == 0.1.0 / 2011-10-07
2
8
 
3
9
  * First release, the application currently only deals with included files
data/README.md CHANGED
@@ -6,7 +6,8 @@ docbook_files lists and checks all files related to a DocBook writing project.
6
6
  Features
7
7
  --------
8
8
 
9
- * lists and checks included files
9
+ * lists and checks included files (XInclude)
10
+ * lists and checks referenced files (media files and others, specidifed by _fileref_)
10
11
 
11
12
  Synopsis
12
13
  --------
@@ -15,13 +16,13 @@ docbook_files is a command line application, bin/docbook_files, which checks the
15
16
 
16
17
  docbook_files myproject.xml
17
18
 
18
- This will result in a indentet list of the file names, starting from file _myproject.xml_ and following every XInclude link. Files that could not be found are shown in red.
19
+ This will result in a indentet list of the file names, starting from file _myproject.xml_ and following every XInclude link or _fileref_ reference. _fileref_ attributes are used in _mediaobject_ tags to specify external image, video, and audio files. Files that could not be found are shown in red.
19
20
 
20
21
  Using options the output can be enhanced with more file information, use the classical _docbook_files --help_ to see all available options. They range from file size to MIME types and XML namespaces. Example:
21
22
 
22
23
  docbook_files --ts --namespace myproject.xml
23
24
 
24
- would result in a list with the added information of the last modified timestamp and the XML namespace of each file.
25
+ would result in a list with the added information of the last modified timestamp and the XML namespace of each XML file.
25
26
 
26
27
  Requirements
27
28
  ------------
data/Rakefile CHANGED
@@ -16,6 +16,6 @@ Bones {
16
16
  ignore_file '.gitignore'
17
17
  ignore_file 'About.org'
18
18
  depend_on 'libxml-ruby'
19
- depend_on 'term-ansicolor'
20
- depend_on 'wand'
19
+ depend_on 'term-ansicolor'
20
+ depend_on 'wand'
21
21
  }
data/bin/docbook_files CHANGED
@@ -33,7 +33,7 @@ props = []
33
33
  opts = OptionParser.new
34
34
  ivs = DocbookFiles::FileData.init_vars
35
35
  ivs.each do |k,v|
36
- opts.on("--#{k.to_s}","#{v}") {|val| props << k}
36
+ opts.on("--#{k.to_s}","#{v}") {|val| props << k}
37
37
  end
38
38
  opts.banner = banner
39
39
  rest = opts.parse(ARGV)
@@ -53,33 +53,46 @@ end
53
53
  puts("docbook_status, Version #{DocbookFiles::VERSION}") if @output_format == :screen
54
54
  dbf = DocbookFiles::Docbook.new(rest[0])
55
55
  table = dbf.list_as_table([:name,:exists]+props)
56
- puts '-'*10
57
56
  puts
58
- output_string = "%s %s" + props.map{|p| " %s"}.join
57
+ puts 'File Hierarchy'
58
+ puts '-'*80
59
59
 
60
+ output_string = "%s %s" + props.map{|p| " %s"}.join
60
61
 
61
- table.each_with_index do |t,index|
62
- vals = ['-'*t[:level],t[:name]] + props.map {|p|
63
- if (t[p].nil? || t[p].empty?)
64
- '<>'
65
- else
66
- t[p]
67
- end
68
- }
69
- #vals = ([' '*t[:level],t[:name]] + props.map{|p| t[p]})
70
- output = output_string % vals
71
- if (index == 0)
72
- output = "+" + output
73
- elsif (index == table.length-1)
74
- output = "+" + output
75
- else
76
- output = "|" + output
77
- end
78
- if t[:exists] == false
79
- puts output.red
80
- else
81
- puts output
82
- end
62
+ def emptyval?(val)
63
+ if val.nil?
64
+ true
65
+ else
66
+ if (val.class == String)
67
+ val.empty?
68
+ else
69
+ false
70
+ end
71
+ end
83
72
  end
73
+
74
+ table.each_with_index do |t,index|
75
+ vals = ['-'*t[:level]+'>',t[:name]] + props.map {|p|
76
+ if (emptyval?(t[p]))
77
+ '<>'
78
+ else
79
+ t[p]
80
+ end
81
+ }
82
+ output = output_string % vals
83
+ if (index == 0)
84
+ output = "+" + output
85
+ elsif (index == table.length-1)
86
+ output = "+" + output
87
+ else
88
+ output = "|" + output
89
+ end
90
+ if t[:exists] == false
91
+ puts output.red
92
+ else
93
+ puts output
94
+ end
95
+ end
96
+
84
97
  puts
85
98
  exit 0
@@ -1,3 +1,4 @@
1
+ # -*-encoding:utf-8-*-
1
2
  require 'xml'
2
3
  module DocbookFiles
3
4
 
@@ -97,6 +98,16 @@ private
97
98
  end
98
99
  end
99
100
 
101
+ # Finds and returns all external files referenced in a DocBook document.
102
+ # Referenced files are mostly non-XML files needed for _mediaobjects_ etc.
103
+ # They can be searched via the _fileref_ attribute.
104
+ def find_referenced_files(doc,parent_dir,parent_fd)
105
+ refs = doc.find('//db:*[@fileref!=""]',:db => DOCBOOK_NS)
106
+ refs.map {|r|
107
+ fname = r.attributes['fileref']
108
+ FileData.new(fname,parent_dir,parent_fd)
109
+ }
110
+ end
100
111
 
101
112
  # Opens a XML document and looks for included or referenced files.
102
113
  # Returns a FileData object with its include-tree
@@ -110,6 +121,7 @@ private
110
121
  fl.version = version(doc) if fl.docbook
111
122
  fl.tag = start_tag(doc)
112
123
  files = find_xincludes(doc)
124
+ fl.refs = find_referenced_files(doc,parent_dir,fl)
113
125
  rescue Exception => e
114
126
  files = []
115
127
  end
@@ -1,148 +1,156 @@
1
+ # -*-encoding:utf-8-*-
1
2
  module DocbookFiles
2
- require 'date'
3
- require 'digest/sha1'
4
- require 'wand'
5
-
6
- # Data about a member file of a DocBook project
7
- class FileData
8
-
9
- # file name, full file path, existence flag, last modified timestamp, size in bytes
10
- # SHA1 checksum, MIME type, array of included FileDatas
11
- #attr_accessor :name, :full_name, :exists, :ts, :size, :checksum, :mime, :includes
12
-
13
- # XML namespace, Flag for DocBook NS, DocBook version, start tag
14
- #attr_accessor :namespace, :docbook, :version, :tag
15
-
16
- attr_accessor :name, :exists, :includes
17
-
18
- def FileData.init_vars()
19
- x = {:full_name => "file name + path",
20
- :ts => "last modified timestamp",
21
- :size => "file size",
22
- :checksum => "file checksum",
23
- :mime => "the file's MIME type",
24
- :namespace => "XML namespace, if applicable",
25
- :docbook => "DocBook type flag",
26
- :version => "DocBook version number, if applicable",
27
- :tag => "XML start tag, if applicable",
28
- :parent => "parent file, if included or referenced"}
29
- x.each { |s,ex|
30
- attr_accessor s
31
- }
32
- x
33
- end
34
-
35
- @@vars = init_vars()
36
-
37
-
38
- def initialize(name,parent_dir=".",parent_file=nil)
39
- @name = name
40
- @full_name = get_full_name(name, parent_dir)
41
- @name = File.basename(name)
42
- @namespace = ""
43
- @docbook = false
44
- @version = ""
45
- @tag = ""
46
- @parent = (parent_file.nil? ? nil : parent_file.name)
47
- if (File.exists?(@full_name))
48
- @exists = true
49
- @ts = File.mtime(full_name)
50
- @size = File.size(full_name)
51
- @checksum = calc_checksum()
52
- @mime = get_mime_type()
53
- else
54
- @exists = false
55
- @ts = Time.now
56
- @size = 0
57
- @checksum = ""
58
- @mime = ""
59
- end
60
- @includes = []
61
- end
62
-
63
-
64
- # Does the really file exist?
65
- def exists?
66
- @exists
67
- end
68
-
69
- # Return the names and parent files of non-existing files
70
- def find_non_existing_files
71
- files = traverse([:name, :exists, :parent])
72
- files.flatten.reject{|f| f[:exists] == true}.map{|f| f.delete(:exists); f}
73
- end
74
-
75
- # Return a tree-like array with all names
76
- def names
77
- self.traverse([:name])
78
- end
79
-
80
- # Return a hash with the values for the passed symbols.
81
- # If the property list is empty all instance variables
82
- # are used, except the include.
83
- #
84
- # Example: to_hash([:name, :mime]) would return
85
- # {:name => "name", :mime => "application/xml"}.
86
- #
87
- def to_hash(props=[])
88
- me_hash = {}
89
- if (props.empty?)
90
- ivs = self.instance_variables
91
- ivs.delete(:@includes)
92
- props = ivs.map {|iv| ivs = iv.to_s; ivs[1,ivs.length].to_sym}
93
- end
94
- props.each {|p| me_hash[p] = self.send(p)}
95
- me_hash
96
- end
97
-
98
- # Return a tree-like array of maps with the
99
- # requested properties (symbols)
100
- def traverse(props=[])
101
- me = self.to_hash(props)
102
- if @includes.empty?()
103
- [me]
104
- else
105
- [me] + @includes.map {|i| i.traverse(props)}
106
- end
107
- end
108
-
109
- # Return a table-like array of maps with the
110
- # requested properties (symbols). Each entry gets a level
111
- # indicator (:level) to show the tree-level.
112
- #
113
- def traverse_as_table(props=[],level=0)
114
- me = self.to_hash(props)
115
- me[:level] = level
116
- if @includes.empty?()
117
- ret = [me]
118
- else
119
- ret = [me] + @includes.map {|i| i.traverse_as_table(props,level+1)}
120
- end
121
- ret.flatten
122
- end
3
+ require 'date'
4
+ require 'digest/sha1'
5
+ require 'wand'
6
+
7
+ # Data about a member file of a DocBook project
8
+ class FileData
9
+
10
+ # file name, full file path, existence flag, last modified timestamp, size in bytes
11
+ # SHA1 checksum, MIME type, array of included FileDatas
12
+ #attr_accessor :name, :full_name, :exists, :ts, :size, :checksum, :mime, :includes
13
+
14
+ # XML namespace, Flag for DocBook NS, DocBook version, start tag
15
+ #attr_accessor :namespace, :docbook, :version, :tag
16
+
17
+ attr_accessor :name, :exists, :includes, :refs
18
+
19
+ def FileData.init_vars()
20
+ x = {:full_name => "file name + path",
21
+ :ts => "last modified timestamp",
22
+ :size => "file size",
23
+ :checksum => "file checksum",
24
+ :mime => "the file's MIME type",
25
+ :namespace => "XML namespace, if applicable",
26
+ :docbook => "DocBook type flag",
27
+ :version => "DocBook version number, if applicable",
28
+ :tag => "XML start tag, if applicable",
29
+ :parent => "parent file, if included or referenced"}
30
+ x.each { |s,ex|
31
+ attr_accessor s
32
+ }
33
+ x
34
+ end
35
+
36
+ @@vars = init_vars()
37
+
38
+
39
+ def initialize(name,parent_dir=".",parent_file=nil)
40
+ @name = name
41
+ @full_name = get_full_name(name, parent_dir)
42
+ @name = File.basename(name)
43
+ @namespace = ""
44
+ @docbook = false
45
+ @version = ""
46
+ @tag = ""
47
+ @parent = (parent_file.nil? ? nil : parent_file.name)
48
+ if (File.exists?(@full_name))
49
+ @exists = true
50
+ @ts = File.mtime(full_name)
51
+ @size = File.size(full_name)
52
+ @checksum = calc_checksum()
53
+ @mime = get_mime_type()
54
+ else
55
+ @exists = false
56
+ @ts = Time.now
57
+ @size = 0
58
+ @checksum = ""
59
+ @mime = ""
60
+ end
61
+ @includes = []
62
+ @refs = []
63
+ end
64
+
65
+
66
+ # Does the really file exist?
67
+ def exists?
68
+ @exists
69
+ end
70
+
71
+ # Return the names and parent files of non-existing files
72
+ def find_non_existing_files
73
+ files = traverse([:name, :exists, :parent])
74
+ files.flatten.reject{|f| f[:exists] == true}.map{|f| f.delete(:exists); f}
75
+ end
76
+
77
+ # Return a tree-like array with all names
78
+ def names
79
+ self.traverse([:name])
80
+ end
81
+
82
+ # Return a hash with the values for the passed symbols.
83
+ # If the property list is empty all instance variables
84
+ # are used, except the include.
85
+ #
86
+ # Example: to_hash([:name, :mime]) would return
87
+ # {:name => "name", :mime => "application/xml"}.
88
+ #
89
+ def to_hash(props=[])
90
+ me_hash = {}
91
+ if (props.empty?)
92
+ ivs = self.instance_variables
93
+ ivs.delete(:@includes)
94
+ props = ivs.map {|iv| ivs = iv.to_s; ivs[1,ivs.length].to_sym}
95
+ end
96
+ props.each {|p| me_hash[p] = self.send(p)}
97
+ me_hash
98
+ end
99
+
100
+ # Return a tree-like array of maps with the
101
+ # requested properties (symbols)
102
+ def traverse(props=[])
103
+ me = self.to_hash(props)
104
+ me2 = [me]
105
+ unless @refs.empty?()
106
+ me2 += @refs.map {|r| r.to_hash(props)}
107
+ end
108
+ if @includes.empty?()
109
+ me2
110
+ else
111
+ me2 + @includes.map {|i| i.traverse(props)}
112
+ end
113
+ end
114
+
115
+ # Return a table-like array of maps with the
116
+ # requested properties (symbols). Each entry gets a level
117
+ # indicator (:level) to show the tree-level.
118
+ #
119
+ def traverse_as_table(props=[],level=0)
120
+ me = self.to_hash(props)
121
+ me[:level] = level
122
+ me2 = [me]
123
+ unless @refs.empty?()
124
+ me2 += @refs.map {|r| x = r.to_hash(props); x[:level] = level+1; x}
125
+ end
126
+ unless @includes.empty?()
127
+ me2 += @includes.map {|i| i.traverse_as_table(props,level+1)}
128
+ end
129
+ me2.flatten
130
+ end
123
131
 
124
132
  private
125
133
 
126
- # Calculate the SHA1 checksum for the file
127
- def calc_checksum
128
- Digest::SHA1.hexdigest(IO.binread(@full_name))
129
- end
130
-
131
- # Produce the full path for a filename
132
- def get_full_name(fname, parent_dir)
133
- dir = File.dirname(fname)
134
- file = File.basename(fname)
135
- full_name = File.expand_path(file,dir)
136
- unless File.exists?(full_name)
137
- full_name = File.expand_path(fname, parent_dir)
138
- end
139
- full_name
140
- end
141
-
142
- # Try to find the file's MIME type
143
- def get_mime_type
144
- Wand.wave(@full_name)
145
- end
146
-
147
- end
134
+ # Calculate the SHA1 checksum for the file
135
+ def calc_checksum
136
+ Digest::SHA1.hexdigest(IO.binread(@full_name))
137
+ end
138
+
139
+ # Produce the full path for a filename
140
+ def get_full_name(fname, parent_dir)
141
+ dir = File.dirname(fname)
142
+ file = File.basename(fname)
143
+ full_name = File.expand_path(file,dir)
144
+ unless File.exists?(full_name)
145
+ full_name = File.expand_path(fname, parent_dir)
146
+ end
147
+ full_name
148
+ end
149
+
150
+ # Try to find the file's MIME type
151
+ def get_mime_type
152
+ Wand.wave(@full_name)
153
+ end
154
+
155
+ end
148
156
  end
data/lib/docbook_files.rb CHANGED
@@ -1,4 +1,4 @@
1
-
1
+ # -*-encoding:utf-8-*-
2
2
  module DocbookFiles
3
3
 
4
4
  # :stopdoc:
@@ -1,8 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  require 'minitest/spec'
3
- require 'minitest/autorun'
4
- require "docbook_files"
5
3
  require 'turn'
4
+ require "docbook_files"
5
+
6
+ MiniTest::Unit.use_natural_language_case_names = true
6
7
 
7
8
  module DocbookFiles
8
9
  describe Docbook do
@@ -16,7 +17,7 @@ module DocbookFiles
16
17
  actual.docbook.must_equal(false)
17
18
  end
18
19
 
19
- it "finds namespace, DocBook-ness, version" do
20
+ it "finds namespace, DocBookness, version" do
20
21
  dbf = DocbookFiles::Docbook.new("test/fixtures/bookxi.xml")
21
22
  actual = dbf.list()
22
23
  actual.namespace.must_equal("http://docbook.org/ns/docbook")
@@ -24,7 +25,7 @@ module DocbookFiles
24
25
  actual.version.must_equal("5.0")
25
26
  end
26
27
 
27
- it "finds no namespace, DocBook-ness, version" do
28
+ it "finds no namespace, DocBookness, version" do
28
29
  dbf = DocbookFiles::Docbook.new("test/fixtures/no-ns.xml")
29
30
  actual = dbf.list()
30
31
  actual.namespace.must_equal("")
@@ -58,5 +59,18 @@ module DocbookFiles
58
59
  actual.must_equal(expected)
59
60
  end
60
61
 
62
+ it "finds referenced files" do
63
+ dbf = DocbookFiles::Docbook.new("test/fixtures/refs/book-simple.xml")
64
+ actual = dbf.list()
65
+ actual.refs.map{|r|r.name}.must_equal(["orange.png","orange.jpeg"])
66
+ end
67
+
68
+ it "marks non-existing references" do
69
+ dbf = DocbookFiles::Docbook.new("test/fixtures/refs/book-simple-err.xml")
70
+ actual = dbf.list()
71
+ actual.refs.map{|r|r.name}.must_equal(["orange.png","orange.jpeg"])
72
+ actual.refs.map{|r|r.exists}.must_equal([true,false])
73
+ end
74
+
61
75
  end
62
76
  end
@@ -1,9 +1,10 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  require 'minitest/spec'
3
- require 'minitest/autorun'
3
+ require 'turn'
4
4
  require "docbook_files"
5
5
  require 'date'
6
- require 'turn'
6
+
7
+ MiniTest::Unit.use_natural_language_case_names = true
7
8
 
8
9
  module DocbookFiles
9
10
  describe FileData do
@@ -35,7 +36,7 @@ module DocbookFiles
35
36
  :full_name=>"/Users/rv/Documents/Projekte/docbook_files/test/fixtures/bookxi.xml",
36
37
  :namespace=>"", :docbook=>false, :version=>"", :tag=>"", :parent=>nil, :exists=>true,
37
38
  :ts=>Time.parse("2011-10-06 20:45:01 +0200"), :size=>481,
38
- :checksum=>"7d240e7a084c16665ac59e5b927acd6a06953897", :mime=>"application/xml"}
39
+ :checksum=>"7d240e7a084c16665ac59e5b927acd6a06953897", :mime=>"application/xml", :refs => []}
39
40
  actual.must_equal(expected)
40
41
  end
41
42
 
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <book xmlns="http://docbook.org/ns/docbook"
3
+ xmlns:xi="http://www.w3.org/2001/XInclude"
4
+ version="5.0">
5
+ <title>B1</title>
6
+ <chapter>
7
+ <title>C1</title>
8
+ <para>
9
+ Dies ist ein Test .. Dies ist ein Test.
10
+ In den Jahren 1900-1901 geschahen viele Überfälle von O`Reillys.
11
+ </para>
12
+ <mediaobject>
13
+ <info>
14
+ <othercredit>
15
+ <orgname>The artist</orgname>
16
+ </othercredit>
17
+ </info>
18
+ <alt>Orange</alt>
19
+ <imageobject>
20
+ <imagedata align="right" width="6cm" format="PNG" fileref="img/orange.png"/>
21
+ </imageobject>
22
+ <imageobject>
23
+ <imagedata align="right" width="6cm" format="JPEG" fileref="omg/orange.jpeg"/>
24
+ </imageobject>
25
+ <textobject>
26
+ <para>
27
+ Textobject inside a mediaboject.
28
+ </para>
29
+ </textobject>
30
+ </mediaobject>
31
+ </chapter>
32
+ </book>
@@ -0,0 +1,32 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <book xmlns="http://docbook.org/ns/docbook"
3
+ xmlns:xi="http://www.w3.org/2001/XInclude"
4
+ version="5.0">
5
+ <title>B1</title>
6
+ <chapter>
7
+ <title>C1</title>
8
+ <para>
9
+ Dies ist ein Test .. Dies ist ein Test.
10
+ In den Jahren 1900-1901 geschahen viele Überfälle von O`Reillys.
11
+ </para>
12
+ <mediaobject>
13
+ <info>
14
+ <othercredit>
15
+ <orgname>The artist</orgname>
16
+ </othercredit>
17
+ </info>
18
+ <alt>Orange</alt>
19
+ <imageobject>
20
+ <imagedata align="right" width="6cm" format="PNG" fileref="img/orange.png"/>
21
+ </imageobject>
22
+ <imageobject>
23
+ <imagedata align="right" width="6cm" format="JPEG" fileref="img/orange.jpeg"/>
24
+ </imageobject>
25
+ <textobject>
26
+ <para>
27
+ Textobject inside a mediaboject.
28
+ </para>
29
+ </textobject>
30
+ </mediaobject>
31
+ </chapter>
32
+ </book>
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <book xmlns="http://docbook.org/ns/docbook"
3
+ xmlns:xi="http://www.w3.org/2001/XInclude"
4
+ version="5.0">
5
+ <title>B1</title>
6
+ <chapter>
7
+ <title>C1</title>
8
+ <para>
9
+ Dies ist ein Test .. Dies ist ein Test.
10
+ In den Jahren 1900-1901 geschahen viele Überfälle von O`Reillys.
11
+ </para>
12
+ </chapter>
13
+ <xi:include href="chapter2xi.xml"/>
14
+ <xi:include href="chapter3xi.xml"/>
15
+ <xi:include href="c4/chapter4xi.xml"/>
16
+ </book>
@@ -0,0 +1,8 @@
1
+ <chapter xmlns="http://docbook.org/ns/docbook" version="5.0">
2
+ <title>C4</title>
3
+ <para>
4
+ Dies ist ein Test .. Dies ist ein Test.
5
+ In den Jahren 1900-1901 geschahen viele Überfälle von O`Reillys.
6
+ <remark>FIXME 3 Ausbauen.</remark>
7
+ </para>
8
+ </chapter>
@@ -0,0 +1,30 @@
1
+ <chapter xmlns="http://docbook.org/ns/docbook"
2
+ xmlns:xi="http://www.w3.org/2001/XInclude"
3
+ version="5.0">
4
+ <title>C2</title>
5
+ <para>
6
+ Dies ist ein Test .. Dies ist ein Test.
7
+ In den Jahren 1900-1901 geschahen viele Überfälle von O`Reillys.
8
+ <remark>FIXME Ausbauen.</remark>
9
+ </para>
10
+ <mediaobject>
11
+ <info>
12
+ <othercredit>
13
+ <orgname>The artist</orgname>
14
+ </othercredit>
15
+ </info>
16
+ <alt>Orange</alt>
17
+ <imageobject>
18
+ <imagedata align="right" width="6cm" format="PNG" fileref="img/orange.png"/>
19
+ </imageobject>
20
+ <imageobject>
21
+ <imagedata align="right" width="6cm" format="JPEG" fileref="img/orange.jpeg"/>
22
+ </imageobject>
23
+ <textobject>
24
+ <para>
25
+ Textobject inside a mediaboject.
26
+ </para>
27
+ </textobject>
28
+ </mediaobject>
29
+ <xi:include href="section1xi.xml"/>
30
+ </chapter>
@@ -0,0 +1,8 @@
1
+ <chapter xmlns="http://docbook.org/ns/docbook" version="5.0">
2
+ <title>C3</title>
3
+ <para>
4
+ Dies ist ein Test .. Dies ist ein Test.
5
+ In den Jahren 1900-1901 geschahen viele Überfälle von O`Reillys.
6
+ <remark>FIXME 3 Ausbauen.</remark>
7
+ </para>
8
+ </chapter>
Binary file
Binary file
@@ -0,0 +1,9 @@
1
+ <section xmlns="http://docbook.org/ns/docbook"
2
+ version="5.0">
3
+ <title>S1</title>
4
+ <para>
5
+ Dies ist ein Test .. Dies ist ein Test.
6
+ In den Jahren 1900-1901 geschahen viele Überfälle von O`Reillys.
7
+ <remark>TODO S1 Ausbauen.</remark>
8
+ </para>
9
+ </section>
data/version.txt CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docbook_files
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-07 00:00:00.000000000Z
12
+ date: 2011-10-10 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: libxml-ruby
16
- requirement: &2153015720 !ruby/object:Gem::Requirement
16
+ requirement: &2160079640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.2.2
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153015720
24
+ version_requirements: *2160079640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: term-ansicolor
27
- requirement: &2153015000 !ruby/object:Gem::Requirement
27
+ requirement: &2160076200 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.6
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2153015000
35
+ version_requirements: *2160076200
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: wand
38
- requirement: &2153014340 !ruby/object:Gem::Requirement
38
+ requirement: &2160074160 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0.4'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2153014340
46
+ version_requirements: *2160074160
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bones
49
- requirement: &2153013640 !ruby/object:Gem::Requirement
49
+ requirement: &2152251960 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 3.7.1
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2153013640
57
+ version_requirements: *2152251960
58
58
  description: docbook_files lists and checks all files related to a DocBook writing
59
59
  project.
60
60
  email: dev@textmulch.de
@@ -65,6 +65,7 @@ extra_rdoc_files:
65
65
  - History.txt
66
66
  - bin/docbook_files
67
67
  files:
68
+ - .DS_Store
68
69
  - .gitignore
69
70
  - Gemfile
70
71
  - Gemfile.lock
@@ -87,6 +88,15 @@ files:
87
88
  - test/fixtures/chapter3xi.xml
88
89
  - test/fixtures/no-ns.xml
89
90
  - test/fixtures/no-xml.xml
91
+ - test/fixtures/refs/book-simple-err.xml
92
+ - test/fixtures/refs/book-simple.xml
93
+ - test/fixtures/refs/bookxi.xml
94
+ - test/fixtures/refs/c4/chapter4xi.xml
95
+ - test/fixtures/refs/chapter2xi.xml
96
+ - test/fixtures/refs/chapter3xi.xml
97
+ - test/fixtures/refs/img/orange.jpeg
98
+ - test/fixtures/refs/img/orange.png
99
+ - test/fixtures/refs/section1xi.xml
90
100
  - test/fixtures/section1xi.xml
91
101
  - test/test_docbook_files.rb
92
102
  - version.txt