App-Zapzi

 view release on metacpan or  search on metacpan

bin/zapzi  view on Meta::CPAN

  $ zapzi init
  Created Zapzi directory ~/.zapzi

  Select configuration options. Press enter to accept defaults.
  Format to publish eBooks in. (EPUB, MOBI or HTML) [default MOBI] : MOBI

  $ zapzi add ~/src/foo/README.txt
  Added article 2 to folder Inbox

  $ zapzi add http://perldoc.perl.org/perlintro.html
  Added article 3 to folder Inbox

  $ zapzi ls
  Inbox    1 05-Jul-2013 Welcome to Zapzi
  Inbox    2 05-Jul-2013 README for project foo
  Inbox    3 05-Jul-2013 perlintro - perldoc.perl.org

  $ zapzi publish
  Published ~/.zapzi/ebooks/Zapzi - Inbox - 05-Jul-2013.mobi

  # See USAGE below for more details on command line options.

=head1 DESCRIPTION

Zapzi is a command line tool to take articles - from files or from the
web - and create eBooks for reading later.

=head2 FEATURES

=over 4

=item * Can read articles from local files or via HTTP.

=item * Understands plain text, POD, HTML and Markdown format articles.

=item * HTML is converted to a more readable form (eg no menus or
footers) to make the article easier to view on an eReader.

=item * Articles can be stored in different folders to organise your reading.

=item * eBooks can be created in MOBI, EPUB or HTML format.

=item * eBooks can be automatically copied to a directory or emailed
when published.

=item * Once you publish a folder of articles to an eBook file, the
articles are archived so you can retrieve them later if needed.

=back

=head2 SETUP

To get started, type:

  $ zapzi init

and it will create a directory (by default ~/.zapzi) to store its
database and files. You can override this directory by setting the
environment variable C<ZAPZI_DIR>.

Zapzi will then prompt for configuration options such as preferred
format for publishing eBooks. If you run this command
non-interactively it will use defaults.

To view or change these options see L<CONFIGURATION> for further
details.

=head2 ADDING ARTICLES

To add an article, use C<zapzi add> with a filename on your computer,
the name of a module containing POD (eg File::Basename) or an HTTP
URL. Remember to quote URLs if they include space or shell special
characters, eg

  $ zapzi add 'http://example.com/article?id=4'

Zapzi will download a copy and store it in its database. Note that if
you need to log into a site this will not work - save a copy of the
page locally using your browser and then point Zapzi at the file.

=head2 TRANSFORMERS

By default, Zapzi will detect the file type and if it is HTML it will
use L<HTML::ExtractMain> to strip out non-essential parts of the page
such as menus. Other formats are treated as plain text with Markdown.

You can override this by setting the C<-t> option to C<add>. For
example, if HTMLExtractMain does not correctly determine which parts
of the article are readable you can get the complete HTML text
instead:

  $ zapzi add -t HTML 'http://example.com/article?id=4'

=head2 FOLDERS

By default, Zapzi will store articles in the 'Inbox' folder. This can
be changed by using the C<-f> option, eg

  $ zapzi add -f Foo project.txt

In order to use other folders you will need to create them first using
the C<make-folder> or C<mkf> command, eg

  $ zapzi make-folder Foo

Folders can be deleted with the C<delete-folder> or C<rd> command.
Note that this will also delete all articles in the folder.

To see a summary of your folders and how many articles are in them use
the C<list-folders> or C<lsf> command.

  $ zapzi lsf

  Inbox        2
  Archive      4
  Foo          1

To see a summary of a particular folder, use C<list> or C<ls>:

  $ zapzi ls -f Foo
  Foo      1 05-Jul-2013 Project readme



( run in 1.081 second using v1.01-cache-2.11-cpan-0b5f733616e )