Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
627a5c4a
Commit
627a5c4a
authored
Jan 11, 2014
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The makedocs script will now add links between the example programs
when they reference each other.
parent
4099bc69
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
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