1Publican::WebSite(3) User Contributed Perl Documentation Publican::WebSite(3)
2
3
4
6 Publican::WebSite - Manage a documentation website
7
9 This document describes Publican::WebSite version 0.0.1
10
12 use Publican::WebSite;
13
14 my $ws = Publican::WebSite::new();
15
16 $ws->add($product, $version, $name, $format);
17
18 foreach my $entry ($ws->list()) { ... }
19
20 $ws->del($product, $version, $name, $format);
21
24 new
25 Create a Publican::WebSite object...
26
27 add_entry
28 Add an entry to the current Publican::WebSite DB...
29
30 Returns number of rows added. Should be 1 for success, 0 for failure.
31
32 update_entry
33 Update an existing entry in the current Publican::WebSite DB...
34
35 Returns number of rows added. Should be 1 for success, 0 for failure.
36
37 update_or_add_entry
38 Update an existing entry if it esists, else create a new entry.
39
40 del_entry
41 Delete an entry from the current Publican::WebSite DB...
42
43 Returns number of rows deleted. Should be 1 for success, 0 for failure.
44
45 get_entry_id
46 Get the ID of a book from the Publican::WebSite DB.
47
48 Returns the ID or NULL.
49
50 get_hash_ref
51 Returns a reference to a has of all books for the selected language.
52
53 get_lang_list
54 Returns an array ref of distinct, sorted, languages.
55
56 regen_all_toc
57 Update the toc html files for every language.
58
59 report
60 Returns a string containing the current database statistics.
61
62 validate
63 Validate the database entries against the RPM database.
64
65 TODO should also/instead compare entires aginst web site files?
66
67 v_sort
68 Sort version strings in to correct order, handles X, X.Y, and X.Y.Z
69 formats.
70
71 i_sort
72 Sort strings case insensitvly.
73
74 toc_path
75 Return the full toc path.
76
77 xml_dump
78 Generate an XML dump, and a zip of the dump if required, of the
79 Database.
80
81 search_string
82 Returns a string for the web page search box.
83
84 lang_name
85 Returns a string of the localise name for a language. e.g. fr-FR =>
86 Francais
87
88 splash_pages
89 Main function for generating splash pages for web 2 style.
90
91 write_books_index
92 Writes an index page for a book for web 2 style.
93
94 write_language_index
95 Writes an index page for a language for web 2 style.
96
97 write_product_index
98 Writes an index page for a product for web 2 style.
99
100 write_product_menu
101 Writes a menu page for a product for web 2 style.
102
103 write_version_index
104 Writes an index page for a for web 2 style.
105
106 write_language_labels
107 Writes a javascript file with an associative array of labels.
108
109 MigrateDB
110 Migrate a website DataBase from Publican < 3 to Publican 3.
111
112 insensitive_sort
113 Sort strings in a case insensitive order.
114
115 version_sort
116 Sort version strings in correct order. Handles X Vs X.Y Vs X.Y.Z.
117
119 Jeff Fearn "<jfearn@redhat.com>"
120
122 Copyright (c) 2007, Jeff Fearn "<jfearn@redhat.com>". All rights
123 reserved.
124
125 This module is free software; you can redistribute it and/or modify it
126 under the same terms as Perl itself. See perlartistic.
127
129 BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
130 FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
131 WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
132 PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
133 EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
134 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
135 ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
136 YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
137 NECESSARY SERVICING, REPAIR, OR CORRECTION.
138
139 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
140 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
141 REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
142 TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
143 CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
144 SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
145 RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
146 FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
147 SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
148 DAMAGES.
149
151 Hey! The above document had some coding errors, which are explained
152 below:
153
154 Around line 2144:
155 Non-ASCII character seen before =encoding in 'Francais'. Assuming
156 UTF-8
157
158
159
160perl v5.16.3 2014-12-15 Publican::WebSite(3)