Public...Builder(3pm)

✨ Publican::Builder β€” the module that turns XML into literally every format πŸ’…

okay bestie, so this is Publican::Builder, a 3pm page from the User Contributed Perl Documentation section, and it's here to help you Convert XML to various output formats. it's giving toolchain royalty, no cap. πŸ‘‘


🌸 NAME 🌸

Publican::Builder β€” a module to Convert XML to various output formats. that's the whole vibe. it takes your XML and makes it into other stuff. iconic behaviour honestly.


πŸŽ€ SYNOPSIS πŸŽ€

here's how you summon it, bestie:

use Publican::Builder;
my $builder = Publican::Builder->new();
$builder->clean_ids();

look at her. three lines. main character energy. πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

Manipulate XML and convert to other formats.

that's it. that's the description. short, sweet, and it does exactly what it says on the tin. 🫢


⭐ INTERFACE ⭐

okay so here's every single thing this baby can do, and I mean every single one, don't skip, iykyk:

🌈 new

Create a new Publican::Builder object.

the origin story. every great builder starts here. ✨

🌈 build

Transform the source in to another format.

Valid formats: eclipse epub html html-single html-desktop man pdf txt

that's eight formats, bestie. EIGHT. she's versatile. she contains multitudes. πŸ”₯

🌈 del_unwanted_dirs

Callback that deletes all unwanted directories from the given directory tree. Used to delete CVS and SVN files from the working directories.

the cleanup crew. bye bye CVS, bye bye SVN, don't let the door hit you. πŸ’€

🌈 del_unwanted_xml

Callback that deletes all unwanted xml from the given directory tree.

same energy, but for the XML. ruthless. we love a decisive queen. πŸ™ˆ

🌈 validate_xml

Ensure the XML validates against the DTD.

and if you need to debug the XML catalogs, do this:

export XML_DEBUG_CATALOG=1

then test...

unset XML_DEBUG_CATALOG

turn it on, poke around, turn it off. periodt. πŸŽ€

🌈 package_brand

Create the structure for the distributed files and save it as a tar.gz file

🌈 package_home

Package a book for use as a Publican Website home page.

making it cozy on the homepage. 🏠

🌈 build_rpm

Build an srpm for books and brands.

🌈 package

Create the structure for the distributed files and save it as a tar.gz file

Creates RPM Specfile and build SRPM.

TODO: Consider handling other package formats, deb etc.

note the TODO bestie β€” right now it's RPM-flavoured, and deb and friends are just a dream. πŸ’­

🌈 web_labels

Determine if the labels use in the web navigation are different from the names used for packaging.

This should be sub-classed.

🌈 setup_xml

Create the proper directory structure for the XML, including copying in Brand files.

This should be sub-classed.

🌈 clean_ids

Travers over the source XML and update the id's to match the standard format.

Updates all existing PO files with the new xref links.

This should be sub-classed.

the glow-up pass for your ids. xref links stay valid, nothing breaks, we love a considerate icon. πŸ’…

🌈 change_log

Generate an RPM style change log from $xml_lang/Revision_History.xml

This should be sub-classed.

🌈 get_books

Fetch all the books for a set from a repo.

Supported Repos: SVN

just SVN for now, bestie. just SVN. 🧚

🌈 build_set_books

Prepare XML from sub books for Remote Sets


😭 DIAGNOSTICS 😭

the "uh oh" section. here's what it yells at you:

  • "unknown args %s" β€” All subs with named parameters will return this error when unexpected named arguments are provided. like, who is she? we don't know her. πŸ’€
  • "%s is a required argument" β€” Any sub with a mandatory parameter will return this error if the parameter is undef. you forgot the thing. the thing is required. it's giving consequences. 🫠

πŸ’œ CONFIGURATION AND ENVIRONMENT πŸ’œ

Publican requires no configuration files or environment variables.

no setup, no .rc files, no environment drama. she just works. low maintenance queen. πŸ‘‘


πŸ¦‹ DEPENDENCIES πŸ¦‹

she leans on her friends, and honestly, same. here's the whole squad:

Carp version Config::Simple Publican Publican::XmlClean Publican::Translate File::Path File::pushd File::Find Cwd Archive::Tar DateTime DateTime::Format::DateParse Syntax::Highlight::Engine::Kate HTML::TreeBuilder HTML::FormatText Term::ANSIColor POSIX

that's the group chat. πŸ’¬βœ¨


🌸 INCOMPATIBILITIES 🌸

None reported.


⚠️ BUGS AND LIMITATIONS ⚠️

No bugs have been reported.

Please report any bugs or feature requests to "publican-list@redhat.com", or through the web interface at <https://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Publican&component=publican>.

found a bug? TELL THEM. don't just suffer in silence, bestie, the mailing list and the Bugzilla link are right there. πŸ’–

πŸ‘‘ AUTHOR πŸ‘‘

Jeff Fearn "<jfearn@redhat.com>"


πŸ’Œ the sign-off πŸ’Œ

and that's the whole page, bestie! this one's from perl v5.26.2, dated 2018-07-08, and it lives under Public...Builder(3pm). stay validating, stay building, and remember: no configuration files, no environment variables, no problems. slay. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from