Brands are collections of files that
Publican uses to apply a consistent look and style to HTML and PDF output. They provide boilerplate text that appears at the beginning of documents, images such as logos, and stylistic elements such as color schemes.
Publican ships with one brand,
common/. Documentation projects can produce and distribute brands to their contributors, either as a package (for example, an RPM package) or as an archive (for example, a tarball or ZIP file).
Publican brands for Fedora, Genome, and oVirt documents are available as RPM packages in Fedora. Similarly, Red Hat internally distributes RPM packages containing
Publican brands for GIMP, JBoss, and Red Hat documents. Providing that you have access to the relevant repositories, you can install these brands on a computer that runs Red Hat Enterprise Linux or Fedora — or an operating system derived from either — with the command
yum install publican-brand or with a graphical package manager such as
PackageKit.
If you use
Publican on an operating system that does not use RPM packages, your documentation project might provide its brand in another format. Whatever the format in which the brand is supplied, you must place the brand files in a subdirectory of the
Publican Common_Content directory. By default, this directory is located at
/usr/share/publican/Common_Content on Linux operating systems and at
%SystemDrive%/%ProgramFiles%/Publican/Common_Content on Windows operating systems — typically,
C:/Program Files/Publican/Common_Content
Each currently available brand is distributed under a brand-specific license as follows:
If the brand was supplied to you in an archive of some kind, for example, a tarball or ZIP file, unpack the brand into a new directory on your system.
Change into the directory in which you created or unpacked the brand:
cd publican-brand
where
brand is the name of the brand.
publican build --formats xml --langs all --publish
sudo publican install_brand --path path
where
path is the path to the
Publican Common Content files. For example, on a Linux system, run:
sudo publican install_brand --path /usr/share/publican/Common_Content
or on a Windows system, run
publican install_brand --path "C:/Program Files/Publican/Common_Content"
Table 4.1. Current Brands and their packages
|
Brand
|
License of Common Content files
|
Default license for documents
|
Package
|
Comment
|
|---|
|
common
|
CC0 1.0
|
GFDL Version 1.2
|
publican
|
GPL compatible license. No options.
|
|
RedHat
|
CC-BY-SA 3.0
|
CC-BY-SA 3.0
|
publican-redhat
|
|
|
Fedora
|
CC-BY-SA 3.0
|
CC-BY-SA 3.0
|
publican-fedora
|
|
|
JBoss
|
CC-BY-SA 3.0
|
CC-BY-SA 3.0
|
publican-jboss
|
No Options.
|
|
oVirt
|
OPL 1.0
|
OPL 1.0
|
publican-ovirt
|
No Options.
|
|
GIMP
|
GFDL Version 1.2
|
GFDL Version 1.2
|
publican-gimp
|
Matches the license for existing GIMP documentation.
|
|
Genome
|
OPL 1.0
|
OPL 1.0
|
publican-genome
|
No Options.
|
Note the difference in licensing between the common content files provided in the common brand (CC0) and the default license set for books generated with the common brand (GFDL). The CC0 license allows you to redistribute and relicense the files that make up the common brand (including the CSS and image files) to suit your project.
Publican suggests the GFDL for documentation by default because
Publican is developed primarily to build documentation for software. The GFDL is compatible with the GPL, which is the most commonly used license for open-source software.
Use the
create_brand action to create a new brand. When you create a new brand, you must give it a name and specify the original language for the brand's XML files. The
--name option provides the name, and the
--lang option specifies the language. The complete command is therefore:
publican create_brand --name=brand --lang=language_code
Publican creates a new subdirectory named
publican-brand, where
brand is the brand that you specified with the
--name option.
For example, to create a brand called
Acme, which will have its Common Content XML files written originally in American English, run:
publican create_brand --name=Acme --lang=en-US
Publican creates the brand in a subdirectory named
publican-Acme.
To configure your new brand, search for the word
SETUP in the default files that
Publican creates and edit the files to provide the missing details. On Linux operating systems, you can search for the word
SETUP in these files with the command:
grep -r 'SETUP' *
This section discusses packaging documents for distribution through the
RPM Package Manager. However, when you use the
publican package command,
Publican generates a tarball that you can use to build a package to distribute through different package manager software. If you run
publican package on a computer on which
rpmbuild is not installed,
Publican still generates the tarball, even though it cannot then generate an RPM package from that tarball.
After you create a brand (as described in
Section 4.2, “Creating a brand”),
Publican can help you to distribute the brand to members of your documentation project as
RPM packages. RPM packages are used to distribute software to computers with Linux operating systems that use the
RPM Package Manager. These operating systems include Red Hat Enterprise Linux, Fedora, Mandriva Linux, SUSE Linux Enterprise, openSUSE, Turbolinux, and Yellow Dog Linux, to name just a few.
Publican can produce both
source RPM packages (
SRPM packages) and
binary RPM packages. As part of this process, it also creates the
spec file — the file that contains the details of how a package is configured and installed.
SRPM packages contain the source code used to generate software rather than the software itself. To use an SRPM package, a computer must
compile the source code into software. SRPM packages of
Publican brands contain the configuration files, XML files, and image files that define the brand in its original language, plus the PO files that generate the Common Content files in translated languages. You cannot install documentation directly from SRPM packages with current versions of the
RPM Package Manager.
Conversely, binary RPM packages contain software — in this case, a
Publican brand — that is ready to copy to a location in the computer's file system and use immediately. The contents of the binary RPM package do not need to be compiled by the computer onto which they are installed, and therefore, the computer does not need to have
Publican installed.
To package a brand, use the
publican package command in the brand directory. When used without any further options,
Publican produces an SRPM package. The options for packaging a brand are as follows:
--binary
specifies that
Publican should build the package as a binary RPM package.
--brew
specifies that
Publican should push the completed package to
Brew.
Brew is the build system used internally by Red Hat; this option is meaningless outside Red Hat.
--scratch
when used together with the
--brew option, specifies that a SRPM package should be built as a
scratch build when sent to
Brew. Scratch builds are used to verify that a SRPM package is structured correctly, without updating the package database to use the resulting package.
The
--lang,
--desktop and
--short_sighted options that apply when you package books (described in
Section 3.8, “Packaging a document”) are meaningless when you package brands. In particular, note that although the
--lang option is mandatory when you package a book, you do not need to use it when you package a brand.
By default,
Publican brand packages are named:
publican-brand-version-release.build_target.noarch.file_extension.
Publican uses the information in the
publican.cfg file to supply the various parameters in the file name. Refer to
Section 4.3.1, “The publican.cfg file” for details of configuring this file. Additionally:
SRPM packages have the file extension
.src.rpm but binary RPM packages have the file extension
.rpm
binary RPM packages include
build_target.noarch before the file extension, where
[build_target] represents the operating system and version that the package is built for as set by the
os_ver parameter in the
publican.cfg file. The
noarch element specifies that the package can be installed on any system, regardless of the system architecture.