]>
iEval git - zeal.git/blob - t/mkindex.pl
7 use File
::Spec
::Functions qw
/abs2rel/;
13 unlink "$root/Contents/Resources/docSet.dsidx";
15 my $ds = Zeal
::Docset
->new($root);
16 $ds->dbh->do('CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT)');
17 $ds->dbh->do('CREATE UNIQUE INDEX anchor on searchIndex (name, type, path)');
19 chdir "$root/Contents/Resources/Documents";
25 my ($name) = m/(\w+)\.html/;
26 my $path = abs2rel
$_;
27 say STDERR
"Adding document $name at $path";
28 $ds->dbh->do('INSERT OR IGNORE INTO searchIndex(name, type, path) VALUES (?, \'Word\', ?)', {}, $name, $path);
This page took 0.046785 seconds and 4 git commands to generate.