~zsombi/ubuntu-ui-toolkit/theme-as-singleton

« back to all changes in this revision

Viewing changes to documentation/docs.sh

  • Committer: Zsombor Egri
  • Date: 2013-12-13 14:10:39 UTC
  • mfrom: (890 trunk)
  • mto: This revision was merged to the branch mainline in revision 894.
  • Revision ID: zsombor.egri@canonical.com-20131213141039-tt2ra31geou2cgfl
trunk merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
16
#
17
17
 
 
18
DOC_PATH=$1
 
19
if [ ! $SRC -o ! $DOC_PATH ]; then
 
20
    echo "Error - SRC and DOC_PATH must be defined"
 
21
    exit 1
 
22
fi
 
23
 
 
24
# Offline docs for QtCreator
 
25
qdoc $DOC_PATH/ubuntu-ui-toolkit-qtcreator.qdocconf 2> $DOC_PATH/qdoc.err
 
26
# FIXME: With Qt 5.2 this warning shows up, forcibly omit it from errors
 
27
cat $DOC_PATH/qdoc.err | grep -v "qdoc: warning: No documentation for 'global'" > $DOC_PATH/qdoc.err
 
28
test ! -s $DOC_PATH/qdoc.err || exit 1
 
29
echo docs: Offline done.
 
30
 
 
31
qhelpgenerator -o "$DOC_PATH/html/ubuntuuserinterfacetoolkit.qch" "$DOC_PATH/html/ubuntuuserinterfacetoolkit.qhp"
 
32
echo docs: qch done.
 
33
 
 
34
# Online docs. Run qdoc twice: the second run with indexes for cross-referencing
 
35
# other APIs but discard errors because qdoc inherits all doc bugs otherwise
 
36
qdoc $DOC_PATH/ubuntu-ui-toolkit-online.qdocconf 2> $DOC_PATH/qdoc.err
 
37
cat $DOC_PATH/qdoc.err | grep -v "qdoc: warning: No documentation for 'global'" > $DOC_PATH/qdoc.err
 
38
test ! -s $DOC_PATH/qdoc.err || exit 1
 
39
echo docs: Online done.
 
40
 
 
41
qdoc $DOC_PATH/ubuntu-ui-toolkit-online-indexes.qdocconf 2> /dev/null
 
42
echo docs: Cross-referenced done.
 
43
 
18
44
sed -r -i 's@("main-content">)@\1<ul class="breadcrumb">@g' $1/html/*.html
19
45
sed -r -i 's@(<div class="toc">|<h1 class="title">)@</ul>\1@g' $1/html/*.html
20
46
sed -r -i 's@(</p>)<p/>@\1@g' $1/html/*.html
21
47
sed -r -i 's@(<a class="(next|prev)Page" href=".+">)(.+)(</a>)@<li>\1\3\4</li>@g' $1/html/*.html
22
48
sed -r -i 's@(href="qmlmodule-ubuntu-components0-ubuntu-components-0-1.html">Basic QML Types)@href="overview-ubuntu-sdk.html">Ubuntu User Interface Toolkit@g' $1/html/*.html
 
49
echo docs: HTML fixes done.