DocSet.pm

filter: Statementstmt 100% 1 / 1 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 1 / 1 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« DocSet/Template/Plugin/NavigateCache.pm ↑ Summary
1 package DocSet;
2  
3 1 $VERSION = '0.19';
4  
5 =head1 NAME
6  
7 DocSet - documentation projects builder in HTML, PS and PDF formats
8  
9 =head1 SYNOPSIS
10  
11 docset_build [options] base_full_path relative_to_base_config_file_location
12  
13 Options:
14  
15 -h this help
16 -v verbose
17 -i podify pseudo-pod items (s/^* /=item */)
18 -s create the splitted html version (not implemented)
19 -t create tar.gz (not implemented)
20 -p generate PS file
21 -d generate PDF file
22 -f force a complete rebuild
23 -a print available hypertext anchors (not implemented)
24 -l perform L<> links validation in pod docs
25 -e slides mode (for presentations) (not implemented)
26 -m executed from Makefile (forces rebuild,
27 no PS/PDF file,
28 no tgz archive!)
29  
30 =head1 DESCRIPTION
31  
32 This package builds a docset from sources in different formats. The
33 generated documents can be all nicely interlinked and to have the same
34 look and feel.
35  
36 Currently it knows to handle input formats:
37  
38 * POD
39 * HTML
40  
41 and knows to generate:
42  
43 * HTML
44 * PS
45 * PDF
46  
47 =head2 Modification control
48  
49 Each output mode maintains its own cache (per docset) which is used
50 when certain source documents weren't modified since last build and
51 the build is running in a non-force-rebuild mode.
52  
53 =head2 Definitions:
54  
55 * Chapter is a single document (file).
56  
57 * Link is an URL
58  
59 * Docset is a collection of docsets, chapters and links.
60  
61 =head2 Application Specific Features
62  
63 =over
64  
65 =item 1
66  
67 META: not ported yet!
68  
69 Generate a split version HTML, creating html file for each pod
70 section, and having everything interlinked of course. This version is
71 used best for the search.
72  
73 =item 1
74  
75 Complete the POD on the fly from the files in POD format. This is used
76 to ease the generating of the presentations slides, so one can use
77 C<*> instead of a long =over/=item/.../=item/=back strings. The rest
78 is done as before. Take a look at the special version of the html2ps
79 format to generate nice slides in I<conf/html2ps-slides.conf>.
80  
81 =item 1
82  
83 If you turn the slides mode on, it automatically turns the C<-i> (C<*>
84 bullets preprocessing) mode and does a page break before each =head
85 tag.
86  
87 =back
88  
89 =head2 Examples
90  
91 The package includes two fully working examples in the I<examples/>
92 directory.
93  
94 =over
95  
96 =item site
97  
98 This example demonstrates a shrinked version of perl.apache.org (which
99 is genrated entirely by DocSet), with many docs removed or reduced to
100 the mininumum. There are still quite a lot of documents left so you
101 can see the big picture. Read I<examples/site/README> for more
102 information.
103  
104 =item presentation
105  
106 This example demonstrates how to build presentations handouts and
107 slides using DocSet. Read I<examples/presentation/README> for more
108 information.
109  
110 =back
111  
112 =head2 Look-n-Feel Customization
113  
114 You can customise the look and feel of the ouput by adjusting the
115 templates in the directory I<examples/site/tmpl/custom>.
116  
117 You can change look and feel of the PS (PDF) versions by modifying
118 I<examples/site/conf/html2ps.conf>. Be careful that if your
119 documentation that you want to put in one PS or PDF file is very big
120 and you tell html2ps to put the TOC at the beginning you will need
121 lots of memory because it won't write a single byte to the disk before
122 it gets all the HTML markup converted to PS.
123  
124  
125 =head1 CONFIGURATION
126  
127 All you have to prepare is a single config file that you then pass as
128 an argument to C<docset_build>:
129  
130 % docset_build [options] base_full_path relative_to_base_config_file_location
131  
132 Every directory in the source tree may have a configuration file,
133 which designates a docset's root. See the I<config> files for
134 examples. Usually the file in the root (I<examples/site/src>) sets
135 operational directories and other arguments, which you don't have to
136 repeat in sub-docsets. You want to redefine the build attributes in
137 nested docsets if you want to override certain configuration
138 attributes. Modify these files to suit your documentation project
139 layout.
140  
141 Note that the smart I<examples/site/bin/build> script automatically
142 locates your project's directory, so you can move your project around
143 filesystem without changing anything. So you really build with:
144  
145 % bin/build [options]
146  
147 I<examples/site/README> explains the layout of the directories.
148  
149 C<DocSet::Config> manpage explains the layout of the configuration
150 file.
151  
152 =head1 Extending
153  
154 Read the other manpages for more information about how to extend
155 Docset.
156  
157 =head1 PREREQUISITES
158  
159 The following are the optional prerequisites:
160  
161 =over 4
162  
163 =item * ps2pdf
164  
165 Needed to generate the PDF version.
166  
167 =item * Storable
168  
169 Available from CPAN (http://cpan.org/) and is a part of the core Perl
170 distribution of the Perl 5.8.0 and higher.
171  
172 Allows source modification control, so if you modify only one file you
173 will not have to rebuild everything to get the updated HTML/PS/PDF
174 files.
175  
176 =back
177  
178 =head1 SUPPORT
179  
180 Notice that this tool relies on two tools (C<ps2pdf> and C<html2ps>)
181 which I don't support, since I didn't write them. So if you have any
182 problem first make sure that it's not a problem of these tools.
183  
184 Note that while C<html2ps> is included in this distribution, it's
185 written in the old style Perl, so if you have patches send them along,
186 but I won't try to fix/modify this code otherwise. For more info see:
187 http://www.tdb.uu.se/~jan/html2ps.html
188  
189 =head1 BUGS
190  
191 Huh? Probably many...
192  
193 =head1 QUESTIONS
194  
195 Questions can be asked at the template-docset mailing list. For
196 mailing list archives and subscription information please see:
197 http://template-toolkit.org/mailman/listinfo/template-docset
198  
199 =head1 AUTHORS
200  
201 Stas Bekman E<lt>stas (at) stason.orgE<gt>
202  
203 =head1 SEE ALSO
204  
205 perl(1), Pod::POM(3), Pod::HTML(3), html2ps(1), ps2pod(1), Storable(3)
206  
207 =head1 COPYRIGHT
208  
209 This program is distributed under the Artistic License, like the Perl
210 itself.
211  
212 =cut
« DocSet/Template/Plugin/NavigateCache.pm ↑ Summary