File: mkdocset

package info (click to toggle)
elvish 0.21.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,372 kB
  • sloc: javascript: 236; sh: 130; python: 104; makefile: 88; xml: 9
file content (27 lines) | stat: -rwxr-xr-x 722 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

# Generate docset from reference docs.
#
# Docset is a format for packaging docs for offline consumption:
# https://kapeli.com/docsets
#
# External dependencies:
# 
# - python3

if test $# != 2; then
  echo "Usage: mkdocset.elv $website $docset"
  exit 1
fi

bindir=$(dirname "$0")
website=$1
docset=$2

mkdir -p $docset/Contents/Resources/Documents
cp $bindir/../favicons/favicon-16x16.png $docset/icon.png
cp $bindir/../favicons/favicon-32x32.png $docset/icon@2x.png
cp $bindir/docset-data/Info.plist $docset/Contents
cp $website/ref/*.html $docset/Contents/Resources/Documents
rm $docset/Contents/Resources/Documents/index.html
python3 $bindir/mkdsidx.py $website/ref $docset/Contents/Resources/docSet.dsidx