mvp + icon + comment
This commit is contained in:
parent
a6b0a2f886
commit
21859d7727
6
cmd.txt
6
cmd.txt
|
@ -1,15 +1,21 @@
|
||||||
export UA="Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0"
|
export UA="Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/109.0"
|
||||||
alias aspire='/usr/bin/wget -b -r -p -np -E -k -U "$UA" '
|
alias aspire='/usr/bin/wget -b -r -p -np -E -k -U "$UA" '
|
||||||
|
# source
|
||||||
mkdir -p awk.docset/Contents/Resources/Documents/
|
mkdir -p awk.docset/Contents/Resources/Documents/
|
||||||
aspire https://www.gnu.org/software/gawk/manual/html_node/index.html
|
aspire https://www.gnu.org/software/gawk/manual/html_node/index.html
|
||||||
mv www.gnu.org/software/gawk/manual/html_node/* awk.docset/Contents/Resources/Documents/
|
mv www.gnu.org/software/gawk/manual/html_node/* awk.docset/Contents/Resources/Documents/
|
||||||
|
# metadata
|
||||||
wget https://kapeli.com/resources/Info.plist
|
wget https://kapeli.com/resources/Info.plist
|
||||||
sed -i -e 's,nginx,awk,' -e 's,Nginx,AWK,' Info.plist
|
sed -i -e 's,nginx,awk,' -e 's,Nginx,AWK,' Info.plist
|
||||||
mv Info.plist awk.docset/Contents/
|
mv Info.plist awk.docset/Contents/
|
||||||
|
# icon
|
||||||
|
wget -O awk.docset/icon.png http://awklang.org/image/awkicon/atmaWhite.png
|
||||||
|
# search index
|
||||||
sqlite3 awk.docset/Contents/Resources/docSet.dsidx 'CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT);'
|
sqlite3 awk.docset/Contents/Resources/docSet.dsidx 'CREATE TABLE searchIndex(id INTEGER PRIMARY KEY, name TEXT, type TEXT, path TEXT);'
|
||||||
sqlite3 awk.docset/Contents/Resources/docSet.dsidx 'CREATE UNIQUE INDEX anchor ON searchIndex (name, type, path);'
|
sqlite3 awk.docset/Contents/Resources/docSet.dsidx 'CREATE UNIQUE INDEX anchor ON searchIndex (name, type, path);'
|
||||||
find awk.docset/Contents/Resources/Documents -type f -name '*.html' -print0 | xargs -0 -I £ bash -c 'echo £; grep -F "<title>" £' > index.txt
|
find awk.docset/Contents/Resources/Documents -type f -name '*.html' -print0 | xargs -0 -I £ bash -c 'echo £; grep -F "<title>" £' > index.txt
|
||||||
sed -i -e 's,<title>,,' -e 's,</title>,,' -e 's, (The GNU Awk User’s Guide),,' index.txt
|
sed -i -e 's,<title>,,' -e 's,</title>,,' -e 's, (The GNU Awk User’s Guide),,' index.txt
|
||||||
awk -f genindex.awk index.txt >| index.tsv
|
awk -f genindex.awk index.txt >| index.tsv
|
||||||
{ echo '.mode tabs' ; echo '.import index.tsv searchIndex' ; } | sqlite3 awk.docset/Contents/Resources/docSet.dsidx
|
{ echo '.mode tabs' ; echo '.import index.tsv searchIndex' ; } | sqlite3 awk.docset/Contents/Resources/docSet.dsidx
|
||||||
|
# deploy
|
||||||
mv awk.docset ~/.local/share/Zeal/Zeal/docsets/
|
mv awk.docset ~/.local/share/Zeal/Zeal/docsets/
|
||||||
|
|
Loading…
Reference in New Issue