Merge lp:~mhall119/developer-ubuntu-com/vivid-api-docs into lp:developer-ubuntu-com

Proposed by Michael Hall
Status: Merged
Approved by: Michael Hall
Approved revision: 114
Merged at revision: 117
Proposed branch: lp:~mhall119/developer-ubuntu-com/vivid-api-docs
Merge into: lp:developer-ubuntu-com
Diff against target: 195 lines (+52/-33)
4 files modified
api_docs/importers/__init__.py (+16/-0)
api_docs/importers/doxygen.py (+4/-1)
api_docs/importers/qdoc.py (+1/-1)
update_apidocs.sh (+31/-31)
To merge this branch: bzr merge lp:~mhall119/developer-ubuntu-com/vivid-api-docs
Reviewer Review Type Date Requested Status
David Callé (community) Approve
Review via email: mp+259171@code.launchpad.net

Description of the change

Make the switch to auto-importing ubuntu-sdk-15.05 framework docs

To post a comment you must log in.
Revision history for this message
David Callé (davidc3) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'api_docs/importers/__init__.py'
2--- api_docs/importers/__init__.py 2015-02-26 15:26:20 +0000
3+++ api_docs/importers/__init__.py 2015-05-14 21:11:01 +0000
4@@ -32,6 +32,22 @@
5
6 self.file_storage = get_storage_class()()
7
8+ def strip_links(self, line):
9+ clean_line = line
10+ removal = self.LINK_REGEX.search(line)
11+ while removal:
12+ source = removal.group(0)
13+ replace = removal.group('text')
14+ if '</a>' in replace:
15+ source = source[:source.index('</a>')+4]
16+ replace = replace[:replace.index('</a>')]
17+ if self.verbosity >= 3:
18+ print "Removing link: %s" % removal.group(0)
19+ print " From: %s\n To: %s" % (source, replace)
20+ clean_line = clean_line.replace(source, replace)
21+ removal = self.LINK_REGEX.search(clean_line)
22+ return clean_line
23+
24 def clean_links(self, line, source_filename, element_fullname=None):
25 try:
26 # Clean Links
27
28=== modified file 'api_docs/importers/doxygen.py'
29--- api_docs/importers/doxygen.py 2015-03-27 21:00:43 +0000
30+++ api_docs/importers/doxygen.py 2015-05-14 21:11:01 +0000
31@@ -106,7 +106,10 @@
32
33 self.read_classes(self.read_json_file(os.path.join(self.source, 'annotated.js')))
34 if not self.options.get('no_pages', False):
35- self.read_pages(self.read_json_file(os.path.join(self.source, 'navtree.js')), self.parse_namespace(None))
36+ if os.path.exists(os.path.join(self.source, 'navtreedata.js')):
37+ self.read_pages(self.read_json_file(os.path.join(self.source, 'navtreedata.js')), self.parse_namespace(None))
38+ elif os.path.exists(os.path.join(self.source, 'navtree.js')):
39+ self.read_pages(self.read_json_file(os.path.join(self.source, 'navtree.js')), self.parse_namespace(None))
40 #exit(0)
41
42 namespace_order_index = 0
43
44=== modified file 'api_docs/importers/qdoc.py'
45--- api_docs/importers/qdoc.py 2015-03-27 19:53:26 +0000
46+++ api_docs/importers/qdoc.py 2015-05-14 21:11:01 +0000
47@@ -160,7 +160,7 @@
48
49 try:
50 brief_start = doc_data.index('<!-- $$$'+element.name+'-brief -->\n')
51- element.description = self.parse_line(doc_data[brief_start+1][3:-35], classhref, fullname)
52+ element.description = self.strip_links(doc_data[brief_start+1][3:-35])
53 if len(element.description) >= 256:
54 element.description = element.description[:252]+'...'
55 except ValueError:
56
57=== modified file 'update_apidocs.sh'
58--- update_apidocs.sh 2015-04-14 02:04:46 +0000
59+++ update_apidocs.sh 2015-05-14 21:11:01 +0000
60@@ -3,104 +3,104 @@
61 mkdir -p /tmp/apidoc_sources/
62
63 # Archives to download packages from
64-export SERIES="utopic"
65+export SERIES="vivid"
66
67 #### Apps/QML
68 ## QtQML & QtQuick
69 ./get_package.sh qtdeclarative5-doc-html
70-python manage.py import_qdoc -p -t apps -l qml -r sdk-14.10 -s "Language Types" -N QtQml -i /tmp/apidoc_sources/usr/share/qt5/doc/qtqml/qtqml.index
71-python manage.py import_qdoc -p -t apps -l qml -r sdk-14.10 -s "Graphical Interface" -n QtQuick -i /tmp/apidoc_sources/usr/share/qt5/doc/qtquick/qtquick.index
72+python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04 -s "Language Types" -N QtQml -i /tmp/apidoc_sources/usr/share/qt5/doc/qtqml/qtqml.index
73+python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04 -s "Graphical Interface" -n QtQuick -i /tmp/apidoc_sources/usr/share/qt5/doc/qtquick/qtquick.index
74
75 ## QtMultimedia & QtAudioEngine
76 ./get_package.sh qtmultimedia5-doc-html
77-python manage.py import_qdoc -p -t apps -l qml -r sdk-14.10 -s "Multimedia" -n QtMultimedia -i /tmp/apidoc_sources/usr/share/qt5/doc/qtmultimedia/qtmultimedia.index
78+python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04 -s "Multimedia" -n QtMultimedia -i /tmp/apidoc_sources/usr/share/qt5/doc/qtmultimedia/qtmultimedia.index
79
80 ## QtSensors
81 ./get_package.sh qtsensors5-doc-html
82-python manage.py import_qdoc -p -t apps -l qml -r sdk-14.10 -s "Device and Sensors" -n QtSensors -i /tmp/apidoc_sources/usr/share/qt5/doc/qtsensors/qtsensors.index
83+python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04 -s "Device and Sensors" -n QtSensors -i /tmp/apidoc_sources/usr/share/qt5/doc/qtsensors/qtsensors.index
84
85 ## QtFeedback
86-SERIES=vivid ./get_package.sh qtfeedback5-doc-html
87-python manage.py import_qdoc -t apps -l qml -r sdk-14.10 -s "Device and Sensors" -n QtFeedback -i /tmp/apidoc_sources/usr/share/qt5/doc/qtfeedback/qtfeedback.index
88+./get_package.sh qtfeedback5-doc-html
89+python manage.py import_qdoc -t apps -l qml -r sdk-15.04 -s "Device and Sensors" -n QtFeedback -i /tmp/apidoc_sources/usr/share/qt5/doc/qtfeedback/qtfeedback.index
90
91 ## QtLocation
92 ./get_package.sh qtlocation5-doc-html
93-python manage.py import_qdoc -p -t apps -l qml -r sdk-14.10 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtlocation/qtlocation.index
94+python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtlocation/qtlocation.index
95
96 ## QtOrganizer
97-SERIES=vivid ./get_package.sh qtpim5-doc-html
98-python manage.py import_qdoc -t apps -l qml -r sdk-14.10 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtorganizer/qtorganizer.index
99-python manage.py import_qdoc -t apps -l qml -r sdk-14.10 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtcontacts/qtcontacts.index
100+./get_package.sh qtpim5-doc-html
101+python manage.py import_qdoc -t apps -l qml -r sdk-15.04 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtorganizer/qtorganizer.index
102+python manage.py import_qdoc -t apps -l qml -r sdk-15.04 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtcontacts/qtcontacts.index
103
104 ## Ubuntu.Components
105 ./get_package.sh ubuntu-ui-toolkit-doc
106-python manage.py import_qdoc -Pp -t apps -l qml -r sdk-14.10 -s "Graphical Interface" -n Ubuntu.Components -i /tmp/apidoc_sources/usr/share/ubuntu-ui-toolkit/doc/html/ubuntuuserinterfacetoolkit.index
107+python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04 -s "Graphical Interface" -n Ubuntu.Components -i /tmp/apidoc_sources/usr/share/ubuntu-ui-toolkit/doc/html/ubuntuuserinterfacetoolkit.index
108
109 ## Ubuntu.OnlineAccounts
110 ./get_package.sh accounts-qml-module-doc
111-python manage.py import_qdoc -Pp -t apps -l qml -r sdk-14.10 -s "Platform Services" -N Ubuntu.OnlineAccounts -i /tmp/apidoc_sources/usr/share/accounts-qml-module/doc/html/onlineaccounts-qml-api.index
112+python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04 -s "Platform Services" -N Ubuntu.OnlineAccounts -i /tmp/apidoc_sources/usr/share/accounts-qml-module/doc/html/onlineaccounts-qml-api.index
113
114 ## Ubuntu.Content
115 ./get_package.sh libcontent-hub-doc
116 gunzip -f /tmp/apidoc_sources/usr/share/doc/content-hub/qml/html/ubuntu-content-qml-api.index.gz
117-python manage.py import_qdoc -Pp -t apps -l qml -r sdk-14.10 -s "Platform Services" -N Ubuntu.Content -i /tmp/apidoc_sources/usr/share/doc/content-hub/qml/html/ubuntu-content-qml-api.index
118+python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04 -s "Platform Services" -N Ubuntu.Content -i /tmp/apidoc_sources/usr/share/doc/content-hub/qml/html/ubuntu-content-qml-api.index
119
120 # U1db
121-SERIES=vivid ./get_package.sh libu1db-qt5-doc
122-python manage.py import_qdoc -p -t apps -l qml -r sdk-14.10 -s "Platform Services" -N U1db -i /tmp/apidoc_sources/usr/share/u1db-qt/doc/html/u1db-qt.index
123+./get_package.sh libu1db-qt5-doc
124+python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04 -s "Platform Services" -N U1db -i /tmp/apidoc_sources/usr/share/u1db-qt/doc/html/u1db-qt.index
125
126 ## Ubuntu.DownloadManager
127 ./get_package.sh libubuntu-download-manager-client-doc
128 gunzip -f /tmp/apidoc_sources/usr/share/doc/ubuntu-download-manager/qml/html/ubuntu-download-manager-qml-api.index.gz
129-python manage.py import_qdoc -Pp -t apps -l qml -r sdk-14.10 -s "Platform Services" -N Ubuntu.DownloadManager -i /tmp/apidoc_sources/usr/share/doc/ubuntu-download-manager/qml/html/ubuntu-download-manager-qml-api.index
130+python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04 -s "Platform Services" -N Ubuntu.DownloadManager -i /tmp/apidoc_sources/usr/share/doc/ubuntu-download-manager/qml/html/ubuntu-download-manager-qml-api.index
131
132 ## Ubuntu.Web
133 ./get_package.sh qtdeclarative5-ubuntu-web-plugin-doc
134 gunzip -f /tmp/apidoc_sources/usr/share/doc/ubuntu-web/html/ubuntuweb.index.gz
135-python manage.py import_qdoc -Pp -t apps -l qml -r sdk-14.10 -s "Graphical Interface" -N Ubuntu.Web -i /tmp/apidoc_sources/usr/share/doc/ubuntu-web/html/ubuntuweb.index
136+python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04 -s "Graphical Interface" -N Ubuntu.Web -i /tmp/apidoc_sources/usr/share/doc/ubuntu-web/html/ubuntuweb.index
137
138 #### Aps/HTML5
139 ## UbuntuUI
140-SERIES=vivid ./get_package.sh ubuntu-html5-ui-toolkit-doc
141-python manage.py import_yuidoc -i -t apps -l html5 -r sdk-14.10 -s "Graphical Interface" -d /tmp/apidoc_sources/usr/share/doc/ubuntu-html5-ui-toolkit-doc/data.json
142+./get_package.sh ubuntu-html5-ui-toolkit-doc
143+python manage.py import_yuidoc -i -t apps -l html5 -r sdk-15.04 -s "Graphical Interface" -d /tmp/apidoc_sources/usr/share/doc/ubuntu-html5-ui-toolkit-doc/data.json
144
145 ## Cordova
146 #wget -P /tmp/apidoc_sources/ -nc https://swift.canonistack.canonical.com/v1/AUTH_28f73a401b8a4dfeab9f0f02f789d1ac/html5-api-docs/docs/cordova-docs.utopic.tar.gz
147 #tar -C /tmp/apidoc_sources/ -xzf /tmp/apidoc_sources/cordova-docs.utopic.tar.gz
148-#python manage.py import_cordova -t apps -l html5 -r sdk-14.10 -i /tmp/apidoc_sources/utopic/cordova-docs/public/en/4.0.0/index.json
149+#python manage.py import_cordova -t apps -l html5 -r sdk-15.04 -i /tmp/apidoc_sources/utopic/cordova-docs/public/en/4.0.0/index.json
150
151 ## Platform Bindings
152-SERIES=vivid ./get_package.sh unity-webapps-qml-doc
153+./get_package.sh unity-webapps-qml-doc
154 ## OnlineAccounts3
155-python manage.py import_yuidoc -t apps -l html5 -r sdk-14.10 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/online-accounts/data.json
156+python manage.py import_yuidoc -t apps -l html5 -r sdk-15.04 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/online-accounts/data.json
157 ## AlarmAPI
158-python manage.py import_yuidoc -t apps -l html5 -r sdk-14.10 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/alarm-api/data.json
159+python manage.py import_yuidoc -t apps -l html5 -r sdk-15.04 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/alarm-api/data.json
160 ## ContentHub
161-python manage.py import_yuidoc -t apps -l html5 -r sdk-14.10 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/content-hub/data.json
162+python manage.py import_yuidoc -t apps -l html5 -r sdk-15.04 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/content-hub/data.json
163 ## RuntimeAPI
164-python manage.py import_yuidoc -t apps -l html5 -r sdk-14.10 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/runtime-api/data.json
165+python manage.py import_yuidoc -t apps -l html5 -r sdk-15.04 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/runtime-api/data.json
166
167 #### Autopilot/Python
168 ## Autopilot
169-SERIES=vivid ./get_package.sh python3-autopilot
170+./get_package.sh python3-autopilot
171 find /tmp/apidoc_sources/usr/share/doc/python3-autopilot/json/ -name "*.gz" -print0 |xargs -0 gunzip
172 python manage.py import_sphinx -t autopilot -l python -r 1.5.0 -s ./api_docs/importers/autopilot_sections.py -i /tmp/apidoc_sources/usr/share/doc/python3-autopilot/json/objects.inv
173
174-SERIES=vivid ARCH=i386 ./get_package.sh ubuntu-ui-toolkit-autopilot
175+ARCH=i386 ./get_package.sh ubuntu-ui-toolkit-autopilot
176 find /tmp/apidoc_sources/usr/share/doc/ubuntu-ui-toolkit-autopilot/json/ -name "*.gz" -print0 |xargs -0 gunzip
177 python manage.py import_sphinx -t autopilot -l python -r 1.5.0 -s ./api_docs/importers/autopilot_sections.py -i /tmp/apidoc_sources/usr/share/doc/ubuntu-ui-toolkit-autopilot/json/objects.inv
178
179 #### Scopes/C++
180 ## unity.scopes
181 ./get_package.sh libunity-scopes-doc
182-python manage.py import_doxygen -t scopes -l cpp -r sdk-14.10 -s ./api_docs/importers/scope_sections.py -N unity.scopes -d /tmp/apidoc_sources/usr/share/doc/unity-scopes/
183+python manage.py import_doxygen -t scopes -l cpp -r sdk-15.04 -s ./api_docs/importers/scope_sections.py -N unity.scopes -d /tmp/apidoc_sources/usr/share/doc/unity-scopes/
184
185 ## Accounts
186 ./get_package.sh libaccounts-qt-doc
187-python manage.py import_doxygen -t scopes -l cpp -r sdk-14.10 -s ./api_docs/importers/accounts_sections.py -n Accounts -d /tmp/apidoc_sources/usr/share/doc/libaccounts-qt/html/
188+python manage.py import_doxygen -t scopes -l cpp -r sdk-15.04 -s ./api_docs/importers/accounts_sections.py -n Accounts -d /tmp/apidoc_sources/usr/share/doc/libaccounts-qt/html/
189
190 ## U1db
191 ./get_package.sh libu1db-qt5-doc
192-python manage.py import_qdoc -Pp -N U1db -t scopes -l cpp -r sdk-14.10 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/u1db-qt/doc/html/u1db-qt.index
193+python manage.py import_qdoc -Pp -N U1db -t scopes -l cpp -r sdk-15.04 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/u1db-qt/doc/html/u1db-qt.index
194
195 rm -r /tmp/apidoc_sources/

Subscribers

People subscribed via source and target branches