~zsombi/ubuntu-ui-toolkit/contextualActions

« back to all changes in this revision

Viewing changes to documentation/docs.sh

  • Committer: Benjamin Zeller
  • Date: 2015-05-19 07:55:27 UTC
  • mto: (1504.7.12 staging)
  • mto: This revision was merged to the branch mainline in revision 1574.
  • Revision ID: benjamin.zeller@canonical.com-20150519075527-45m71k28dd6pjgea
Create docs again

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
 
18
QDOC_PATH=$1
 
19
QHELPGEN_PATH=$2
 
20
DOC_PATH=$3
19
21
if [ ! $SRC -o ! $DOC_PATH ]; then
20
22
    echo "Error - SRC and DOC_PATH must be defined"
21
23
    exit 1
24
26
mkdir -p $DOC_PATH
25
27
 
26
28
# Offline docs for QtCreator
27
 
qdoc $SRC/ubuntu-ui-toolkit-qtcreator.qdocconf 2> $DOC_PATH/qdoc.log
 
29
$QDOC_PATH $SRC/ubuntu-ui-toolkit-qtcreator.qdocconf 2> $DOC_PATH/qdoc.log
28
30
# FIXME: With Qt 5.2 this warning shows up, forcibly omit it from errors
29
31
grep -v "error: HTML file already exists; overwriting" $DOC_PATH/qdoc.log | grep -v "qdoc: warning: No documentation for 'global'" > $DOC_PATH/qdoc.err
30
32
cat $DOC_PATH/qdoc.err
31
33
test ! -s $DOC_PATH/qdoc.err || exit 1
32
34
echo docs: Offline done.
33
35
 
34
 
qhelpgenerator -o "$DOC_PATH/ubuntuuserinterfacetoolkit.qch" "$DOC_PATH/offline/ubuntuuserinterfacetoolkit.qhp" | grep -v ' does not exist! Skipping it'
 
36
$QHELPGEN_PATH -o "$DOC_PATH/ubuntuuserinterfacetoolkit.qch" "$DOC_PATH/offline/ubuntuuserinterfacetoolkit.qhp" | grep -v ' does not exist! Skipping it'
35
37
echo docs: qch done: $DOC_PATH
36
38
 
37
39
# Online docs. Run qdoc twice: the second run with indexes for cross-referencing
38
40
# other APIs but discard errors because qdoc inherits all doc bugs otherwise
39
 
qdoc $SRC/ubuntu-ui-toolkit-online.qdocconf 2> $DOC_PATH/qdoc.log
 
41
$QDOC_PATH $SRC/ubuntu-ui-toolkit-online.qdocconf 2> $DOC_PATH/qdoc.log
40
42
grep -v "error: HTML file already exists; overwriting" $DOC_PATH/qdoc.log | grep -v "qdoc: warning: No documentation for 'global'" > $DOC_PATH/qdoc.err
41
43
cat $DOC_PATH/qdoc.err
42
44
test ! -s $DOC_PATH/qdoc.err || exit 1
43
45
echo docs: Online done.
44
46
 
45
 
qdoc $SRC/ubuntu-ui-toolkit-online-indexes.qdocconf 2> /dev/null
 
47
$QDOC_PATH $SRC/ubuntu-ui-toolkit-online-indexes.qdocconf 2> /dev/null
46
48
echo docs: Cross-referenced done.
47
49
 
48
 
sed -r -i 's@(</p>)<p/>@\1@g' $1/html/*.html
49
 
sed -r -i 's@(<a class="(next|prev)Page" href=".+">)(.+)(</a>)@<li>\1\3\4</li>@g' $1/html/*.html
50
 
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
 
50
sed -r -i 's@(</p>)<p/>@\1@g' $DOC_PATH/html/*.html
 
51
sed -r -i 's@(<a class="(next|prev)Page" href=".+">)(.+)(</a>)@<li>\1\3\4</li>@g' $DOC_PATH/html/*.html
 
52
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' $DOC_PATH/html/*.html
51
53
echo docs: HTML fixes done.