dokkit 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. data/CONTRIBUTORS +0 -0
  2. data/DONE +0 -0
  3. data/LICENSE +20 -0
  4. data/README +0 -0
  5. data/Rakefile +62 -0
  6. data/TODO +0 -0
  7. data/bin/dokkit +53 -0
  8. data/lib/dokkit/app.rb +305 -0
  9. data/lib/dokkit/builtin.rake +55 -0
  10. data/lib/dokkit/deplate/fmt/html-notemplate.rb +21 -0
  11. data/lib/dokkit/deplate/fmt/latex-notemplate.rb +22 -0
  12. data/lib/dokkit/dokkittasks.rb +69 -0
  13. data/lib/dokkit/filters/deplate.rb +37 -0
  14. data/lib/dokkit/filters.rb +26 -0
  15. data/lib/dokkit/page.rb +54 -0
  16. data/lib/dokkit/projects/invoice/README +49 -0
  17. data/lib/dokkit/projects/invoice/Rakefile +100 -0
  18. data/lib/dokkit/projects/invoice/doc/config/company.yaml +12 -0
  19. data/lib/dokkit/projects/invoice/doc/config/customer.yaml +4 -0
  20. data/lib/dokkit/projects/invoice/doc/layouts/invoice.dpltex +90 -0
  21. data/lib/dokkit/projects/invoice/doc/pages/COMMON.rb +12 -0
  22. data/lib/dokkit/projects/invoice/doc/pages/invoice.rb +5 -0
  23. data/lib/dokkit/projects/invoice/doc/pages/invoice.yamltex +16 -0
  24. data/lib/dokkit/projects/invoice/doc/res/tex/deplate.sty +46 -0
  25. data/lib/dokkit/projects/invoice/doc/res/tex/images/logo.eps +209 -0
  26. data/lib/dokkit/projects/invoice/doc/res/tex/include/deplate.sty +46 -0
  27. data/lib/dokkit/projects/invoice/doc/res/tex/include/layout.inc +24 -0
  28. data/lib/dokkit/projects/invoice/doc/res/tex/include/macro.inc +67 -0
  29. data/lib/dokkit/projects/invoice/doc/res/tex/include/packages.inc +51 -0
  30. data/lib/dokkit/projects/invoice/lib/invoice.rb +104 -0
  31. data/lib/dokkit/projects/tech_report/README +49 -0
  32. data/lib/dokkit/projects/tech_report/Rakefile +102 -0
  33. data/lib/dokkit/projects/tech_report/doc/config/company.yaml +13 -0
  34. data/lib/dokkit/projects/tech_report/doc/config/tech_report.yaml +3 -0
  35. data/lib/dokkit/projects/tech_report/doc/layouts/report.dpltex +40 -0
  36. data/lib/dokkit/projects/tech_report/doc/pages/COMMON.rb +12 -0
  37. data/lib/dokkit/projects/tech_report/doc/pages/report.dpltex +37 -0
  38. data/lib/dokkit/projects/tech_report/doc/pages/report.inc +2 -0
  39. data/lib/dokkit/projects/tech_report/doc/pages/report.rb +3 -0
  40. data/lib/dokkit/projects/tech_report/doc/res/attachments/attachment_1 +0 -0
  41. data/lib/dokkit/projects/tech_report/doc/res/attachments/attachment_2 +0 -0
  42. data/lib/dokkit/projects/tech_report/doc/res/tex/images/logo.eps +311 -0
  43. data/lib/dokkit/projects/tech_report/doc/res/tex/include/deplate.sty +46 -0
  44. data/lib/dokkit/projects/tech_report/doc/res/tex/include/layout.inc +24 -0
  45. data/lib/dokkit/projects/tech_report/doc/res/tex/include/macro.inc +67 -0
  46. data/lib/dokkit/projects/tech_report/doc/res/tex/include/packages.inc +48 -0
  47. data/lib/dokkit/projects/tech_report/doc/res/tex/report.bib +4 -0
  48. data/lib/dokkit/projects/tech_report/lib/tech_report.rb +17 -0
  49. data/lib/dokkit/projects/website/README +49 -0
  50. data/lib/dokkit/projects/website/Rakefile +81 -0
  51. data/lib/dokkit/projects/website/doc/layouts/normal.thtml +38 -0
  52. data/lib/dokkit/projects/website/doc/pages/COMMON.rb +9 -0
  53. data/lib/dokkit/projects/website/doc/pages/deplate.dplhtml +9 -0
  54. data/lib/dokkit/projects/website/doc/pages/index.rb +10 -0
  55. data/lib/dokkit/projects/website/doc/pages/index.thtml +12 -0
  56. data/lib/dokkit/projects/website/doc/res/images/rote-tiny.png +0 -0
  57. data/lib/dokkit/projects/website/html/deplate.html +21 -0
  58. data/lib/dokkit/projects/website/html/images/rote-tiny.png +0 -0
  59. data/lib/dokkit/projects/website/html/index.html +37 -0
  60. data/lib/dokkit.rb +71 -0
  61. data/tests/gem_tests.rb +4 -0
  62. data/tests/test_filters.rb +46 -0
  63. metadata +177 -0
@@ -0,0 +1,9 @@
1
+ # Shared code for all pages below this directory.
2
+ #
3
+ # This is executed for every file transformed, in the binding of
4
+ # the appropriate Rote::Page instance. Individual page sources
5
+ # ([pagename].rb) override anything defined here.
6
+ #
7
+ # Any COMMON.rb files found in directories above this will also
8
+ # be loaded.
9
+ @site_title = "My site"
@@ -0,0 +1,9 @@
1
+ #LIST: toc
2
+
3
+ * Introduzione
4
+
5
+ Lista:
6
+
7
+ - item 1
8
+ - item 2
9
+
@@ -0,0 +1,10 @@
1
+ # Page code for the 'index' page. We call a few methods to
2
+ # set layout and formatting, and then create a custom variable
3
+ # for use in the layout.
4
+
5
+ # Apply the 'normal' layout
6
+ layout 'normal'
7
+
8
+ # Set a custom var for use in our layout
9
+ @page_title = 'A sample page'
10
+
@@ -0,0 +1,12 @@
1
+ This is a *sample* page.
2
+
3
+ <%# insert an image with relative path, using Textile !img! markup #%>
4
+ It has a very small image:
5
+ !<%= link_rel '/images/rote-tiny.png' %>!
6
+
7
+ (Which is the same as the one at the bottom)
8
+
9
+ * You should
10
+ * Replace this
11
+ * With your doc.
12
+
@@ -0,0 +1,21 @@
1
+ <div id="Table_of_Contents">
2
+ <div id="Table_of_ContentsBlock" class="toc">
3
+ <h1 class="toc">Table of Contents</h1>
4
+ <ul class="toc">
5
+ <li class="toc">
6
+ <a href="#hd001" class="toc">1 Introduzione</a>
7
+ </li>
8
+ </ul>
9
+ </div></div>
10
+
11
+ <h1 id="hd001">1&nbsp;Introduzione</h1>
12
+
13
+ Lista:
14
+ <ul class="Itemize">
15
+ <li class="Itemize dash">
16
+ item 1
17
+ </li>
18
+ <li class="Itemize dash">
19
+ item 2
20
+ </li>
21
+ </ul>
@@ -0,0 +1,37 @@
1
+
2
+ <html>
3
+ <head>
4
+
5
+ <title>A sample page - My site</title>
6
+ </head>
7
+
8
+ <body>
9
+ <h1>A sample page</h1>
10
+
11
+
12
+ <p>This is a <strong>sample</strong> page.</p>
13
+
14
+
15
+ <p>It has a very small image:
16
+ <img src="images/rote-tiny.png" alt="" /></p>
17
+
18
+
19
+ <p>(Which is the same as the one at the bottom)</p>
20
+
21
+
22
+ <ul>
23
+ <li>You should</li>
24
+ <li>Replace this</li>
25
+ <li>With your doc.</li>
26
+ </ul>
27
+
28
+ <p align='center'><hr width='80%'></p>
29
+ <p align='right'>
30
+ <span style='font-size: 8pt; color: #7c7c90'>Generated with</span><br/>
31
+
32
+
33
+ <a href='http://rote.rubyforge.org/' target='_blank'><img src='images/rote-tiny.png' alt='Rote'/></a>
34
+ </p>
35
+ </body>
36
+ </html>
37
+
data/lib/dokkit.rb ADDED
@@ -0,0 +1,71 @@
1
+ # dokkit.rb - main Dokkit module
2
+ # Copyright (c) 2006 Andrea Fazzi (and contributors)
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ # this software and associated documentation files (the "Software"), to deal in
6
+ # the Software without restriction, including without limitation the rights to
7
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8
+ # of the Software, and to permit persons to whom the Software is furnished to do
9
+ # so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in all
12
+ # copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ # SOFTWARE.
21
+ #
22
+ # See Dokkit for full documentation
23
+
24
+ # require these before gems, because we want to use them from
25
+ # lib/ , or from normal install, if that's how Dokkit was started.
26
+ #
27
+ # If Dokkit has been loaded through Gems, this will automatically
28
+ # come from the right lib directory...
29
+
30
+ require 'rote/rotetasks'
31
+ require 'dokkit/dokkittasks'
32
+ require 'rote/page'
33
+ require 'dokkit/page'
34
+
35
+ # Everything else should come first from Gems, if installed.
36
+ begin
37
+ require 'rubygems'
38
+ rescue LoadError
39
+ nil # just try without then...
40
+ end
41
+
42
+ require 'rake'
43
+
44
+ # Master Dokkit version. Manage this from the Rake release support.
45
+ DOKKITVERSION = '0.1.0'
46
+
47
+ #####
48
+ ## *Dokkit* is a Rote (http://rote.rubyforge.it) and Rake (http://rake.rubyforge.org)
49
+ ## based documentation building tool. It uses the deplate rendering engine to produce
50
+ ## very polished tex file.
51
+ ## page-based documentation, websites, and general textual templates.
52
+ ## It enables embedded Ruby code, layout, and optionally plain-text formatting
53
+ ## (HTML-only at present) to be used to automatically generate output in any
54
+ ## (textual) format from a directory tree containing template files.
55
+ ##
56
+ ## Dokkit was created to manage the documentation of Alca Coop (http://alca.le.it/)
57
+ ## and it is a fairly flexible tool. Dokkit can handle the internal documentation of
58
+ ## your software house.
59
+ ##
60
+ ## Dokkit can be used from the command-line, or in your own +Rakefile+. It
61
+ ## supports both manual and automatic rendering of modified resources, and
62
+ ## can be configured to monitor your source tree for changes.
63
+ ##
64
+ ## See +README+ for general usage information.
65
+ ##
66
+ ## Dokkit is (c)2006 Andrea Fazzi (and contributors). See +LICENSE+ for details.
67
+ module Dokkit
68
+
69
+ # this space intentionally left blank
70
+
71
+ end
@@ -0,0 +1,4 @@
1
+ TEST_FROM_GEM = true
2
+ $: << File.join(File.dirname(__FILE__),'../lib')
3
+ Dir[File.join(File.dirname(__FILE__), '**/test_*.rb')].each { |test| require test }
4
+
@@ -0,0 +1,46 @@
1
+ begin
2
+ require 'rubygems'
3
+ rescue LoadError
4
+ nil
5
+ end
6
+
7
+ # make sure we're testing this version, not an installed Gem!
8
+ $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__),'../lib'))
9
+
10
+ require 'test/unit'
11
+ require 'rote/page'
12
+ require 'dokkit/filters/deplate'
13
+
14
+ DPLTEST = <<-EOM
15
+ * Heading 1
16
+ hic sunt leones
17
+ - item 1
18
+ - item 2
19
+ EOM
20
+
21
+ DPLTEXEXPECT = <<-EOM
22
+
23
+ \\section{Heading 1}
24
+ \\label{hd001}
25
+ hic sunt leones
26
+
27
+ \\begin{itemize}
28
+ \\item item 1
29
+ \\item item 2
30
+ \\end{itemize}
31
+ EOM
32
+
33
+ module Dokkit
34
+ class TestFilters < Test::Unit::TestCase
35
+
36
+ ############## filters/deplate #################
37
+ def test_render_tex
38
+ t = Filters::Deplate.new.filter(DPLTEST, nil)
39
+ assert_equal DPLTEXEXPECT, t
40
+ end
41
+
42
+ end
43
+
44
+
45
+ end
46
+
metadata ADDED
@@ -0,0 +1,177 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.11
3
+ specification_version: 1
4
+ name: dokkit
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.1.0
7
+ date: 2006-12-07 00:00:00 +01:00
8
+ summary: Ruby Documentation ToolKit.
9
+ require_paths:
10
+ - lib
11
+ email:
12
+ homepage:
13
+ rubyforge_project:
14
+ description: Dokkit is a documentation toolkit based on Rote.
15
+ autorequire: dokkit
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ authors: []
29
+
30
+ files:
31
+ - lib/dokkit
32
+ - lib/dokkit.rb
33
+ - lib/dokkit/app.rb
34
+ - lib/dokkit/page.rb
35
+ - lib/dokkit/dokkittasks.rb
36
+ - lib/dokkit/filters
37
+ - lib/dokkit/filters.rb
38
+ - lib/dokkit/projects
39
+ - lib/dokkit/builtin.rake
40
+ - lib/dokkit/deplate
41
+ - lib/dokkit/filters/deplate.rb
42
+ - lib/dokkit/projects/invoice
43
+ - lib/dokkit/projects/tech_report
44
+ - lib/dokkit/projects/website
45
+ - lib/dokkit/projects/invoice/doc
46
+ - lib/dokkit/projects/invoice/Rakefile
47
+ - lib/dokkit/projects/invoice/README
48
+ - lib/dokkit/projects/invoice/lib
49
+ - lib/dokkit/projects/invoice/doc/layouts
50
+ - lib/dokkit/projects/invoice/doc/pages
51
+ - lib/dokkit/projects/invoice/doc/res
52
+ - lib/dokkit/projects/invoice/doc/config
53
+ - lib/dokkit/projects/invoice/doc/layouts/invoice.dpltex
54
+ - lib/dokkit/projects/invoice/doc/pages/COMMON.rb
55
+ - lib/dokkit/projects/invoice/doc/pages/invoice.rb
56
+ - lib/dokkit/projects/invoice/doc/pages/invoice.yamltex
57
+ - lib/dokkit/projects/invoice/doc/res/images
58
+ - lib/dokkit/projects/invoice/doc/res/tex
59
+ - lib/dokkit/projects/invoice/doc/res/tex/images
60
+ - lib/dokkit/projects/invoice/doc/res/tex/include
61
+ - lib/dokkit/projects/invoice/doc/res/tex/deplate.sty
62
+ - lib/dokkit/projects/invoice/doc/res/tex/images/logo.eps
63
+ - lib/dokkit/projects/invoice/doc/res/tex/include/deplate.sty
64
+ - lib/dokkit/projects/invoice/doc/res/tex/include/layout.inc
65
+ - lib/dokkit/projects/invoice/doc/res/tex/include/macro.inc
66
+ - lib/dokkit/projects/invoice/doc/res/tex/include/packages.inc
67
+ - lib/dokkit/projects/invoice/doc/config/company.yaml
68
+ - lib/dokkit/projects/invoice/doc/config/customer.yaml
69
+ - lib/dokkit/projects/invoice/lib/invoice.rb
70
+ - lib/dokkit/projects/tech_report/doc
71
+ - lib/dokkit/projects/tech_report/Rakefile
72
+ - lib/dokkit/projects/tech_report/README
73
+ - lib/dokkit/projects/tech_report/lib
74
+ - lib/dokkit/projects/tech_report/doc/layouts
75
+ - lib/dokkit/projects/tech_report/doc/pages
76
+ - lib/dokkit/projects/tech_report/doc/res
77
+ - lib/dokkit/projects/tech_report/doc/config
78
+ - lib/dokkit/projects/tech_report/doc/layouts/report.dpltex
79
+ - lib/dokkit/projects/tech_report/doc/pages/COMMON.rb
80
+ - lib/dokkit/projects/tech_report/doc/pages/report.dpltex
81
+ - lib/dokkit/projects/tech_report/doc/pages/report.rb
82
+ - lib/dokkit/projects/tech_report/doc/pages/report.inc
83
+ - lib/dokkit/projects/tech_report/doc/res/images
84
+ - lib/dokkit/projects/tech_report/doc/res/tex
85
+ - lib/dokkit/projects/tech_report/doc/res/attachments
86
+ - lib/dokkit/projects/tech_report/doc/res/tex/images
87
+ - lib/dokkit/projects/tech_report/doc/res/tex/include
88
+ - lib/dokkit/projects/tech_report/doc/res/tex/report.bib
89
+ - lib/dokkit/projects/tech_report/doc/res/tex/images/logo.eps
90
+ - lib/dokkit/projects/tech_report/doc/res/tex/include/deplate.sty
91
+ - lib/dokkit/projects/tech_report/doc/res/tex/include/layout.inc
92
+ - lib/dokkit/projects/tech_report/doc/res/tex/include/macro.inc
93
+ - lib/dokkit/projects/tech_report/doc/res/tex/include/packages.inc
94
+ - lib/dokkit/projects/tech_report/doc/res/attachments/attachment_1
95
+ - lib/dokkit/projects/tech_report/doc/res/attachments/attachment_2
96
+ - lib/dokkit/projects/tech_report/doc/config/company.yaml
97
+ - lib/dokkit/projects/tech_report/doc/config/tech_report.yaml
98
+ - lib/dokkit/projects/tech_report/lib/tech_report.rb
99
+ - lib/dokkit/projects/website/doc
100
+ - lib/dokkit/projects/website/Rakefile
101
+ - lib/dokkit/projects/website/README
102
+ - lib/dokkit/projects/website/html
103
+ - lib/dokkit/projects/website/doc/pages
104
+ - lib/dokkit/projects/website/doc/res
105
+ - lib/dokkit/projects/website/doc/layouts
106
+ - lib/dokkit/projects/website/doc/pages/COMMON.rb
107
+ - lib/dokkit/projects/website/doc/pages/index.rb
108
+ - lib/dokkit/projects/website/doc/pages/index.thtml
109
+ - lib/dokkit/projects/website/doc/pages/deplate.dplhtml
110
+ - lib/dokkit/projects/website/doc/res/images
111
+ - lib/dokkit/projects/website/doc/res/images/rote-tiny.png
112
+ - lib/dokkit/projects/website/doc/layouts/normal.thtml
113
+ - lib/dokkit/projects/website/html/index.html
114
+ - lib/dokkit/projects/website/html/deplate.html
115
+ - lib/dokkit/projects/website/html/images
116
+ - lib/dokkit/projects/website/html/images/rote-tiny.png
117
+ - lib/dokkit/deplate/fmt
118
+ - lib/dokkit/deplate/fmt/latex-notemplate.rb
119
+ - lib/dokkit/deplate/fmt/html-notemplate.rb
120
+ - bin/dokkit
121
+ - CONTRIBUTORS
122
+ - DONE
123
+ - LICENSE
124
+ - README
125
+ - Rakefile
126
+ - TODO
127
+ - tests/gem_tests.rb
128
+ - tests/test_filters.rb
129
+ test_files:
130
+ - tests/gem_tests.rb
131
+ rdoc_options: []
132
+
133
+ extra_rdoc_files:
134
+ - README
135
+ executables:
136
+ - dokkit
137
+ extensions: []
138
+
139
+ requirements: []
140
+
141
+ dependencies:
142
+ - !ruby/object:Gem::Dependency
143
+ name: deplate
144
+ version_requirement:
145
+ version_requirements: !ruby/object:Gem::Version::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: "0.8"
150
+ version:
151
+ - !ruby/object:Gem::Dependency
152
+ name: rote
153
+ version_requirement:
154
+ version_requirements: !ruby/object:Gem::Version::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: 0.3.2.2
159
+ version:
160
+ - !ruby/object:Gem::Dependency
161
+ name: rake
162
+ version_requirement:
163
+ version_requirements: !ruby/object:Gem::Version::Requirement
164
+ requirements:
165
+ - - ">"
166
+ - !ruby/object:Gem::Version
167
+ version: 0.0.0
168
+ version:
169
+ - !ruby/object:Gem::Dependency
170
+ name: syntax
171
+ version_requirement:
172
+ version_requirements: !ruby/object:Gem::Version::Requirement
173
+ requirements:
174
+ - - ">"
175
+ - !ruby/object:Gem::Version
176
+ version: 0.0.0
177
+ version: