dokkit 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. data/CHANGES +15 -1
  2. data/LICENSE +673 -19
  3. data/README +32 -0
  4. data/Rakefile +59 -25
  5. data/bin/dokkit +48 -38
  6. data/lib/dokkit/#render_task_factory.rb# +94 -0
  7. data/lib/dokkit/app.rb +212 -257
  8. data/lib/dokkit/deplate/fmt/latex-notemplate.rb +3 -1
  9. data/lib/dokkit/dokkittasks.rb +45 -15
  10. data/lib/dokkit/filters/deplate.rb +11 -5
  11. data/lib/dokkit/hash.rb +41 -0
  12. data/lib/dokkit/models/Rakefile.tpl +9 -0
  13. data/lib/dokkit/models/share/builtin.rf +28 -0
  14. data/lib/dokkit/page.rb +161 -20
  15. data/lib/dokkit/render_task_factory.rb +91 -0
  16. data/lib/dokkit.rb +35 -42
  17. data/tests/data/output/simple_document/README +57 -0
  18. data/tests/data/output/simple_document/Rakefile +7 -0
  19. data/tests/data/output/simple_document/doc/config/simple_document.yaml +5 -0
  20. data/tests/data/output/simple_document/doc/pages/simple_document.dpl +12 -0
  21. data/{lib/dokkit/projects/website → tests/data/output/website_project}/Rakefile +2 -1
  22. data/tests/data/projects/simple-document/README +57 -0
  23. data/tests/data/projects/simple-document/Rakefile +22 -0
  24. data/tests/data/projects/simple-document/doc/config/author.yaml +4 -0
  25. data/tests/data/projects/simple-document/doc/config/model.yaml +18 -0
  26. data/tests/data/projects/simple-document/doc/config/simple_document.yaml +6 -0
  27. data/tests/data/projects/simple-document/doc/layouts/another_simple_document.html +8 -0
  28. data/tests/data/projects/simple-document/doc/layouts/another_simple_document.tex +10 -0
  29. data/tests/data/projects/simple-document/doc/layouts/layout_with_custom_name.html +8 -0
  30. data/tests/data/projects/simple-document/doc/layouts/semantic.cache +23 -0
  31. data/tests/data/projects/simple-document/doc/pages/COMMON.yaml +23 -0
  32. data/tests/data/projects/simple-document/doc/pages/another_simple_document.dpl +12 -0
  33. data/tests/data/projects/simple-document/doc/pages/simple_document.dpl +12 -0
  34. data/tests/data/projects/simple-document/doc/pages/simple_document_without_layout.dpl +12 -0
  35. data/tests/data/projects/simple-document/doc/pages/subdir/COMMON.yaml +4 -0
  36. data/tests/data/projects/simple-document/doc/pages/subdir/simple_document_in_subdir.dpl +12 -0
  37. data/tests/data/projects/simple-document/doc/pages/subdir/simple_document_in_subdir.yaml +3 -0
  38. data/tests/data/projects/simple-document/doc/pages/subdir/subdir/COMMON.yaml +2 -0
  39. data/tests/data/projects/simple-document/doc/pages/subdir/subdir/another_simple_document_in_subdir.dpl +12 -0
  40. data/tests/data/projects/simple-document/doc/pages/yet_another_simple_document.dpl +12 -0
  41. data/tests/data/projects/simple-document/doc/pages/yet_another_simple_document.yaml +8 -0
  42. data/tests/spec_page.rb +25 -0
  43. data/tests/test.rb +2 -0
  44. data/tests/test_application.rb +40 -0
  45. data/tests/test_builtin_tasks.rb +37 -0
  46. data/tests/test_config.rb +108 -0
  47. data/tests/test_core.rb +12 -0
  48. data/tests/test_dokkit_commandline.rb +18 -0
  49. data/tests/test_exception.rb +7 -0
  50. data/tests/test_filters.rb +1 -1
  51. data/tests/test_layout.rb +64 -0
  52. data/tests/test_options.rb +33 -0
  53. data/tests/test_project_tasks.rb +48 -0
  54. data/tests/test_recursive_merge.rb +42 -0
  55. data/tests/test_task_factory.rb +38 -0
  56. metadata +138 -94
  57. data/Rakefile.old +0 -62
  58. data/lib/dokkit/builtin.rake +0 -55
  59. data/lib/dokkit/projects/invoice/Rakefile +0 -100
  60. data/lib/dokkit/projects/invoice/doc/config/company.yaml +0 -12
  61. data/lib/dokkit/projects/invoice/doc/config/customer.yaml +0 -4
  62. data/lib/dokkit/projects/invoice/doc/layouts/invoice.dpltex +0 -90
  63. data/lib/dokkit/projects/invoice/doc/pages/COMMON.rb +0 -12
  64. data/lib/dokkit/projects/invoice/doc/pages/invoice.rb +0 -5
  65. data/lib/dokkit/projects/invoice/doc/pages/invoice.yamltex +0 -16
  66. data/lib/dokkit/projects/invoice/doc/res/tex/deplate.sty +0 -46
  67. data/lib/dokkit/projects/invoice/doc/res/tex/images/logo.eps +0 -209
  68. data/lib/dokkit/projects/invoice/doc/res/tex/include/deplate.sty +0 -46
  69. data/lib/dokkit/projects/invoice/doc/res/tex/include/layout.inc +0 -24
  70. data/lib/dokkit/projects/invoice/doc/res/tex/include/macro.inc +0 -67
  71. data/lib/dokkit/projects/invoice/doc/res/tex/include/packages.inc +0 -51
  72. data/lib/dokkit/projects/invoice/lib/invoice.rb +0 -104
  73. data/lib/dokkit/projects/tech_report/README +0 -49
  74. data/lib/dokkit/projects/tech_report/Rakefile +0 -102
  75. data/lib/dokkit/projects/tech_report/doc/config/company.yaml +0 -13
  76. data/lib/dokkit/projects/tech_report/doc/config/tech_report.yaml +0 -3
  77. data/lib/dokkit/projects/tech_report/doc/layouts/report.dpltex +0 -40
  78. data/lib/dokkit/projects/tech_report/doc/pages/COMMON.rb +0 -12
  79. data/lib/dokkit/projects/tech_report/doc/pages/report.dpltex +0 -37
  80. data/lib/dokkit/projects/tech_report/doc/pages/report.inc +0 -2
  81. data/lib/dokkit/projects/tech_report/doc/pages/report.rb +0 -3
  82. data/lib/dokkit/projects/tech_report/doc/res/attachments/attachment_2 +0 -0
  83. data/lib/dokkit/projects/tech_report/doc/res/tex/images/logo.eps +0 -311
  84. data/lib/dokkit/projects/tech_report/doc/res/tex/include/deplate.sty +0 -46
  85. data/lib/dokkit/projects/tech_report/doc/res/tex/include/layout.inc +0 -24
  86. data/lib/dokkit/projects/tech_report/doc/res/tex/include/macro.inc +0 -67
  87. data/lib/dokkit/projects/tech_report/doc/res/tex/include/packages.inc +0 -48
  88. data/lib/dokkit/projects/tech_report/doc/res/tex/report.bib +0 -4
  89. data/lib/dokkit/projects/tech_report/lib/tech_report.rb +0 -17
  90. data/lib/dokkit/projects/website/README +0 -49
  91. /data/{lib/dokkit/projects/invoice → tests/data/output/website_project}/README +0 -0
  92. /data/{lib/dokkit/projects/website → tests/data/output/website_project}/doc/layouts/normal.thtml +0 -0
  93. /data/{lib/dokkit/projects/website → tests/data/output/website_project}/doc/pages/COMMON.rb +0 -0
  94. /data/{lib/dokkit/projects/website → tests/data/output/website_project}/doc/pages/deplate.dplhtml +0 -0
  95. /data/{lib/dokkit/projects/website → tests/data/output/website_project}/doc/pages/index.rb +0 -0
  96. /data/{lib/dokkit/projects/website → tests/data/output/website_project}/doc/pages/index.thtml +0 -0
  97. /data/{lib/dokkit/projects/website → tests/data/output/website_project}/doc/res/images/rote-tiny.png +0 -0
  98. /data/{lib/dokkit/projects/tech_report/doc/res/attachments/attachment_1 → tests/pages/test.dpltex} +0 -0
@@ -1,12 +0,0 @@
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
-
10
-
11
- # Apply the 'report' layout to all project's document
12
- layout 'invoice.dpltex'
@@ -1,5 +0,0 @@
1
- layout 'invoice.dpltex'
2
- config 'company.yaml'
3
- config 'customer.yaml'
4
-
5
-
@@ -1,16 +0,0 @@
1
- invoice:
2
- id: 0
3
- vat: 20
4
-
5
- services:
6
- - service:
7
- description: |
8
- List:
9
- - Product 1a
10
- - Product 1b
11
- quantity: 1
12
- price: 100
13
- - service:
14
- description: Service 2
15
- quantity: 2
16
- price: 200
@@ -1,46 +0,0 @@
1
- newcommand{customListPrefs}{setlength{parsep}{0cm}setlength{itemsep}{0cm}}
2
- newenvironment{customList}{begin{list}{}{customListPrefs{}}}{end{list}}
3
- newcommand{customItem}[2]{item[#1] #2}
4
-
5
- newenvironment{tasklist}{begin{list}{}{customListPrefs{}}}{end{list}}
6
- newcommand{task}[2]{item[textbf{#1}] #2}
7
-
8
- definecolor{taskA}{rgb}{1,.5,.5}
9
- definecolor{taskB}{rgb}{.5,1,.5}
10
- definecolor{taskC}{rgb}{.5,.5,1}
11
- definecolor{taskD}{rgb}{.5,1,1}
12
- definecolor{taskE}{rgb}{1,.5,1}
13
- definecolor{taskF}{rgb}{1,1,.5}
14
- definecolor{taskdone}{rgb}{.5,.5,.5}
15
-
16
- newcommand{taskdone}[1]{{footnotesizetextcolor{taskdone}{#1}}}
17
- newcommand{taskA}[1]{colorbox{taskA}{#1}}
18
- newcommand{taskB}[1]{colorbox{taskB}{#1}}
19
- newcommand{taskC}[1]{colorbox{taskC}{#1}}
20
- newcommand{taskD}[1]{colorbox{taskD}{#1}}
21
- newcommand{taskE}[1]{colorbox{taskE}{#1}}
22
- newcommand{taskF}[1]{colorbox{taskF}{#1}}
23
-
24
- newcommand{emphStyle}{em}
25
- newcommand{emphSpan}[1]{emph{#1}}
26
- newcommand{boldSpan}[1]{textbf{#1}}
27
- newcommand{remoteSpan}[1]{#1}
28
-
29
- newenvironment{overlayBlock}{}{}
30
- newenvironment{scriptsizeBlock}{scriptsize{}}{}
31
- newenvironment{boxBlock}{}{}
32
- newenvironment{footnotesizeBlock}{footnotesize{}}{}
33
- newenvironment{smallBlock}{small{}}{}
34
- newenvironment{landscapeBlock}{}{}
35
- newenvironment{gridBlock}{}{}
36
- newenvironment{formalBlock}{}{}
37
-
38
- newenvironment{todoBlock}{}{}
39
-
40
- newenvironment{bookBlock}{}{}
41
- newenvironment{booksList}{begin{list}{}{customListPrefs{}}}{end{list}}
42
- newcommand{booksItem}[2]{item[textbf{#1}] #2}
43
-
44
- newenvironment{exampleBlock}{bfseries{}}{}
45
- newenvironment{examplesList}{begin{list}{}{customListPrefs{}}}{end{list}}
46
- newcommand{examplesItem}[2]{item[#1] #2}
@@ -1,209 +0,0 @@
1
- %!PS-Adobe-3.0 EPSF-3.0
2
- %%Creator: GIMP PostScript file plugin V 1,17 by Peter Kirchgessner
3
- %%Title: logo_ufficiale.eps
4
- %%CreationDate: Sat Jan 7 18:00:35 2006
5
- %%DocumentData: Clean7Bit
6
- %%LanguageLevel: 2
7
- %%Pages: 1
8
- %%BoundingBox: 14 14 94 43
9
- %%EndComments
10
- %%BeginProlog
11
- % Use own dictionary to avoid conflicts
12
- 10 dict begin
13
- %%EndProlog
14
- %%Page: 1 1
15
- % Translate for offset
16
- 14.173228346456694 14.173228346456694 translate
17
- % Translate to begin of first scanline
18
- 0 28.346456692913389 translate
19
- 78.910406469461591 -28.346456692913389 scale
20
- % Image geometry
21
- 103 37 8
22
- % Transformation matrix
23
- [ 103 0 0 37 0 0 ]
24
- % Strings to hold RGB-samples per scanline
25
- /rstr 103 string def
26
- /gstr 103 string def
27
- /bstr 103 string def
28
- {currentfile /ASCII85Decode filter /RunLengthDecode filter rstr readstring pop}
29
- {currentfile /ASCII85Decode filter /RunLengthDecode filter gstr readstring pop}
30
- {currentfile /ASCII85Decode filter /RunLengthDecode filter bstr readstring pop}
31
- true 3
32
- %%BeginData: 7676 ASCII Bytes
33
- colorimage
34
- o)Ajlq""1WY5a"~>
35
- o)Ajik0W,\Y5a"~>
36
- o)AjghSRt:Y5a"~>
37
- pAYR!jkSM=f\+s0f%/pYZN#F~>
38
- pAYQpU4RN'FaeUUD/5d1ZN#F~>
39
- pAYQlH;-=C-n[)%.PQ#,ZN#F~>
40
- q#:otgt1HDj5T(Wi8<GKg=+UG[/YX~>
41
- q#:oWJT-^CSXc.9Q'7;hIq<?M[/YX~>
42
- q#:oH9e8S'8Oc'33]/TA+VcTT[/YX~>
43
- qYpWqhqJ"h%--@,iS`VMh;$`5h#"P[J,~>
44
- qYq9*Mh%OsUS=HSSXZ"3P)kQYK4f`)[f:j~>
45
- qYq9'><>b_<)QLc845['1bU:&)\u'4[f:j~>
46
- qu6`kf&?Pg%c,OYdG!R;hqm2EgY('K\,Us~>
47
- qu7GfDj7,sVl$;F>utB^Q^!VmMhct4@,&0jJ,~>
48
- qu7GW1.teT>?Y,t0/5":4ub;K-6F*;)U,\jJ,~>
49
- r;RW(f&YuUjkeP(c1]]$^YIc)hVHuAg=asB\Gq'~>
50
- r;RVZCo+,2Ukrn49AjFr)MaWBO,SmKJUCk>\Gq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oEkdN'VjRcp!gVRJ,~>
193
- rVm$!r;"j[pq6dD`65pn]`l=Jp&Fs[]DmB~>
194
- rVm#ro]fs8p_*`H01QoX'*ToHg]-ok]DmB~>
195
- rVm#qoBBU)pBgs,"UY)6"XE$\s7=IHs*t~>
196
- rVlujl,gsD]b8*%a2ZBPf%AX,d`&r7c/\fhkILVC~>
197
- rVluHYWk#D'+u3J2Dn3<Df^)A?nrH59:GdgWk&.[~>
198
- rVluFXZ.s3$5*pu()@c2.l'(E:+H__7$dbYVn)hX~>
199
- qu6lnlJ^FIkj.sB!S@;LrrMc_\c70~>
200
- qu6lTZB]]QXg[s'!H@l6rrLd"\c70~>
201
- qu6lSYE<p?WO)<u!G_E/rrL`t\c70~>
202
- q#CBnV>l&~>
203
- q#:Bmqka=C~>
204
- q#:Bmqka=C~>
205
- %%EndData
206
- showpage
207
- %%Trailer
208
- end
209
- %%EOF
@@ -1,46 +0,0 @@
1
- \newcommand{\customListPrefs}{\setlength{\parsep}{0cm}\setlength{\itemsep}{0cm}}
2
- \newenvironment{customList}{\begin{list}{}{\customListPrefs{}}}{\end{list}}
3
- \newcommand{\customItem}[2]{\item[#1] #2}
4
-
5
- \newenvironment{tasklist}{\begin{list}{}{\customListPrefs{}}}{\end{list}}
6
- \newcommand{\task}[2]{\item[\textbf{#1}] #2}
7
-
8
- \definecolor{taskA}{rgb}{1,.5,.5}
9
- \definecolor{taskB}{rgb}{.5,1,.5}
10
- \definecolor{taskC}{rgb}{.5,.5,1}
11
- \definecolor{taskD}{rgb}{.5,1,1}
12
- \definecolor{taskE}{rgb}{1,.5,1}
13
- \definecolor{taskF}{rgb}{1,1,.5}
14
- \definecolor{taskdone}{rgb}{.5,.5,.5}
15
-
16
- \newcommand{\taskdone}[1]{{\footnotesize\textcolor{taskdone}{#1}}}
17
- \newcommand{\taskA}[1]{\colorbox{taskA}{#1}}
18
- \newcommand{\taskB}[1]{\colorbox{taskB}{#1}}
19
- \newcommand{\taskC}[1]{\colorbox{taskC}{#1}}
20
- \newcommand{\taskD}[1]{\colorbox{taskD}{#1}}
21
- \newcommand{\taskE}[1]{\colorbox{taskE}{#1}}
22
- \newcommand{\taskF}[1]{\colorbox{taskF}{#1}}
23
-
24
- \newcommand{\emphStyle}{\em}
25
- \newcommand{\emphSpan}[1]{\emph{#1}}
26
- \newcommand{\boldSpan}[1]{\textbf{#1}}
27
- \newcommand{\remoteSpan}[1]{#1}
28
-
29
- \newenvironment{overlayBlock}{}{}
30
- \newenvironment{scriptsizeBlock}{\scriptsize{}}{}
31
- \newenvironment{boxBlock}{}{}
32
- \newenvironment{footnotesizeBlock}{\footnotesize{}}{}
33
- \newenvironment{smallBlock}{\small{}}{}
34
- \newenvironment{landscapeBlock}{}{}
35
- \newenvironment{gridBlock}{}{}
36
- \newenvironment{formalBlock}{}{}
37
-
38
- \newenvironment{todoBlock}{}{}
39
-
40
- \newenvironment{bookBlock}{}{}
41
- \newenvironment{booksList}{\begin{list}{}{\customListPrefs{}}}{\end{list}}
42
- \newcommand{\booksItem}[2]{\item[\textbf{#1}] #2}
43
-
44
- \newenvironment{exampleBlock}{\bfseries{}}{}
45
- \newenvironment{examplesList}{\begin{list}{}{\customListPrefs{}}}{\end{list}}
46
- \newcommand{\examplesItem}[2]{\item[#1] #2}
@@ -1,24 +0,0 @@
1
- % Layout
2
-
3
- \newcommand{\layout}[1][]{
4
- \geometry{
5
- left=2cm,
6
- right=2cm,
7
- top=2cm,
8
- bottom=1.7cm,
9
- headheight=1cm,
10
- headsep=1cm,
11
- footskip=1cm,
12
- includeheadfoot}
13
- \pagestyle{fancy}
14
- \fancyhead{}
15
- \fancyfoot{}
16
- \lhead{\includegraphics[height=1cm]{images/logo.eps}}
17
- %\chead{}
18
- %\rhead{\fontfamily{cmss}\large\textbf{#1}\vspace*{\stretch{1}}\normalsize~\textit{(pag. \thepage\ di \pageref{LastPage})}\vspace*{\stretch{1}}}
19
- \rhead{\fontfamily{cmss}\large\textbf{#1}\vspace*{\stretch{1}}\normalsize}
20
- %\cfoot{\fontfamily{cmss}\footnotesize\textbf{Company} $\star$ \textbf{Location} $\star$ \textbf{Tel.} \\\textbf{Fax} $\star$ \textbf{e-mail} $\star$ \textbf{web} $\star$ \normalsize}
21
- \lfoot{\fontfamily{cmss}\scriptsize\textbf{<%= @company %>} $\star$ \textbf{Location} $\star$ \textbf{Tel.} \\\textbf{Fax} $\star$ \textbf{e-mail} $\star$ \textbf{web} $\star$ \normalsize}
22
- \rfoot{\fontfamily{cmss}\textit{pag. \thepage\ / \pageref{LastPage}}}
23
- \renewcommand{\footrulewidth}{0.4pt}
24
- }
@@ -1,67 +0,0 @@
1
- % macro.inc
2
- % ----------
3
- %
4
- % Copyright (C)2005 Alca Coop. a r. l.
5
- %
6
- % This program is free software; you can redistribute it and/or modify
7
- % it under the terms of the GNU General Public License as published by
8
- % the Free Software Foundation; either version 2 of the License, or
9
- % (at your option) any later version.
10
- %
11
- % This program is distributed in the hope that it will be useful,
12
- % but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- % GNU General Public License for more details.
15
- %
16
- % You should have received a copy of the GNU General Public License
17
- % along with this program; if not, write to the Free Software
18
- % Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
- %
20
-
21
-
22
- % ENVIRONMENT
23
- % -----------------------------------------------------------------------------
24
-
25
- % checkboxize
26
- % ------------
27
- % Ambiente per creare elenchi con checkbox (ad esempio per i test di valutazione)
28
- %
29
- \newenvironment{checkboxize}{\renewcommand{\labelitemi}{\(\Box\)}\begin{itemize}}{\end{itemize}}
30
-
31
-
32
- % COMANDI
33
- % -----------------------------------------------------------------------------
34
-
35
- % \firma[lunghezza]{firmatario}
36
- % -------------------
37
- % Argomenti:
38
- % - lunghezza (opzionale, default 7cm)
39
- % - firmatario: ci� che va scritto sopra la linea orizzontale
40
- %
41
- \newcommand{\firma}[2][7cm]{\begin{minipage}{#1}\begin{center}{#2}\\\vspace{1cm}\rule{\textwidth}{0.1mm}\end{center}\end{minipage}}
42
-
43
- % \luogoedata[luogo]
44
- % -------------------
45
- % Argomenti:
46
- % - luogo (opzionale, default linea orizz. di 4 cm)
47
- %
48
- \newcommand{\luogoedata}[1][\rule{4cm}{0.1mm}]{{#1}, l� \rule{0.6cm}{0.1mm}/\rule{0.6cm}{0.1mm}/200\rule{0.3cm}{0.1mm}}
49
-
50
- % \textbox[lunghezza]{testo}
51
- % --------------------
52
- % Argomenti:
53
- % - lunghezza (opzionale, default 7cm)
54
- % - testo
55
- %
56
- \newcommand{\textbox}[2][7cm]{{#2}~\rule{#1}{0.1mm}}
57
-
58
- % \oggetto{oggetto}
59
- % ------------------
60
- % Argomenti:
61
- % - oggetto: l'oggetto...
62
- %
63
- \newcommand{\oggetto}[1]{\noindent\textbf{\underline{OGGETTO: {#1}.}}}
64
-
65
- % ALTRO
66
- % -----------------------------------------------------------------------------
67
- \definecolor{gray50}{gray}{.5}
@@ -1,51 +0,0 @@
1
- % Packages
2
- % -----------------------------------------------------------------------------
3
-
4
- % http://www.tug.org/tex-archive/info/italian/fancyhdr/itfancyhdr.pdf
5
- %
6
- \usepackage{fancyhdr}
7
-
8
- % A nice font
9
- %
10
- \usepackage{palatino}
11
-
12
- \usepackage{setspace}
13
-
14
- % http://www.tug.org/teTeX/tetex-texmfdist/doc/latex/geometry/geometry.pdf
15
- %
16
- \usepackage{geometry}
17
-
18
- % http://www.comp.leeds.ac.uk/andyr/misc/latex/latextutorial4.html
19
- %
20
- \usepackage{multirow}
21
-
22
- % Symbols
23
- %
24
- \usepackage{latexsym}
25
-
26
- \usepackage{lastpage}
27
-
28
- % http://www.ctan.org/tex-archive/macros/latex/required/graphics/grfguide.ps
29
- %
30
- \usepackage{color}
31
-
32
- \usepackage{longtable}
33
-
34
- % http://www.linux.it/~salve/TeX-FAQ/TeX-FAQ-tex.html
35
- %
36
- \usepackage{graphicx}
37
-
38
- % Euro symbol
39
- %
40
- \usepackage{eurosym}
41
-
42
- \usepackage{array}
43
-
44
- % compatibility packages for deplate
45
- \usepackage{hyperref}
46
- \usepackage[square,numbers,sort,super]{natbib}
47
-
48
- \usepackage[italian]{babel}
49
- \usepackage[latin1]{inputenc}
50
-
51
- % -----------------------------------------------------------------------------
@@ -1,104 +0,0 @@
1
- #--
2
- # Invoice class for Dokkit
3
- # (c)2006 Andrea Fazzi (and contributors)
4
- #
5
- # See 'dokkit.rb' or LICENSE for licence information.
6
- #++
7
-
8
- require 'rote'
9
- require 'rote/format'
10
- require 'dokkit/page'
11
-
12
- module Rote
13
-
14
- class Page
15
-
16
- alias old_initialize initialize
17
-
18
- def initialize(template_name, pages_dir = '.', layout_dir = pages_dir, config_dir = pages_dir, &block)
19
-
20
- invoice = YAML::load( File.open(template_name) )
21
-
22
- @services = invoice['services']
23
-
24
- @id = invoice['invoice']['id']
25
- @vat = invoice['invoice']['vat']
26
- @date = invoice['invoice']['date'] || today
27
-
28
- @basic_price = 0
29
- @total_price = 0
30
- @vat_price = 0
31
-
32
- old_initialize(template_name, pages_dir, layout_dir, config_dir, &block)
33
- calc_prices
34
- end
35
-
36
- def do_render!
37
- # Render the page content into the @content_for_layout
38
- unless @template_text.nil?
39
- render_services_tex
40
- end
41
-
42
- # FIXME: Quick fix for incorrect COMMON.rb layout nesting.
43
- # All we do here is reset the layout to be the last layout
44
- # added.
45
- #
46
- # If it turns out that the ability to nest from COMMON/page
47
- # really is useless, we should remove the layout queue entirely,
48
- # and then just have the render layout loop run until
49
- # layout at end == layout at start.
50
- @layout_names = [@layout_names.last] unless layout_names.empty?
51
-
52
- # Do layout _after_ page eval. As we go through this, the layouts
53
- # we load may add to the end of the layout names array, so nested
54
- # layout is supported by just chasing the end of the array until
55
- # it's empty. The process is basically
56
- #
57
- # Page is loaded, calls 'layout' with it's layout.
58
- # During render, that fn is taken, and loaded. Layout code
59
- # again calls 'layout'.
60
- # On next loop iteration, that new filename is loaded, and it's
61
- # code is executed ... and so on.
62
- #
63
- # Each loop puts the result into @content_for_layout, so that
64
- # nested layouts can work just the same as regular.
65
- @layout_names.each do |fn|
66
- txt = load_layout(fn)
67
-
68
- @layout_text ||= txt # legacy support vv0.3.2 v-0.4
69
-
70
- # render into the layout if supplied.
71
- if txt
72
- erb = ERB.new(txt)
73
- erb.filename = fn
74
- @content_for_layout = erb.result(binding)
75
- end
76
- end
77
-
78
- @result = render_post_filters(@content_for_layout)
79
- freeze
80
-
81
- @result
82
- end
83
-
84
- private
85
-
86
- def calc_prices
87
- @services.each { |service| @basic_price += service['service']['quantity'] * service['service']['price'] }
88
- @vat_price = @basic_price / 100 * @vat
89
- @total_price = @basic_price + @vat_price
90
- end
91
-
92
- def today
93
- "#{Date.today.day}.#{Date.today.month}.#{Date.today.year}"
94
- end
95
-
96
- def render_services_tex
97
- @content_for_layout = ""
98
- @services.each do |service|
99
- @content_for_layout += "#{ render_page_filters(service['service']['description'].to_s)} & #{service['service']['quantity']} & #{service['service']['price']} & #{service['service']['price'] * service['service']['quantity']}\\\\ \\hline "
100
- end
101
- end
102
-
103
- end
104
- end
@@ -1,49 +0,0 @@
1
- This is the auto-generated Rote documentation source.
2
-
3
- To render it using Rote's command-line wrapper (ignoring the included
4
- Rakefile), type:
5
-
6
- rote doc
7
-
8
- from the top-level directory (this one).
9
-
10
- To render using the included Rakefile (the result is the same in either
11
- case) type instead:
12
-
13
- rake doc
14
-
15
- If you prefer, you can omit the 'doc' task, since it is configured
16
- as the default.
17
-
18
- In either case, you should see some output as the pages are rendered
19
- and resources copied, and get output in a (created) 'html' directory.
20
- Once you have rendered the site, running the command again will appear
21
- to do nothing, because only changed resources are re-rendered. To
22
- start over:
23
-
24
- (rote|rake) clobber
25
-
26
- Alternatively, modify the page or resource files, and rerun the first
27
- command to transform only the modified resource.
28
-
29
- WHAT NEXT?
30
-
31
- + See what else you can do by typing:
32
-
33
- (rote|rake) --tasks
34
-
35
- rote --usage ( with the command-line wrapper )
36
-
37
- + Modify the included page template and layout to suit your needs.
38
-
39
- + Edit the included Rakefile to add or change tasks, or delete it
40
- if you're sticking with the command-line wrapper.
41
-
42
- + Add more pages and layouts.
43
-
44
- + Start Rote in monitor mode, and have your changes rendered as
45
- you work:
46
-
47
- (rote|rake) doc_monitor
48
-
49
-