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 πŸ’œ


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