NAME
zealc - Browse API documentation for various projects
SYNOPSIS
zealc download Perl
# Downloading Perl version 5.20.1 from http://sanfrancisco.kapeli.com/feeds/Perl.tgz
zealc list
# Perl
zealc list -l
# Perl perl:
zealc expand perl_os -l
# perl:perldos
# perl:perlvos
zealc query perldos
zealc query perldoc --elinks
DESCRIPTION
zealc is a command-line offline documentation browser inspired by Dash and Zeal. It uses Dash/Zeal format docsets via the Zeal library.
Global options
- --config=/path/to/file
-
Specify a configuration file to use. If this argument is missing, zealc will look for files zealcconfig, zealc.config, zealcrc, .zealcrc in the current directory, the home directory, in /etc/, and in /usr/local/etc/. This behaviour is described in the "HOW IT WORKS" section of the Config::Auto manpage.
See also the "CONFIGURATION" section below.
- --path=/path/to/docset/directory
-
The path to a directory containing docsets. Defaults to ~/.docset if the home directory is known, .docset otherwise.
- --verbose, --no-verbose
-
If --verbose is in effect, more messages will be printed. Default is --no-verbose.
Commands
- zealc download
-
View the list of official Dash docsets. The docsets that are already installed will be displayed in a bold font and with a * after their name.
- zealc download docset_id
-
Download an official Dash docset. docset_id is one of the ids returned by zealc download.
- zealc download http://example.com/path/to/feed.xml
-
Download a docset from a given docset feed.
- zealc expand [-f|--family] pattern
-
List all documents matching pattern, where pattern is a SQL LIKE pattern. If -f or --family is present, include the docset family of each found document. This command is mostly intended for use in scripts, as each line of the output can be directly passed to zealc query.
- zealc list [-l|--long]
-
List the names of all installed docsets. If -l or --long is present, also display the family of each docset.
- zealc query [-w WITH|--with=WITH] [-f FORMAT|--format FORMAT] pattern
-
Display the documentation for a given pattern. pattern is a SQL LIKE pattern. If more than one document is found and STDOUT is a terminal, the user will be asked to choose one of them. If more than one document is found and STDOUT is not a terminal, a randomly chosen document will be displayed.
To display the document, it will first be converted in the format specified by --format, then it will be opened with the program specified by --with.
--format can be one of:
- html, in which case no conversion will be done
- text, in which case it will be converted to text with HTML::FormatText
- program arg1 arg2, in which case the HTML document will be passed as the first argument to this program
CONFIGURATION
zealc uses Config::Auto for configuration. please read its manpage for a detailed explanation. Command-line arguments override configuration directives. The available configuration directives are:
- path
-
Path to the directory containing the docsets. Equivalent to the --config global option.
- verbose
-
If true, print more detailed messages. Equivalent to the --verbose global option.
If false, do not print detailed messages. Equivalent to the --no-verbose global option, which is the default.
- with
-
The program used to open documents. Usually a web browser or a pager. Equivalent to the --with option to zealc query.
- format
-
The program used to format documents. This can also be one of the special values html (do not format this document) or text (convert to text via HTML::FormatText). Equivalent to the --format option to zealc query.
To get started with configuration, create a file named .zealcrc in your home directory (or in the current directory) with keys separated by values using an equals sign. For example:
path=/home/mgv/docsets/
with=/usr/bin/lynx -color
format=html
verbose=1
SEE ALSO
AUTHOR
Marius Gavrilescu, <marius@ieval.ro>
COPYRIGHT AND LICENSE
Copyright (C) 2015 by Marius Gavrilescu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.1 or, at your option, any later version of Perl 5 you may have available.