Skip to content

Commit

Permalink
doc: Do not generate PDF and PS docs
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Buesch <[email protected]>
  • Loading branch information
mbuesch committed Feb 3, 2018
1 parent 5a327f1 commit 465f14d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 31 deletions.
13 changes: 6 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ __pycache__/
*.gss

/*.html
/*.pdf

.pybuild/
build/
dist/
MANIFEST
/.pybuild/
/build/
/dist/
/MANIFEST

awlsim_cython
pyprofibus
/awlsim_cython
/pyprofibus
4 changes: 3 additions & 1 deletion maintenance/cleantree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ find . \( \
rm -rf build dist release-archives .pybuild
rm -f MANIFEST

rm -f *.pdf *.html
rm -f *.html
find ./doc -name '*.html' -delete


rm -f debian/files \
debian/*.debhelper \
Expand Down
25 changes: 2 additions & 23 deletions maintenance/gen-doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,19 @@ gen()
local docname="$(basename "$md" .md)"
local dir="$(dirname "$md")"
local html="$dir/$docname.html"
local pdf="$dir/$docname.pdf"

echo "Generating $docname ..."
echo "Generating $(realpath --relative-to="$srcdir" "$html") from $(realpath --relative-to="$srcdir" "$md") ..."

echo "<!DOCTYPE html><html><head><meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\"></head><body>" > "$html" ||\
die "Failed to generate"
markdown "$md" >> "$html" ||\
die "Failed to generate"
echo "</body></html>" >> "$html" ||\
die "Failed to generate"

wkhtmltopdf "$html" "$pdf" ||\
die "Failed to generate"
}

for i in "$srcdir"/*.md; do
for i in $(find "$srcdir" \( -name submodules -prune \) -o \( -name '*.md' -print \)); do
gen "$i"
done

cd "$srcdir" || die "Failed to cd"

html2ps --encoding "UTF-8" \
--web b \
--dsc \
--frame \
--xref \
--number \
--underline \
--colour \
--hyphenate \
README.html > AWLSIM.ps ||\
die "Failed to generate"

ps2pdf AWLSIM.ps AWLSIM.pdf ||\
die "Failed to generate"

exit 0

0 comments on commit 465f14d

Please sign in to comment.