Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
8a91f0da
Commit
8a91f0da
authored
May 26, 2013
by
Davis King
Browse files
Updated doc generation scripts to include the python files in the
python_examples folder.
parent
c9dce70c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
8 deletions
+31
-8
docs/makedocs
docs/makedocs
+30
-8
docs/testenv
docs/testenv
+1
-0
No files found.
docs/makedocs
View file @
8a91f0da
...
...
@@ -6,6 +6,11 @@ report_failure ()
exit 1
}
htmlify_python_file ()
{
pygmentize -f html -O full,style=vs $1 > $1.html
}
htmlify_cmake ()
{
echo "
<html><head><title>
" > $1.html;
...
...
@@ -24,7 +29,17 @@ htmlify_cmake ()
-e "s/{\([^}]*\)}/\{
<font
color=
'#BB00BB'
>
\1
<
\/
font
>
}/g" \
$1 >> $1.html;
echo "
</pre></body></html>
" >> $1;
echo "
</pre></body></html>
" >> $1.html;
}
htmlify_python()
{
FILES=`\ls $1/*.py`
for i in $FILES
do
htmlify_python_file ${i}
rm ${i}
done
}
get_short_revision_number()
...
...
@@ -81,12 +96,16 @@ makedocs ()
# grab a clean copy of the repository
rm -rf docs/cache
rm -rf docs/web
rm -rf docs/chm/docs
rm -rf cache.$$
hg archive cache.$$ || report_failure
# put the stuff we need into the docs/cache folder
mkdir docs/cache
mv cache.$$/dlib docs/cache/
mv cache.$$/examples docs/cache/
mv cache.$$/python_examples docs/cache/
htmlify_python docs/cache/python_examples/
mv cache.$$/tools docs/cache/
rm -rf cache.$$
...
...
@@ -126,6 +145,9 @@ makedocs ()
cp docs/cache/examples/CMakeLists.txt docs/web/examples
mkdir docs/chm/docs/examples || report_failure
cp docs/cache/examples/CMakeLists.txt docs/chm/docs/examples
cp docs/cache/python_examples/*.py.html docs/chm/docs/
cp docs/cache/python_examples/*.py.html docs/web/
cp docs/*.gif docs/web
cp docs/*.gif docs/chm/docs
cp -r docs/guipics docs/web
...
...
@@ -184,13 +206,13 @@ makedocs ()
rm docs/stylesheet.$$.xsl
done
FILES=`find docs/chm docs/web -iname "*.html" -type f`
for i in $FILES
do
sed -e '/
<
!
DOCTYPE
/
d
'
${
i
}
>
temp.$$;
mv temp.$$ ${i};
done
# Delete doc type header stuff
#
FILES=`find docs/chm docs/web -iname "*.html" -type f`
#
for i in $FILES
#
do
#
sed -e '/
<
!
DOCTYPE
/
d
'
${
i
}
>
temp.$$;
#
mv temp.$$ ${i};
#
done
echo Generating sitemap
...
...
docs/testenv
View file @
8a91f0da
...
...
@@ -22,6 +22,7 @@ xsltproc -V > /dev/null || return_error "xsltproc";
tar --help > /dev/null || return_error "tar";
zip -h > /dev/null || return_error "zip";
bzip2 -h &> /dev/null || return_error "bzip2";
pygmentize -h &> /dev/null || return_error "pygmentize";
echo All needed utilities found
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment