App-Zapzi
view release on metacpan or search on metacpan
README.mkdn view on Meta::CPAN
When an eBook is published, Zapzi can run an action on the completed
file by setting distribution options. The following distribution
methods are available:
- Copy - will copy the file to another directory or file
- Email - will email the file to a recipient
- Script - will run a script with the eBook as a parameter
- Nothing - will do no distribution (the default)
To use this at publication time, set the `--distribute` or `-d`
option to the publish command. Some examples:
$ zapzi publish -d copy /path/to/directory
$ zapzi publish -d email me@my.address.com
$ zapzi publish -d script /home/user/bin/myscript.sh
To set this up so distribution happens every time you publish without
needing to provide the `-d` command line option, set the
`distribution_method` and `distribution_destination` config
parameters. See the Configuration section below for more details.
For email distribution, the From address used will be the same as the
To address. You can override this by setting the
`EMAIL_SENDER_TRANSPORT_from` environment variable. By default, email
will be sent via the local sendmail service on your machine; if you
want to send by SMTP set the `EMAIL_SENDER_TRANSPORT` environment
variable to SMTP and configure the below environment variables as
appropriate. You can also set any other options documented by
`Email::Sender`.
- EMAIL_SENDER_TRANSPORT_host: the name of the host to connect to;
defaults to localhost
- EMAIL_SENDER_TRANSPORT_ssl: if set, connect via SSL; defaults to
false
- EMAIL_SENDER_TRANSPORT_port: port to connect to; defaults to 25
for non-SSL, 465 for SSL
- EMAIL_SENDER_TRANSPORT_timeout: maximum time in secs to wait for
server; default is 120
- EMAIL_SENDER_TRANSPORT_sasl_username: the username to use for
auth; optional
- EMAIL_SENDER_TRANSPORT_sasl_password: the password to use for
auth; required if username is provided
## Showing and Exporting
Instead of publishing, if you want to see a copy of an article use
`zapzi show` to view the article in a browser or `zapzi export` to
send a copy of the readable article to the standard output. Both these
commands will not archive the article.
You can chain together adding and showing, eg
$ zapzi add show README.md
will add a copy of README.md to the database and then open a browser
to show how it looks in readable format.
# Configuration
To view or change configuration variables use the `config get` or
`config set` commands, eg:
$ zapzi config get # to see all set variables
$ zapzi config get publish_format # to see one variable
$ zapzi config set publish_format EPUB # to set a variable
The following configuration variables are available:
- publish\_format
The eBook format Zapzi will use when running the `publish` command.
Default is MOBI; can be set to EPUB or HTML.
- publish\_encoding
The encoding used to create an eBook when running the `publish`
command. Default is unset, which means Zapzi will choose the best
encoding for the publication format. Can be set to UTF-8 or
ISO-8859-1.
- distribution\_method
The method used to automatically distribute published eBook files.
Can be either 'Copy', 'Script' or 'Nothing'. Default is 'Nothing'.
- distribution\_destination
Where to distribute published eBook files. If `distribute_method`
is set to 'Copy' then this should be a directory name. If the
method is 'Script' this should the the full path to an executable
script. If the method is 'Email' then this should be the
recipient's email address.
- deactivate\_links
If set to Y, will replace links with text when using the
HTMLExtractMain transformer. Motivation for this is eReaders with
touch screens where tapping the screen will turn the page, unless
you happen to touch a link in which case it will try to follow the
link in a web browser. This can be annoying if you are offline as
it will load the browser then ask if you want to go online.
# Usage
$ zapzi help | h
Shows this help text.
$ zapzi version | v
Shows version information.
$ zapzi init [--force]
Initialises new zapzi database. Will not create a new database
if one exists already unless you set --force.
$ zapzi config get [KEYS]
Prints configuration variables specified by KEYS, or all config
( run in 1.327 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )