Important — Availability in repositories
su -
$yum install publican publican-doc
$yum install publican-brand
redhat, fedora, jboss, ovirt, or gimp. Refer to Chapter 5, Branding for more information on branding.
Important — Unsupported software
Important — Dependencies available only internally to Red Hat
su -
$yum install publican publican-doc
$yum install publican-brand
redhat, fedora, jboss, ovirt, or gimp. Refer to Chapter 5, Branding for more information on branding.
$sudo apt-get install publican
su -
$apt-get install publican
$publican -vversion=2.8
Important — Installing more recent packages using Apt-Pinning
su -
/etc/apt/sources.list file in a text editor. For example, to edit the file in gedit run:
$gedit /etc/apt/sources.list
#### testing ######### deb http://ftp.us.debian.org/debian testing main contrib non-free
/etc/apt/preferences file in a text editor. For example, to edit the file in gedit run:
$gedit /etc/apt/preferences
Package: * Pin: release a=stable Pin-Priority: 900 Package: * Pin: release a=testing Pin-Priority: 400 Package: * Pin: release o=Debian Pin-Priority: -10
$apt-get update
$apt-get -t testing install publican
Which indicates that you might need to upgrade libxml2 and libxslt to the testing repository version too. This can be done by searching to find the likely library:$publicanWarning: program compiled against libxml 209 using older 208Warning: XML::LibXML compiled against libxml2 20901, but runtime libxml2 is older 20800Warning: program compiled against libxml 209 using older 208Warning: XML::LibXSLT compiled against libxslt 10128, but runtime libxslt is older 10126Can't open publican: No such file or directory at /usr/bin/publican line 430.
(and the same again for libxml2)$apt-get search libxsltgambas3-gb-xml-xslt - Gambas XSLT componentlibidzebra-2.0-mod-alvis - IDZebra filter alvis (XSLT filter for XML)libidzebra-2.0-mod-dom - IDZebra filter 'dom' (XML DOM internal document model with XSLT)libical-parser-html-perl - generates HTML calendars from iCalendarslibxsltc-java - XSL Transformations (XSLT) compiler from Xalan-Javalibxml-filter-xslt-perl - Perl module for XSLT as a SAX Filterlibxml-libxslt-perl - Perl interface to the GNOME libxslt librarylibxslt1-dbg - XSLT 1.0 processing library - debugging symbolslibxslt1-dev - XSLT 1.0 processing library - development kitlibxslt1.1 - XSLT 1.0 processing library - runtime librarypython-libxslt1 - Python bindings for libxslt1python-libxslt1-dbg - Python bindings for libxslt1 (debug extension)python-lxml - pythonic binding for the libxml2 and libxslt librariespython-lxml-dbg - pythonic binding for the libxml2 and libxslt libraries (debug extension)python-lxml-doc - pythonic binding for the libxml2 and libxslt libraries (documentation)python3-lxml - pythonic binding for the libxml2 and libxslt librariespython3-lxml-dbg - pythonic binding for the libxml2 and libxslt libraries (debug extension)php5-xsl - XSL module for php5libsp-gxmlcpp-dev - S+P C++ wrapper for Gnome libxml2/libxsltlibsp-gxmlcpp1 - S+P C++ wrapper for Gnome libxml2/libxsltswfmill - xml2swf and swf2xml processorlibxslthl-java - XSLT syntax highlighting
$apt-get -t testing upgrade libxml2 libxslt1.1
$sudo zypper install perl-Config-Simple perl-DateTime \ perl-DateTime-Format-DateParse perl-DBD-SQLite perl-DBI \ perl-File-Find-Rule perl-File-Which perl-HTML-Format \ perl-Locale-MakeText-Gettext perl-Template-Toolkit \ perl-Test-Deep perl-Test-Pod perl-XML-LibXSLT \ perl-YAML liberation-fonts
Note
Liberation-fonts is most likely already installed, but it is required. Zypper will not reinstall it if it is already present.
$sudo sh cpan File::pushd File::Copy::Recursive Locale::PO pp \ Syntax::Highlight::Engine::Kate XML::TreeBuilder exit
$cd ~ mkdir -p SourceCode/publican cd SourceCode/publican svn checkout http://svn.fedorahosted.org/svn/publican/branches/publican-2x ./
$perl Build.PL
WARNING: the following files are missing in your kit:META.ymlPlease inform the author.Created MYMETA.yml and MYMETA.jsonCreating new 'Build' script for 'Publican' version '2.9'
File/pushd.pm is reported as missing, you would use this to install it:
$sudo sh cpan File::pushd exit
Build.PL script will have created a new script named Build which we will use to create, test and install Publican 2.9.
$./Build
DEBUG: Publican::Builder: end of build$./Build test
Test Summary Report-------------------t/910.publican.Users_Guide.t (Wstat: 256 Tests: 5 Failed: 1)Failed test: 5Non-zero exit status: 1t/pod-coverage.t (Wstat: 256 Tests: 9 Failed: 1)Failed test: 7Non-zero exit status: 1Files=10, Tests=68, 420 wallclock secs ( 0.31 usr 0.17 sys + 246.87 cusr 18.73 csys = 266.08 CPU)Result: FAILFailed 2/10 test programs. 2/68 subtests failed.
ghostscript-fonts-std as opposed to ghostscript-fonts) wkhtmltopdf will not run even if force installed with no dependency checks.
Note
$JFEARN=http://jfearn.fedorapeople.org/wkhtmltopdf/f15 MYSYSTEM=i686 ## For 64bit system use MYSYSTEM=x86_64 instead. wget $JFEARN/$MYSYSTEM/wkhtmltopdf-qt-4.7.1-1.git20110804.fc15.i686.rpm wget $JFEARN/$MYSYSTEM/wkhtmltopdf-0.10.0_rc2-1.fc15.i686.rpm
Note
MYSYSTEM appropriately.
$sudo sh rpm -ivh wkhtmltopdf-qt* rpm -ivh --nodeps wkhtmltopdf-0* exit
ghostscript-fonts problem described above.
$sudo sh ./Build test exit
$publican create --type=book --product=testing --version=1.2.3 --name=TestPublicanProcessing file en-US/Author_Group.xml -> en-US/Author_Group.xml Processing file en-US/Book_Info.xml -> en-US/Book_Info.xml Processing file en-US/Chapter.xml -> en-US/Chapter.xml Processing file en-US/Preface.xml -> en-US/Preface.xml Processing file en-US/Revision_History.xml -> en-US/Revision_History.xml Processing file en-US/TestPublican.xml -> en-US/TestPublican.xml$cd TestPublican/ publican build --lang=all --formats=html,html-single,html-desktop,txt,pdf,epub
Note
runtime error: file /usr/share/publican/xsl/epub.xsl element chooseVariable 'epub.embedded.fonts' has not been declared.at /usr/lib/perl5/site_perl/5.14.2/Publican/Builder.pm line 915
SourceCode/TestPublican/tmp/en-US/ and view the various output formats that you find there.
Note
This will take some time, as it downloads a fedora based container, and then the dependencies needed for publican$docker pull svendowideit/publican
$echo 'alias publican="docker run -t -i -v $(pwd):/mnt svendowideit/publican"' >> ~/.bashrc
$publican --versionversion=3.2.1