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 history
  • build β€” Transform XML to other formats (pdf, html, html-single, drupal-book, etc)
  • clean β€” Remove all temporary files and directories
  • clean_ids β€” Run clean ids for source XML
  • clean_set β€” Remove local copies of remote set books
  • copy_web_brand β€” Copy a brand's installed web content to another site
  • create β€” Create a new book, set, or article
  • create_brand β€” Create a new brand
  • create_site β€” Create a new WebSite in the supplied location.
  • help_config β€” Display help text for the configuration file
  • install_book β€” Install a book in to a WebSite.
  • install_brand β€” Install a brand to the supplied location
  • lang_stats β€” report PO statistics
  • migrate_site β€” Migrate a website DataBase from Publican < 3 to Publican 3.
  • package β€” Package a language for shipping
  • print_banned β€” Print a list of banned DocBook tags
  • print_known β€” Print a list of QA'd DocBook tags
  • print_tree β€” Print a tree of the xi:includes
  • print_unused β€” Print a list of unused XML files
  • print_unused_images β€” Print a list of unused Image files
  • remove_book β€” Remove a book from a WebSite.
  • rename β€” Rename a publican book
  • report β€” Print a readability report for the source text.
  • site_stats β€” Report on the contents of a WebSite
  • trans_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 files
  • update_pot β€” Update the POT files
  • update_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 use distributed_set on 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 are wkhtmltopdf and fop.
  • --pub_dir=<PUB_DIR> β€” Directory to publish files to. Defaults to publish.
🚨 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 to publish.

✨ 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 the Common_Config directory
  • --common_content=s β€” overrides the path to the Common_Content directory
  • --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 the Common_Config directory
  • --common_content=s β€” override the path to the Common_Content directory
  • --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 to publish.

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 the Common_Config directory
  • --common_content=s β€” override the path to the 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 🌈

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 the Common_Config directory
  • --common_content=s β€” override the path to the 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

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 the Common_Config directory
  • --common_content=s β€” override the path to the 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
  • --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 to publish.

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 the Common_Config directory
  • --common_content=s β€” override the path to the Common_Content directory
  • --nocolours β€” disable ANSI colourisation of logging
  • --quiet β€” disable all logging
  • --brand_dir=s β€” directory to source brand files from

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 the Common_Config directory
  • --common_content=s β€” override the path to the Common_Content directory
  • --nocolours β€” disable ANSI colourisation of logging
  • --quiet β€” disable all logging
  • --brand_dir=s β€” directory to source brand files from

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 the Common_Config directory
  • --common_content=s β€” override the path to the Common_Content directory
  • --nocolours β€” disable ANSI colourisation of logging
  • --quiet β€” disable all logging
  • --brand_dir=s β€” directory to source brand files from

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 the Common_Config directory
  • --common_content=s β€” override the path to the Common_Content directory
  • --nocolours β€” disable ANSI colourisation of logging
  • --quiet β€” disable all logging
  • --brand_dir=s β€” directory to source brand files from

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 the Common_Config directory
  • --common_content=s β€” override the path to the Common_Content directory
  • --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 the Common_Config directory
  • --common_content=s β€” override the path to the 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
  • --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 the Common_Config directory
  • --common_content=s β€” override the path to the 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
  • --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 the Common_Config directory
  • --common_content=s β€” override the path to the Common_Content directory
  • --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 the Common_Config directory
  • --common_content=s β€” override the path to the 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

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 the Common_Config directory
  • --common_content=s β€” override the path to the Common_Content directory
  • --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 the Common_Config directory
  • --common_content=s β€” override the path to the Common_Content directory
  • --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 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.
  • --langs=<LANGS> β€” Comma-separated list of languages, for example: en-US,de-DE,all
  • --msgmerge β€” Use gettext's msgmerge for 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 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.

update_site

Update an existing sites templates. πŸŽ€

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.

zt_pull

Pull translations from Zanata. πŸ¦‹

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.

zt_push

Push translations to Zanata. πŸš€

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.

βš™οΈ 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