NAME
Zeal::Docset - Class representing a Dash/Zeal docset
SYNOPSIS
use Zeal::Docset;
my $ds = Zeal::Docset->new('/home/mgv/docsets/Perl.docset');
say $ds->$path; # /home/mgv/docsets/Perl.docset
say $ds->name; # Perl
say $ds->id; # perl
say $ds->family; # perl
# In SQL LIKE, % is .* and _ is .
my @matches = $ds->query('perlopen%'); # finds perlopenbsd and perlopentut
my $doc = $ds->query('perlsec'); # A Zeal::Document object for perlsec
my $html = $ds->get('perls_c'); # HTML documentation of perlsec
my @docs = $ds->list; # all documents
DESCRIPTION
Dash is an offline API documentation browser. Zeal::Docset is a class representing a Dash/Zeal docset.
Available methods:
- Zeal::Docset->new($path)
-
Create a Zeal::Docset object from a given docset. $path should be the path to a something.docset directory.
- $ds->path
-
The path to the docset folder.
- $ds->plist
-
A hashref with the contents of Info.plist.
- $ds->dbh
-
A DBI database handle to the docSet.dsidx index.
- $ds->name
-
The name of this docset. Equivalent to
$ds->plist->{CFBundleName}
- $ds->id
-
The identifier of this docset. Equivalent to
$ds->plist->{CFBundleIdentifier}
- $ds->family
-
The family this docset belongs to. Dash uses this as the keyword for restricting searches to a particular family of docsets. Equivalent to
$ds->plist->{DocSetPlatformFamily}
- $ds->fetch($path)
-
Internal method for fetching the HTML content of a document. $path is either the path to the document relative to
$ds->path
or a HTTP URL. - $ds->query($cond)
-
In list context, return all documents (Zeal::Document instances) matching $cond. In scalar context, return one such document. $cond is a SQL LIKE condition.
- $ds->get($cond)
-
The HTML content of one document that matches $cond. $cond is a SQL LIKE condition.
This method is shorthand for
$ds->query($cond)->fetch
. - $ds->list
-
The list of all documents (Zeal::Document instances) in this docset.
SEE ALSO
Zeal, http://kapeli.com/dash, http://zealdocs.org
AUTHOR
Marius Gavrilescu, <marius@ieval.ro>
COPYRIGHT AND LICENSE
Copyright (C) 2014-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.