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
3fcf5e5a
Commit
3fcf5e5a
authored
May 15, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the documentation generation tools to work with Mercurial
rather than Subversion.
parent
de1f4677
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
52 additions
and
44 deletions
+52
-44
.hgignore
.hgignore
+5
-0
.logger_revnum
docs/.logger_revnum
+1
-1
README.txt
docs/README.txt
+2
-2
change_log.xml
docs/docs/change_log.xml
+1
-1
compile.xml
docs/docs/compile.xml
+2
-3
old_change_log.xml
docs/docs/old_change_log.xml
+1
-1
release_notes.xml
docs/docs/release_notes.xml
+3
-0
stylesheet.xsl
docs/docs/stylesheet.xsl
+2
-2
makedocs
docs/makedocs
+35
-34
No files found.
.hgignore
View file @
3fcf5e5a
...
...
@@ -2,3 +2,8 @@
\.swp$
\.o$
\.obj$
^docs/docs/web/
^docs/docs/chm/
^docs/docs/log.txt$
^docs/docs/old_log.txt$
docs/.logger_revnum
View file @
3fcf5e5a
4256
b4566fa0b468
docs/README.txt
View file @
3fcf5e5a
...
...
@@ -2,8 +2,8 @@ This "package" is just a copy of the stuff I use to generate the documentation
for the dlib library. It contains a copy of the XSLT and XML I use to
generate the HTML documentation.
The current version of these files can be obtained from the dlib
subversion
repository at: http
s://dclib.svn.sourceforge.net/svnroot/dclib/trunk/docs
The current version of these files can be obtained from the dlib
Mercurial
repository at: http
://dclib.hg.sourceforge.net:8000/hgroot/dclib/dclib
======================== Overview ========================
...
...
docs/docs/change_log.xml
View file @
3fcf5e5a
...
...
@@ -3,7 +3,7 @@
<doc>
<title>
Change Log
</title>
<body
from_file=
"
svn
log.txt"
>
<body
from_file=
"log.txt"
>
<br/>
<center><a
href=
"old_change_log.html"
>
Old Change Logs
</a></center>
<br/>
...
...
docs/docs/compile.xml
View file @
3fcf5e5a
...
...
@@ -44,9 +44,8 @@
</p>
<p>
Finally, note that
<a
href=
"dlib/revision.h.html"
>
dlib/revision.h
</a>
defines DLIB_REVISION
which is a #define you can use to see what version of dlib you have. The number in this file
is the subversion revision number associated with the particular copy of dlib you have.
Finally, note that
<a
href=
"dlib/revision.h.html"
>
dlib/revision.h
</a>
defines DLIB_MAJOR_VERSION
and DLIB_MINOR_VERSION which are #defines you can use to see what version of dlib you have.
</p>
<center><h1>
Preprocessor Directives
</h1></center>
...
...
docs/docs/old_change_log.xml
View file @
3fcf5e5a
...
...
@@ -3,5 +3,5 @@
<doc>
<title>
Old Change Logs
</title>
<body
from_file=
"old_
svn
log.txt"
/>
<body
from_file=
"old_log.txt"
/>
</doc>
docs/docs/release_notes.xml
View file @
3fcf5e5a
...
...
@@ -14,10 +14,13 @@
New Stuff:
Non-Backwards Compatible Changes:
- Removed the DLIB_REVISION macro and replaced it with DLIB_MAJOR_VERSION and
DLIB_MINOR_VERSION.
Bug fixes:
Other:
- dlib's version control system has switched from Subversion to Mercurial.
</current>
...
...
docs/docs/stylesheet.xsl
View file @
3fcf5e5a
...
...
@@ -900,7 +900,7 @@
<xsl:template
name=
"format-date"
>
<xsl:param
name=
"xsd-date"
/>
<xsl:variable
name=
"date"
select=
"substring-before($xsd-date,'T')"
/>
<xsl:variable
name=
"time"
select=
"substring-
before(substring-after($xsd-date,'T'),'.
')"
/>
<xsl:variable
name=
"time"
select=
"substring-
after($xsd-date,'T
')"
/>
<xsl:variable
name=
"year"
select=
"substring($date,1,4)"
/>
<xsl:variable
name=
"month"
select=
"substring($date,6,2)"
/>
...
...
@@ -945,7 +945,7 @@
<xsl:template
match=
"log"
>
<xsl:for-each
select=
"logentry"
>
<xsl:sort
order=
"descending"
data-type=
"number"
select=
"./@revision"
/>
<u>
Revision
</u>
:
<xsl:value-of
select=
"
@revision
"
/>
<br/>
<u>
Revision
</u>
:
<xsl:value-of
select=
"
substring(@node,1,12)
"
/>
<br/>
<u>
Date
</u>
:
<xsl:call-template
name=
"format-date"
><xsl:with-param
name=
"xsd-date"
select=
"date"
/></xsl:call-template>
<br/>
<xsl:apply-templates
select=
"msg"
/>
<xsl:apply-templates
select=
"paths"
/>
...
...
docs/makedocs
View file @
3fcf5e5a
...
...
@@ -27,33 +27,34 @@ htmlify_cmake ()
echo "
</pre></body></html>
" >> $1;
}
get_short_revision_number()
{
RESULT=`hg log -r $1 | grep changeset | awk '{print $2}' | sed -e 's/:.*//'`
}
makedocs ()
{
#make sure the .docs_last_update_rev file exists
if [ ! -f .docs_last_update_rev ]
then
echo 0 > .docs_last_update_rev
fi;
COUNTER_FILE=.current_release_number
MINOR_COUTNER_FILE=.current_minor_release_number
REVNUM_FILE=.logger_revnum
DOCS_LAST_UPDATE_REV=$(cat .docs_last_update_rev)
LOGGER_REVNUM=`cat $REVNUM_FILE`
# figure out the short number that identifies this particular changeset
get_short_revision_number `cat $REVNUM_FILE`
LOGGER_REVNUM=$RESULT
XSLT_OPTIONS="--nodtdattr --nonet --novalid"
DATE=`date --date= "+%b %d, %Y"`;
# root dlib repository URL
DLIB_REPOS=`svn info | grep URL | awk '{print $2}' | sed -e 's/\/docs$//' `
# The revision number we are currently at
REVISION=`svn info | grep Revision | awk '{ print $2 }'`
CHANGESET_ID=`hg id -i | sed -e 's/\+//'`
get_short_revision_number $CHANGESET_ID
REVISION=$RESULT
if [ "$1" = "snapshot" ]
...
...
@@ -65,36 +66,37 @@ makedocs ()
RELEASE=${MAJOR_NUM}.${MINOR_NUM}
fi;
# get XML versions of the change logs
BASE_LOGGER_REVNUM=`echo $LOGGER_REVNUM - 1000 | bc`
echo Getting the mercurial change logs for revisions $LOGGER_REVNUM:$REVISION
hg log ../dlib --style=xml -r$LOGGER_REVNUM:$REVISION > docs/log.txt || report_failure
echo Getting the mercurial change logs for revisions $BASE_LOGGER_REVNUM:$LOGGER_REVNUM
hg log ../dlib --style=xml -r$BASE_LOGGER_REVNUM:$LOGGER_REVNUM > docs/old_log.txt || report_failure
# update the cache of the library files from subversion if they aren't from the current revision
if [ $DOCS_LAST_UPDATE_REV -ne $REVISION ]
then
BASE_LOGGER_REVNUM=`echo $LOGGER_REVNUM - 1000 | bc`
echo Getting the subversion change logs for $DLIB_REPOS/dlib $LOGGER_REVNUM:$REVISION
svn log $DLIB_REPOS/dlib -v --xml -r$LOGGER_REVNUM:$REVISION > docs/svnlog.txt || report_failure
echo Getting the subversion change logs for $DLIB_REPOS/dlib $BASE_LOGGER_REVNUM:$LOGGER_REVNUM
svn log $DLIB_REPOS/dlib -v --xml -r$BASE_LOGGER_REVNUM:$LOGGER_REVNUM > docs/old_svnlog.txt || report_failure
# grab a clean copy of the repository
rm -rf docs/cache
rm -rf cache.$$
hg clone .. cache.$$ > /dev/null || 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/
rm -rf cache.$$
rm -rf docs/cache
echo $REVISION > .docs_last_update_rev
echo Getting a copy of the source from subversion
svn export -r $REVISION $DLIB_REPOS/examples docs/cache/examples > /dev/null || report_failure
svn export -r $REVISION $DLIB_REPOS/dlib docs/cache/dlib > /dev/null || report_failure
fi;
echo "#ifndef DLIB_REVISION_H" > docs/cache/dlib/revision.h
echo "// Version: " $RELEASE >> docs/cache/dlib/revision.h
echo "// Date: " `date` >> docs/cache/dlib/revision.h
echo "// Subversion Revision Number" >> docs/cache/dlib/revision.h
echo "#define DLIB_REVISION " $REVISION >> docs/cache/dlib/revision.h
echo "// Mercurial Revision ID: " $CHANGESET_ID >> docs/cache/dlib/revision.h
echo "#define DLIB_MAJOR_VERSION " $MAJOR_NUM >> docs/cache/dlib/revision.h
echo "#define DLIB_MINOR_VERSION " $MINOR_NUM >> docs/cache/dlib/revision.h
echo "#endif" >> docs/cache/dlib/revision.h
rm -rf docs/web/*
rm -rf docs/chm/docs/*
rm -rf docs/web
rm -rf docs/chm/docs
mkdir docs/web
mkdir docs/chm/docs
echo Creating HTML version of the source
htmlify --title "dlib C++ Library - " -i docs/cache -o htmltemp.$$
...
...
@@ -117,6 +119,7 @@ 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
rm -rf docs/cache
cp docs/*.gif docs/web
cp docs/*.gif docs/chm/docs
cp docs/*.html docs/web
...
...
@@ -184,8 +187,6 @@ makedocs ()
./testenv || report_failure
#echo Update the docs to the newest version in subversion
#svn update || report_failure
# build all the html documentation
...
...
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