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
627a5c4a
Commit
627a5c4a
authored
Jan 11, 2014
by
Davis King
Browse files
The makedocs script will now add links between the example programs
when they reference each other.
parent
4099bc69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
docs/makedocs
docs/makedocs
+29
-0
No files found.
docs/makedocs
View file @
627a5c4a
...
...
@@ -35,6 +35,34 @@ build_python_interface ()
popd
}
add_links_between_example_programs()
{
# Get the list of example program filenames
pushd $1 > /dev/null
FILES=`ls *.cpp`
popd > /dev/null
# Now run sed on all the htmlified example programs to add the links between them.
for f in $FILES
do
#escape the . in the filename
escaped_name=`echo $f | sed -e 's/\./\\\./g'`
pushd $1 > /dev/null
# get a list of all the html example files that contain the name
matching_html_files=`grep -e "\b$escaped_name\b" -l *.cpp | sed -e "s/\.cpp\b/.cpp.html/g"`
popd > /dev/null
# now actually run sed to add the links
pushd $2 > /dev/null
if [ -n "$matching_html_files" ]
then
sed -i -e "s/\b$escaped_name\b/
<a
href=
\"$escaped_name.html\"
>
$escaped_name
<
\/
a
>
/g" $matching_html_files
fi
popd > /dev/null
done
}
htmlify_cmake ()
{
echo "
<html><head><title>
" > $1.html;
...
...
@@ -149,6 +177,7 @@ makedocs ()
echo Creating HTML version of the source
htmlify --title "dlib C++ Library - " -i docs/cache -o htmltemp.$$
add_links_between_example_programs docs/cache/examples htmltemp.$$/examples
echo Copying files around...
cp -r htmltemp.$$/dlib docs/web
...
...
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