---
name: "Publican::Builder"
section: "3pm"
platform: "linux"
package: "publican"
version: "4.3.2-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Publican::Builder"
---

# Publican::Builder(3pm)

A module to Convert XML to various output formats

## NAME

Publican::Builder - A module to Convert XML to various output formats

## SYNOPSIS

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

## DESCRIPTION

Manipulate XML and convert to other formats.

## INTERFACE

### new

Create a new Publican::Builder object.

### build

Transform the source in to another format.

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

### 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.

### del\_unwanted\_xml

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

### validate\_xml

Ensure the XML validates against the DTD.

To debug the XML catalogs

export XML\_DEBUG\_CATALOG=1

test...

unset XML\_DEBUG\_CATALOG

### 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.

### 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.

### 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.

### 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

### build\_set\_books

Prepare XML from sub books for Remote Sets

## DIAGNOSTICS

- "unknown args %s"

  All subs with named parameters will return this error when unexpected named arguments are provided.

- "%s is a required argument"

  Any sub with a mandatory parameter will return this error if the parameter is undef.

## CONFIGURATION AND ENVIRONMENT

Publican requires no configuration files or environment variables.

## DEPENDENCIES

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

## 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\>.

## AUTHOR

Jeff Fearn  `"<jfearn@redhat.com>"`
