PUBLICAN(1p)
π PUBLICAN π
okay bestie, sit down, hydrate, because we're about to talk about publican β a DocBook XML publishing tool. that's the whole NAME section, no cap. it's publican(1p), from the User Contributed Perl Documentation crew. slay.
β¨ VERSION β¨
so like, this document describes publican version 4.0. she's grown, she's evolved π
π SYNOPSIS π
here's how you actually call her:
publican <command options>
publican <action> <action options>
π Command Options π
these are the big-picture flags, the ones that apply at the top level, periodt:
--helpβ shows you the help message π«Ά--manβ shows you the man page (hi, that's this π)--help_actionsβ lists out all the valid actions for you-vβ shows you the version of Publican
π¦ Valid actions are: π¦
here's the full roster, no gatekeeping:
add_revisionβ Add an entry to the revision historybuildβ Transform XML to other formats (pdf, html, html-single, drupal-book, etc)cleanβ Remove all temporary files and directoriesclean_idsβ Run clean ids for source XMLclean_setβ Remove local copies of remote set bookscopy_web_brandβ Copy a brand's installed web content to another sitecreateβ Create a new book, set, or articlecreate_brandβ Create a new brandcreate_siteβ Create a new WebSite in the supplied location.help_configβ Display help text for the configuration fileinstall_bookβ Install a book in to a WebSite.install_brandβ Install a brand to the supplied locationlang_statsβ report PO statisticsmigrate_siteβ Migrate a website DataBase from Publican < 3 to Publican 3.packageβ Package a language for shippingprint_bannedβ Print a list of banned DocBook tagsprint_knownβ Print a list of QA'd DocBook tagsprint_treeβ Print a tree of the xi:includesprint_unusedβ Print a list of unused XML filesprint_unused_imagesβ Print a list of unused Image filesremove_bookβ Remove a book from a WebSite.renameβ Rename a publican bookreportβ Print a readability report for the source text.site_statsβ Report on the contents of a WebSitetrans_dropβ Snapshot the source language for use in translation.update_dbβ Add or remove database entries. Used for processing pre-build books, such as when building packages.update_poβ Update the PO filesupdate_potβ Update the POT filesupdate_siteβ Update an existing sites templates.zt_pullβ Pull translations from Zanata.zt_pushβ Push translations to Zanata.
and if you're lost, run this lil baby:
Run: 'bin/publican <action> --help' for details on action usage
iykyk π
πΈ INTERFACE πΈ
this is the big one, bestie. every action, every flag, laid out. grab a snack π
π§ add_revision
Add an entry to the revision history
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path to Common_Config directory--common_content=sβ Override path to Common_Content directory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.--lang=<LANG>β The language the XML will be written in--revnumber=<REVNUMBER>β Revision number to use for a revision.--date=<DATE>β Date to use for a revision.--member=<MEMBER>β An entry to be added to the revision. Can be specified multiple times.--firstname=<FIRSTNAME>β firstname to use for a revision.--surname=<SURNAME>β surname to use for a revision.--email=<EMAIL>β email to use for a revision.
π₯ build
Transform XML to other formats (pdf, html, html-single, drupal-book, etc)
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path to Common_Config directory--common_content=sβ Override path to Common_Content directory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.--formats=<FORMATS>β Comma-separated list of formats, for example:html,pdf,html-single,html-desktop,txt,epub--langs=<LANGS>β Comma-separated list of languages, for example:en-US,de-DE,all--publishβ Set up built content for publishing--embedtocβ Embed the web site TOC object in the generated HTML--distributed_setβ This flag tells publican the data being processed is a distributed set. Note: do not usedistributed_seton the command line. Publican uses this flag when calling itself to process distributed sets. This is the only safe way this flag can be used.--novalidβ Do not run the DTD validation--src_dir=<SRC_DIR>β Directory to source publican files from.--pdftool=<PDFTOOL>β Override the tool to use when creating PDFs. Valid options arewkhtmltopdfandfop.--pub_dir=<PUB_DIR>β Directory to publish files to. Defaults topublish.
π¨ real talk bestie β do NOT put distributed_set on the command line. that's not the vibe. Publican uses it internally when it calls itself to process distributed sets, and that's the only safe way it can be used. respect the flag, fr fr π
π clean
Remove all temporary files and directories
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path to Common_Config directory--common_content=sβ Override path to Common_Content directory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.--pub_dir=<PUB_DIR>β Directory to publish files to. Defaults topublish.
β¨ clean_ids
Run clean ids for source XML
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path to Common_Config directory--common_content=sβ Override path to Common_Content directory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.
π¦ clean_set
Remove local copies of remote set books
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path to Common_Config directory--common_content=sβ Override path to Common_Content directory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.
π copy_web_brand
Copy a brand's installed web content to another site
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path to Common_Config directory--common_content=sβ Override path to Common_Content directory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.--brand=<BRAND>β The brand to use--site_config=<SITE_CONFIG>β WebSite configuration file to use or create.--old_site_config=<OLD_SITE_CONFIG>β WebSite configuration file to use when copying content between sites.
π create
Create a new book, set, or article
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path to Common_Config directory--common_content=sβ Override path to Common_Content directory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.--name=<NAME>β The name of the book, article, set, or brand--version=<VERSION>β The version of the product--edition=<EDITION>β The edition of the book, article, or set--product=<PRODUCT>β The name of the product--brand=<BRAND>β The brand to use--lang=<LANG>β The language the XML will be written in--type=<TYPE>β The type (book, article, or set)--dtdver=<DTDVER>β The version of the DocBook DTD to use
π create_brand
Create a new brand
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path to Common_Config directory--common_content=sβ Override path to Common_Content directory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.--name=<NAME>β The name of the book, article, set, or brand--lang=<LANG>β The language the XML will be written in
π«Ά create_site
Create a new WebSite in the supplied location.
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path to Common_Config directory--common_content=sβ Override path to Common_Content directory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.--site_config=<SITE_CONFIG>β WebSite configuration file to use or create.--db_file=<DB_FILE>β Override default database file.--toc_path=<TOC_PATH>β Override the default TOC path.--tmpl_path=<TMPL_PATH>β Override the default template path.--lang=<LANG>β The language the XML will be written in
π help_config
Display help text for the configuration file
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path to Common_Config directory--common_content=sβ Override path to Common_Content directory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.
okay we're not done yet bestie, there's more where that came from π
install_book ππ
Install a book in to a WebSite. Basically you've got a book, you've got a website, and this is the lil' matchmaker that gets them together. slay
Options β¨
--helpβ shows you the help message, bestie π«Ά--config=sβ points at a config file that isn't the standard one--common_config=sβ overrides the path to theCommon_Configdirectory--common_content=sβ overrides the path to theCommon_Contentdirectory--nocoloursβ kills the ANSI colourisation of logging--quietβ kills all the logging, every last bit of it--brand_dir=sβ the directory you're sourcing brand files from--site_config=<SITE_CONFIG>β the WebSite configuration file to use or create--lang=<LANG>β the language the XML will be written in
install_brand π
Install a brand to the supplied location β you tell it where, it goes there. no cap.
Options β¨
--helpβ display the help message π--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from--path=<PATH>β/path/to/install/toπ--webβ install the web content for a brand--pub_dir=<PUB_DIR>β directory to publish files to. Defaults topublish.
lang_stats π
report PO statistics β the numbers, the vibes, the translation tea. π
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from--lang=<LANG>β the language the XML will be written in π
migrate_site π§
Migrate a website DataBase from Publican < 3 to Publican 3. glow-up time for your old database, fr fr.
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from--site_config=<SITE_CONFIG>β WebSite configuration file to use or create
package π¦π₯
Package a language for shipping β wrap it up, it's going on a trip.
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from--lang=<LANG>β the language the XML will be written in--desktopβ create a desktop package instead of a web package π»--brewβ push the SRPM to brew πΊ--scratchβ use scratch instead of a tag build--short_sightedβ create the package without using the version in the package name--binaryβ build a binary rpm when running package--waitβ wait for brew to finish building β³--pub_dir=<PUB_DIR>β directory to publish files to. Defaults topublish.
print_banned π«
Print a list of banned DocBook tags β the tags that are, like, so not allowed here.
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from
print_known π
Print a list of QA'd DocBook tags β the tags that did pass the vibe check. π
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from
print_tree π³
Print a tree of the xi:includes β your whole include structure, branching out like the main character it is.
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from
print_unused π
Print a list of unused XML files β all the files just sitting there, not being included by anyone. it's giving neglected. π
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from
print_unused_images πΌοΈ
Print a list of unused Image files β same energy as above but for your pictures. the abandoned gallery. π
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from
remove_book π
Remove a book from a WebSite. β okay so this one does the opposite of install_book. it's the breakup. π
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from--site_config=<SITE_CONFIG>β WebSite configuration file to use or create--lang=<LANG>β the language the XML will be written in
rename βοΈ
Rename a publican book β new name, who dis? π¦
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from--name=<NAME>β the name of the book, article, set, or brand--product=<PRODUCT>β the name of the product--version=<VERSION>β the version of the product
report π
Print a readability report for the source text. β it reads your writing and tells you how it reads. meta, lowkey. β
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from
site_stats π
Report on the contents of a WebSite β the full rundown on what's living in your site. π
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from--site_config=<SITE_CONFIG>β WebSite configuration file to use or create
trans_drop πΈ
Snapshot the source language for use in translation. β freeze frame on the source language so the translators can do their thing. πΈ
Options β¨
--helpβ display the help message--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging--quietβ disable all logging--brand_dir=sβ directory to source brand files from
update_db ποΈ
Add or remove database entries. Used for processing pre-build books, such as when building packages.
Options:
--helpβ shows you the help message, like a little map πΊοΈ--config=sβ use a nonstandard config file--common_config=sβ override the path to theCommon_Configdirectory--common_content=sβ override the path to theCommon_Contentdirectory--nocoloursβ disable ANSI colourisation of logging (so no rainbow logs π)--quietβ disable all logging (shhh π€«)--brand_dir=sβ directory to source brand files from--site_config=<SITE_CONFIG>β WebSite configuration file to use or create--addβ add a database entry--delβ delete a database entry--lang=<LANG>β the language the XML will be written in--product=<PRODUCT>β the name of the product--version=<VERSION>β the version of the product--name=<NAME>β the name of the book, article, set, or brand--formats=<FORMATS>β comma-separated list of formats, for example:html,pdf,html-single,html-desktop,txt,epub--subtitle=<SUBTITLE>β sub title for a book--abstract=<ABSTRACT>β abstract for a book--product_label=<PRODUCT_LABEL>β product label for a book--version_label=<VERSION_LABEL>β version label for a book--name_label=<NAME_LABEL>β name label for a book--sort_order=<SORT_ORDER>β order to sort a book--book_version=<BOOK_VERSION>β the version number of the book being installed.--book_src_lang=<BOOK_SRC_LANG>β the language this translation is based on.
update_po
Update the PO files. π
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path toCommon_Configdirectory--common_content=sβ Override path toCommon_Contentdirectory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.--langs=<LANGS>β Comma-separated list of languages, for example:en-US,de-DE,all--msgmergeβ Use gettext'smsgmergefor POT/PO merging.--firstname=<FIRSTNAME>β firstname to use for a revision.--surname=<SURNAME>β surname to use for a revision.--email=<EMAIL>β email to use for a revision.--previousβ Keep previous msgid when fuzzy matches are detected in PO updates.
update_pot
Update the POT files. β¨
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path toCommon_Configdirectory--common_content=sβ Override path toCommon_Contentdirectory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.
update_site
Update an existing sites templates. π
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path toCommon_Configdirectory--common_content=sβ Override path toCommon_Contentdirectory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.--site_config=<SITE_CONFIG>β WebSite configuration file to use or create.
zt_pull
Pull translations from Zanata. π¦
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path toCommon_Configdirectory--common_content=sβ Override path toCommon_Contentdirectory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.
zt_push
Push translations to Zanata. π
Options:
--helpβ Display help message--config=sβ Use a nonstandard config file--common_config=sβ Override path toCommon_Configdirectory--common_content=sβ Override path toCommon_Contentdirectory--nocoloursβ Disable ANSI colourisation of logging.--quietβ Disable all logging.--brand_dir=sβ Directory to source brand files from.
βοΈ CONFIGURATION AND ENVIRONMENT βοΈ
Publican requires access to wkhtmltopdf or Apache FOP for creating PDF files. Like, if you want PDFs, you gotta have one of these, bestie. No cap. π
π¦ DEPENDENCIES π¦
You need all these modules, periodt. Here's the whole squad:
Archive::Tar Archive::Zip Carp Config::Simple Cwd DBI DateTime
DateTime::Format::DateParse Devel::Cover Encode File::Basename
File::Copy::Recursive File::Find File::Find::Rule File::HomeDir
File::Inplace File::Path File::Spec File::Which File::pushd Getopt::Long
HTML::FormatText HTML::FormatText::WithLinks
HTML::FormatText::WithLinks::AndTables HTML::TreeBuilder
I18N::LangTags::List IO::String Lingua::EN::Fathom List::MoreUtils
List::Util Locale::Language Locale::Maketext::Gettext
Locale::Maketext::Lexicon Locale::Msgfmt Locale::PO Module::Build
Pod::Usage Sort::Versions String::Similarity
Syntax::Highlight::Engine::Kate Template Template::Constants
Term::ANSIColor Test::More Test::Pod Test::Pod::Coverage Text::CSV_XS
Text::Wrap Time::localtime XML::LibXML XML::LibXSLT XML::Simple
XML::TreeBuilder version
π« INCOMPATIBILITIES π«
None reported. So like, no drama? ποΈ
π BUGS AND LIMITATIONS π
Bug list at <https://bugzilla.redhat.com/buglist.cgi?product=Publican&query_format=advanced&resolution=--->.
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&version=$version>.
π AUTHOR π
Jeff Fearn <jfearn@redhat.com> β iconic, periodt. π
And that's the whole vibe, bestie. This page is from perl v5.26.2, dated 2018-07-08, and it's PUBLICAN(1p). Stay slaying with your docs! π
β¨
π¦ 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