Skip to content

Commit

Permalink
Provide a single pdf containing all the doc for downloading (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Apr 11, 2024
1 parent 8781b27 commit a326744
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 35 deletions.
93 changes: 58 additions & 35 deletions .github/workflows/build-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,42 +47,65 @@ jobs:
with:
fetch-depth: 0

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Run docker
uses: addnab/docker-run-action@v3
with:
python-version: ${{ matrix.python-version }}

- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Build doc
shell: bash
run: |
cd docs
python3 -m pip install -r ./requirements.txt
make html
export GIT_LFS_SKIP_SMUDGE=1
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
./generate-tts.py
./generate-tts-engine.py
./generate-speaker-identification.py
mv -v apk.html ../build/html/onnx/tts/
mv -v apk-engine.html ../build/html/onnx/tts/
mv -v apk-speaker-identification.html ../build/html/onnx/speaker-identification/apk.html
cd ..
rm -rf huggingface
git clone https://huggingface.co/csukuangfj/sherpa huggingface
cd huggingface
./run.sh
cp cpu.html ../build/html
cp cuda.html ../build/html
cd ..
rm -rf huggingface
touch build/html/.nojekyll
image: reitzig/texlive-full:latest
# image: ghcr.io/xu-cheng/texlive-full:latest
options: |
--volume ${{ github.workspace }}/:/workspace
shell: bash
run: |
uname -a
cat /etc/*release
id
pwd
ls -lh
cd /workspace
which latexmk
apk add --no-cache python3 py3-pip git make gcc zlib-dev libffi-dev openssl-dev musl-dev ghostscript
python3 --version
python3 -m venv abc
source ./abc/bin/activate
python3 -m ensurepip
python3 -m pip install -r ./docs/requirements.txt
cd docs
make html
touch build/html/.nojekyll
export GIT_LFS_SKIP_SMUDGE=1
git clone https://huggingface.co/csukuangfj/sherpa-onnx-apk huggingface
cd huggingface
./generate-tts.py
./generate-tts-engine.py
./generate-speaker-identification.py
mv -v apk.html ../build/html/onnx/tts/
mv -v apk-engine.html ../build/html/onnx/tts/
mv -v apk-speaker-identification.html ../build/html/onnx/speaker-identification/apk.html
cd ..
rm -rf huggingface
git clone https://huggingface.co/csukuangfj/sherpa huggingface
cd huggingface
./run.sh
cp cpu.html ../build/html
cp cuda.html ../build/html
cd ..
rm -rf huggingface
make latex
mkdir -pv build/html/_static
cd build/latex
latexmk -interaction=nonstopmode -f -pdf -dvi- -ps- sherpa.tex || true
ls -lh sherpa.pdf
cp -v sherpa.pdf ../html/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ sherpa
:maxdepth: 2

./intro.rst
./pdf.rst
./social-groups.rst
./huggingface/index.rst
./pretrained-models.rst
Expand Down
16 changes: 16 additions & 0 deletions docs/source/pdf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Download pdf
============

We provide a single pdf file containing all the documentation.

.. hint::

All Chinese related content is not included in the pdf file.

Please download it from the following address:

`<https://k2-fsa.github.io/sherpa/sherpa.pdf>`_

Please always download the latest version.

The pdf file is updated automagically whenever the doc is changed.

0 comments on commit a326744

Please sign in to comment.