Public...WebSite(3pm)
π Publican::WebSite π
okay bestie, so this is a Perl module β that's what the 3pm on the end means, it's a library thing not a command thing β and it's literally all about running a documentation website. Let's get into it π«Ά
β¨ NAME β¨
Publican::WebSite β manages a documentation website. that's it, that's the whole vibe. π
π SYNOPSIS π
use Publican::WebSite;
yeah that's genuinely all you need to write, iconic. β¨
πΈ DESCRIPTION πΈ
It builds the static navigation content for a Publican Web Site. so like, the bones of your site's nav? this module is the one making it happen. periodt. π
π¦ INTERFACE π¦
here's every single method, in order, no skips, no shortcuts, we're doing this properly. π§
new
Creates a Publican::WebSite object. it's giving constructor energy. β¨
add_entry
Adds an entry to the current Publican::WebSite DB. π
Returns the number of rows added. Should be 1 for success, 0 for failure. so if you get a zero, that's a no from the database, bestie. π
update_entry
Updates an existing entry in the current Publican::WebSite DB. π₯
Returns the number of rows added. Should be 1 for success, 0 for failure. same deal as above. π
update_or_add_entry
Updates an existing entry if it exists, else creates a new one. it's flexible like that, we love an adaptable icon. π
del_entry
Deletes an entry from the current Publican::WebSite DB. π
Returns the number of rows deleted. Should be 1 for success, 0 for failure. (yes, deleted, not added β read carefully bestie, i got you. π)
get_entry_id
Gets the ID of a book from the Publican::WebSite DB.
Returns the ID or NULL. π
get_hash_ref
Returns a reference to a hash of all books for the selected language. π
get_lang_list
Returns an array ref of distinct, sorted, languages. tidy and alphabetical, the way it should be. β¨
regen_all_toc
Updates the toc html files for every language. every single one. no language left behind. π
regen_all_toc ... jk it's not twice lol β moving on. π
report
Returns a string containing the current database statistics. numbers, but make it a string. π
validate
Validates the database entries against the RPM database. β
TODO: should also/instead compare entries against web site files? (their question, not mine, i'm just passing it along. π)
v_sort
Sorts version strings into the correct order, handles X, X.Y, and X.Y.Z formats. πΈ
i_sort
Sorts strings case insensitively. π₯
toc_path
Returns the full toc path. π¦
xml_dump
Generates an XML dump, and a zip of the dump if required, of the Database. π
search_string
Returns a string for the web page search box. π
lang_name
Returns a string of the localised name for a language. e.g. fr-FR => Francais. so cute, so international. π
splash_pages
Main function for generating splash pages for web 2 style. main character energy fr fr. π
write_books_index
Writes an index page for a book for web 2 style. β¨
write_language_index
Writes an index page for a language for web 2 style. π
write_product_index
Writes an index page for a product for web 2 style. π
write_product_menu
Writes a menu page for a product for web 2 style. π
write_version_index
Writes an index page for a for web 2 style. (yes, the sentence literally just says "a" and then moves on β i'm not gonna invent the missing noun for you, that's a mystery for the ages. π)
write_language_labels
Writes a javascript file with an associative array of labels. π¦
MigrateDB
Migrate a website DataBase from Publican < 3 to Publican 3. glow-up time for your old database. π
insensitive_sort
Sorts strings in a case insensitive order. π₯
version_sort
Sorts version strings in correct order. Handles X vs X.Y vs X.Y.Z. β
get_splash
Returns the splash page header as a HTML chunk. πΈ
site_params_as_docbook
Returns the site parameters as a docbook chunk, used for documenting options. π
π«Ά AUTHOR π«Ά
Jeff Fearn "<jfearn@redhat.com>" β thank you for your service king π
π LICENCE AND COPYRIGHT π
Copyright (c) 2007, Jeff Fearn "<jfearn@redhat.com>". All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
π DISCLAIMER OF WARRANTY π
okay bestie this part is in all caps in the original and i am NOT toning it down, this is legally important:
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
fr fr bestie, free software means you take the risk, that's the deal. π
and that's the whole page!! this one came from perl v5.26.2, dated 2018-07-08, and it's the Public...WebSite(3pm) manual page. slay, go build your website. πβ¨
π¦ where this page comes from
- debian bookworm: publican 4.3.2-3 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- ubuntu jammy: publican 4.3.2-3 Β· Artistic-1.0-Perl OR GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms