Merge lp:~mhall119/developer-ubuntu-com/apidoc-frameworks-creation into lp:developer-ubuntu-com
- apidoc-frameworks-creation
- Merge into stable
Proposed by
Michael Hall
Status: | Merged |
---|---|
Approved by: | Daniel Holbach |
Approved revision: | 192 |
Merged at revision: | 196 |
Proposed branch: | lp:~mhall119/developer-ubuntu-com/apidoc-frameworks-creation |
Merge into: | lp:developer-ubuntu-com |
Diff against target: |
444 lines (+157/-57) 12 files modified
api_docs/admin.py (+1/-1) api_docs/management/commands/import_cordova.py (+6/-1) api_docs/management/commands/import_doxygen.py (+6/-1) api_docs/management/commands/import_qdoc.py (+6/-1) api_docs/management/commands/import_sphinx.py (+6/-1) api_docs/management/commands/import_yuidoc.py (+6/-1) api_docs/models.py (+46/-8) api_docs/templates/api_docs/version.html (+8/-0) api_docs/templates/api_docs/version_edit.html (+12/-15) api_docs/urls.py (+1/-0) api_docs/views.py (+32/-0) update_apidocs.sh (+27/-28) |
To merge this branch: | bzr merge lp:~mhall119/developer-ubuntu-com/apidoc-frameworks-creation |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Holbach (community) | Approve | ||
Review via email: mp+287069@code.launchpad.net |
Commit message
Updates to make it easier to manage new framework releases
Description of the change
Updates to make it easier to manage new framework releases
* Change importers to allow targeting version aliases (development & current)
* Add clone methods to API docs models
* Add "New Release" link to development version page (only for admins)
* Add page for defining the new development version name
To post a comment you must log in.
Revision history for this message
Michael Hall (mhall119) wrote : | # |
Revision history for this message
Daniel Holbach (dholbach) wrote : | # |
Looks good to me.
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'api_docs/admin.py' | |||
2 | --- api_docs/admin.py 2015-02-05 14:24:04 +0000 | |||
3 | +++ api_docs/admin.py 2016-02-24 17:45:37 +0000 | |||
4 | @@ -7,7 +7,7 @@ | |||
5 | 7 | admin.site.register(Topic, TopicAdmin) | 7 | admin.site.register(Topic, TopicAdmin) |
6 | 8 | 8 | ||
7 | 9 | class LanguageAdmin(admin.ModelAdmin): | 9 | class LanguageAdmin(admin.ModelAdmin): |
9 | 10 | list_display = ('name', 'slug', 'topic') | 10 | list_display = ('name', 'slug', 'topic', 'current_version', 'development_version') |
10 | 11 | list_filter = ('topic',) | 11 | list_filter = ('topic',) |
11 | 12 | search_fields = ('name', 'slug') | 12 | search_fields = ('name', 'slug') |
12 | 13 | admin.site.register(Language, LanguageAdmin) | 13 | admin.site.register(Language, LanguageAdmin) |
13 | 14 | 14 | ||
14 | === modified file 'api_docs/management/commands/import_cordova.py' | |||
15 | --- api_docs/management/commands/import_cordova.py 2015-02-17 20:14:09 +0000 | |||
16 | +++ api_docs/management/commands/import_cordova.py 2016-02-24 17:45:37 +0000 | |||
17 | @@ -51,7 +51,12 @@ | |||
18 | 51 | verbosity = int(options.get('verbosity', 0)) | 51 | verbosity = int(options.get('verbosity', 0)) |
19 | 52 | topic = Topic.objects.get(slug=options.get('topic')) | 52 | topic = Topic.objects.get(slug=options.get('topic')) |
20 | 53 | language = Language.objects.get(slug=options.get('lang'), topic=topic) | 53 | language = Language.objects.get(slug=options.get('lang'), topic=topic) |
22 | 54 | version = Version.objects.get(slug=options.get('version'), language=language) | 54 | if options.get('version') == 'development': |
23 | 55 | version = language.development_version | ||
24 | 56 | elif options.get('version') == 'current': | ||
25 | 57 | version = language.current_version | ||
26 | 58 | else: | ||
27 | 59 | version = Version.objects.get(slug=options.get('version'), language=language) | ||
28 | 55 | section = None # Determined at runtime | 60 | section = None # Determined at runtime |
29 | 56 | 61 | ||
30 | 57 | importer = CordovaImporter(topic, language, version, section, options) | 62 | importer = CordovaImporter(topic, language, version, section, options) |
31 | 58 | 63 | ||
32 | === modified file 'api_docs/management/commands/import_doxygen.py' | |||
33 | --- api_docs/management/commands/import_doxygen.py 2015-02-17 20:14:09 +0000 | |||
34 | +++ api_docs/management/commands/import_doxygen.py 2016-02-24 17:45:37 +0000 | |||
35 | @@ -90,7 +90,12 @@ | |||
36 | 90 | verbosity = int(options.get('verbosity', 0)) | 90 | verbosity = int(options.get('verbosity', 0)) |
37 | 91 | topic = Topic.objects.get(slug=options.get('topic')) | 91 | topic = Topic.objects.get(slug=options.get('topic')) |
38 | 92 | language = Language.objects.get(slug=options.get('lang'), topic=topic) | 92 | language = Language.objects.get(slug=options.get('lang'), topic=topic) |
40 | 93 | version = Version.objects.get(slug=options.get('version'), language=language) | 93 | if options.get('version') == 'development': |
41 | 94 | version = language.development_version | ||
42 | 95 | elif options.get('version') == 'current': | ||
43 | 96 | version = language.current_version | ||
44 | 97 | else: | ||
45 | 98 | version = Version.objects.get(slug=options.get('version'), language=language) | ||
46 | 94 | section = None # Will be determined during import | 99 | section = None # Will be determined during import |
47 | 95 | 100 | ||
48 | 96 | importer = DoxygenImporter(topic, language, version, section, options) | 101 | importer = DoxygenImporter(topic, language, version, section, options) |
49 | 97 | 102 | ||
50 | === modified file 'api_docs/management/commands/import_qdoc.py' | |||
51 | --- api_docs/management/commands/import_qdoc.py 2015-02-17 20:14:09 +0000 | |||
52 | +++ api_docs/management/commands/import_qdoc.py 2016-02-24 17:45:37 +0000 | |||
53 | @@ -83,7 +83,12 @@ | |||
54 | 83 | verbosity = int(options.get('verbosity', 0)) | 83 | verbosity = int(options.get('verbosity', 0)) |
55 | 84 | topic = Topic.objects.get(slug=options.get('topic')) | 84 | topic = Topic.objects.get(slug=options.get('topic')) |
56 | 85 | language = Language.objects.get(slug=options.get('lang'), topic=topic) | 85 | language = Language.objects.get(slug=options.get('lang'), topic=topic) |
58 | 86 | version = Version.objects.get(slug=options.get('version'), language=language) | 86 | if options.get('version') == 'development': |
59 | 87 | version = language.development_version | ||
60 | 88 | elif options.get('version') == 'current': | ||
61 | 89 | version = language.current_version | ||
62 | 90 | else: | ||
63 | 91 | version = Version.objects.get(slug=options.get('version'), language=language) | ||
64 | 87 | section, created = Section.objects.get_or_create(name=options.get('section'), topic_version=version) | 92 | section, created = Section.objects.get_or_create(name=options.get('section'), topic_version=version) |
65 | 88 | 93 | ||
66 | 89 | importer = QDocImporter(topic, language, version, section, options) | 94 | importer = QDocImporter(topic, language, version, section, options) |
67 | 90 | 95 | ||
68 | === modified file 'api_docs/management/commands/import_sphinx.py' | |||
69 | --- api_docs/management/commands/import_sphinx.py 2015-02-05 14:24:04 +0000 | |||
70 | +++ api_docs/management/commands/import_sphinx.py 2016-02-24 17:45:37 +0000 | |||
71 | @@ -90,7 +90,12 @@ | |||
72 | 90 | verbosity = int(options.get('verbosity', 0)) | 90 | verbosity = int(options.get('verbosity', 0)) |
73 | 91 | topic = Topic.objects.get(slug=options.get('topic')) | 91 | topic = Topic.objects.get(slug=options.get('topic')) |
74 | 92 | language = Language.objects.get(slug=options.get('lang'), topic=topic) | 92 | language = Language.objects.get(slug=options.get('lang'), topic=topic) |
76 | 93 | version = Version.objects.get(slug=options.get('version'), language=language) | 93 | if options.get('version') == 'development': |
77 | 94 | version = language.development_version | ||
78 | 95 | elif options.get('version') == 'current': | ||
79 | 96 | version = language.current_version | ||
80 | 97 | else: | ||
81 | 98 | version = Version.objects.get(slug=options.get('version'), language=language) | ||
82 | 94 | section = None # Will be determined during import | 99 | section = None # Will be determined during import |
83 | 95 | 100 | ||
84 | 96 | importer = SphinxImporter(topic, language, version, section, options) | 101 | importer = SphinxImporter(topic, language, version, section, options) |
85 | 97 | 102 | ||
86 | === modified file 'api_docs/management/commands/import_yuidoc.py' | |||
87 | --- api_docs/management/commands/import_yuidoc.py 2015-02-17 20:14:09 +0000 | |||
88 | +++ api_docs/management/commands/import_yuidoc.py 2016-02-24 17:45:37 +0000 | |||
89 | @@ -76,7 +76,12 @@ | |||
90 | 76 | verbosity = int(options.get('verbosity', 0)) | 76 | verbosity = int(options.get('verbosity', 0)) |
91 | 77 | topic = Topic.objects.get(slug=options.get('topic')) | 77 | topic = Topic.objects.get(slug=options.get('topic')) |
92 | 78 | language = Language.objects.get(slug=options.get('lang'), topic=topic) | 78 | language = Language.objects.get(slug=options.get('lang'), topic=topic) |
94 | 79 | version = Version.objects.get(slug=options.get('version'), language=language) | 79 | if options.get('version') == 'development': |
95 | 80 | version = language.development_version | ||
96 | 81 | elif options.get('version') == 'current': | ||
97 | 82 | version = language.current_version | ||
98 | 83 | else: | ||
99 | 84 | version = Version.objects.get(slug=options.get('version'), language=language) | ||
100 | 80 | section, created = Section.objects.get_or_create(name=options.get('section'), topic_version=version) | 85 | section, created = Section.objects.get_or_create(name=options.get('section'), topic_version=version) |
101 | 81 | 86 | ||
102 | 82 | importer = YUIDocImporter(topic, language, version, section, options) | 87 | importer = YUIDocImporter(topic, language, version, section, options) |
103 | 83 | 88 | ||
104 | === modified file 'api_docs/models.py' | |||
105 | --- api_docs/models.py 2015-02-26 15:26:20 +0000 | |||
106 | +++ api_docs/models.py 2016-02-24 17:45:37 +0000 | |||
107 | @@ -28,6 +28,10 @@ | |||
108 | 28 | name = models.CharField(max_length=64) | 28 | name = models.CharField(max_length=64) |
109 | 29 | slug = models.CharField(max_length=64) | 29 | slug = models.CharField(max_length=64) |
110 | 30 | 30 | ||
111 | 31 | def import_from(self, target_version): | ||
112 | 32 | for section in target_version.section_set.all(): | ||
113 | 33 | self.section_set.add(section.clone()) | ||
114 | 34 | |||
115 | 31 | def __unicode__(self): | 35 | def __unicode__(self): |
116 | 32 | return self.language.topic.name +' '+self.language.name +' '+self.name | 36 | return self.language.topic.name +' '+self.language.name +' '+self.name |
117 | 33 | 37 | ||
118 | @@ -41,6 +45,28 @@ | |||
119 | 41 | def __unicode__(self): | 45 | def __unicode__(self): |
120 | 42 | return self.topic_version.language.topic.name +' '+ self.topic_version.language.name +' '+self.topic_version.name+', '+self.name | 46 | return self.topic_version.language.topic.name +' '+ self.topic_version.language.name +' '+self.topic_version.name+', '+self.name |
121 | 43 | 47 | ||
122 | 48 | def clone(self): | ||
123 | 49 | new = Section(name=self.name, description=self.description, topic_version=self.topic_version) | ||
124 | 50 | new.save() | ||
125 | 51 | for namespace in self.namespace_set.all(): | ||
126 | 52 | new.namespace_set.add(namespace.clone(new)) | ||
127 | 53 | |||
128 | 54 | for element in self.element_set.all(): | ||
129 | 55 | if not element.namespace: | ||
130 | 56 | element.section = new | ||
131 | 57 | element.id = None | ||
132 | 58 | element.save() | ||
133 | 59 | new.element_set.add(element) | ||
134 | 60 | |||
135 | 61 | for page in self.page_set.all(): | ||
136 | 62 | if not page.namespace: | ||
137 | 63 | page.section = new | ||
138 | 64 | page.id = None | ||
139 | 65 | page.save() | ||
140 | 66 | new.page_set.add(page) | ||
141 | 67 | |||
142 | 68 | return new | ||
143 | 69 | |||
144 | 44 | @property | 70 | @property |
145 | 45 | def topic(self): | 71 | def topic(self): |
146 | 46 | return self.topic_version.topic | 72 | return self.topic_version.topic |
147 | @@ -76,6 +102,26 @@ | |||
148 | 76 | def __unicode__(self): | 102 | def __unicode__(self): |
149 | 77 | return u'%s' % self.name | 103 | return u'%s' % self.name |
150 | 78 | 104 | ||
151 | 105 | def clone(self, new_section): | ||
152 | 106 | new = Namespace(name=self.name, display_name=self.display_name, data=self.data, source_file=self.source_file, source_format=self.source_format, platform_section=new_section) | ||
153 | 107 | new.save() | ||
154 | 108 | |||
155 | 109 | for element in self.element_set.all(): | ||
156 | 110 | element.section = new_section | ||
157 | 111 | element.namespace = new | ||
158 | 112 | element.id = None | ||
159 | 113 | element.save() | ||
160 | 114 | new.element_set.add(element) | ||
161 | 115 | |||
162 | 116 | for page in self.page_set.all(): | ||
163 | 117 | page.section = new_section | ||
164 | 118 | page.namespace = new | ||
165 | 119 | page.id = None | ||
166 | 120 | page.save() | ||
167 | 121 | new.page_set.add(page) | ||
168 | 122 | |||
169 | 123 | return new | ||
170 | 124 | |||
171 | 79 | @property | 125 | @property |
172 | 80 | def display(self): | 126 | def display(self): |
173 | 81 | if self.display_name: | 127 | if self.display_name: |
174 | @@ -137,11 +183,3 @@ | |||
175 | 137 | def __unicode__(self): | 183 | def __unicode__(self): |
176 | 138 | return u'%s' % self.fullname | 184 | return u'%s' % self.fullname |
177 | 139 | 185 | ||
178 | 140 | #class DocSource(models.Model): | ||
179 | 141 | #'Source of API documentation' | ||
180 | 142 | #source_name = models.CharField(max_length=64, help_text='Unique name, processed in alphabetical order') | ||
181 | 143 | #source_url = models.UrlField(max_length=256, help_text='Publicly accessible download location') | ||
182 | 144 | #last_run = models.DateTime(auto_now=True) | ||
183 | 145 | #run_script = models.TextField(help_text='Script to run on package contents to import their docs') | ||
184 | 146 | #last_stdout = models.TextField(help_text='Output from the last run') | ||
185 | 147 | #last_stdeff = models.TextField(help_text='Errors from the last run') | ||
186 | 148 | 186 | ||
187 | === modified file 'api_docs/templates/api_docs/version.html' | |||
188 | --- api_docs/templates/api_docs/version.html 2015-02-05 14:24:04 +0000 | |||
189 | +++ api_docs/templates/api_docs/version.html 2016-02-24 17:45:37 +0000 | |||
190 | @@ -9,6 +9,14 @@ | |||
191 | 9 | <li class="">{{version.name}}</li> | 9 | <li class="">{{version.name}}</li> |
192 | 10 | {% endblock %} | 10 | {% endblock %} |
193 | 11 | 11 | ||
194 | 12 | {% block nav_secondary %} | ||
195 | 13 | {% if perms.api_docs.add_version and version.language.development_version == version %} | ||
196 | 14 | <span style="float: right; vertical-align: middle;"><nav class="nav-secondary" style="border-bottom: 0px;"><ul><li><a href="{% url 'api_docs:release_version' language.topic.slug language.slug %}">New Release</a></li></ul></nav></span> | ||
197 | 15 | {% endif %} | ||
198 | 16 | {{block.super}} | ||
199 | 17 | {% endblock nav_secondary%} | ||
200 | 18 | |||
201 | 19 | |||
202 | 12 | {% block content %} | 20 | {% block content %} |
203 | 13 | <div class="row"> | 21 | <div class="row"> |
204 | 14 | <h2>{{version.language.name}} {{version.language.topic.name}} for {{version.name}}</h2> | 22 | <h2>{{version.language.name}} {{version.language.topic.name}} for {{version.name}}</h2> |
205 | 15 | 23 | ||
206 | === modified file 'api_docs/templates/api_docs/version_edit.html' | |||
207 | --- api_docs/templates/api_docs/version_edit.html 2015-02-05 14:24:04 +0000 | |||
208 | +++ api_docs/templates/api_docs/version_edit.html 2016-02-24 17:45:37 +0000 | |||
209 | @@ -1,23 +1,20 @@ | |||
211 | 1 | {% extends "api_docs/base.html" %} | 1 | {% extends "base.html" %} |
212 | 2 | 2 | ||
216 | 3 | {% block editor_links %} | 3 | {% block title %}New Release - Ubuntu Developer{% endblock %} |
214 | 4 | <li><a href="{% url version_edit version.id %}?action=delete">Delete</a></li> | ||
215 | 5 | {% endblock %} | ||
217 | 6 | 4 | ||
218 | 7 | {% block breadcrumbs %} | 5 | {% block breadcrumbs %} |
219 | 8 | {% endblock %} | 6 | {% endblock %} |
220 | 9 | 7 | ||
221 | 10 | {% block content %} | 8 | {% block content %} |
225 | 11 | {% if version.id %} | 9 | <div class="row"> |
223 | 12 | <h2>Edit {{version.name}}</h2> | ||
224 | 13 | {% else %} | ||
226 | 14 | <h2>New Version</h2> | 10 | <h2>New Version</h2> |
235 | 15 | {% endif %} | 11 | <h3>(Previous version: {{ previous.slug }})</h3> |
236 | 16 | 12 | <div class="six-col"> | |
237 | 17 | <form action="" method="POST" id="element_form"> | 13 | <form action="" method="POST" id="element_form"> |
238 | 18 | {% csrf_token %} | 14 | {% csrf_token %} |
239 | 19 | {{ form.as_p }} | 15 | {{ form.as_p }} |
240 | 20 | <input type="submit" value="Save"> | 16 | <input type="submit" value="Save"> |
241 | 21 | </form> | 17 | </form> |
242 | 22 | 18 | </div> | |
243 | 19 | </div> | ||
244 | 23 | {% endblock %} | 20 | {% endblock %} |
245 | 24 | 21 | ||
246 | === modified file 'api_docs/urls.py' | |||
247 | --- api_docs/urls.py 2015-02-26 15:53:30 +0000 | |||
248 | +++ api_docs/urls.py 2016-02-24 17:45:37 +0000 | |||
249 | @@ -16,6 +16,7 @@ | |||
250 | 16 | url(r'^(?P<topic_name>[\w\.-]+)/$', 'api_docs.views.topic_view', name='topic'), | 16 | url(r'^(?P<topic_name>[\w\.-]+)/$', 'api_docs.views.topic_view', name='topic'), |
251 | 17 | url(r'^(?P<topic_name>[\w\.-]+)/(?P<language_name>[\w\.-]+)/$', 'api_docs.views.language_view', name='language'), | 17 | url(r'^(?P<topic_name>[\w\.-]+)/(?P<language_name>[\w\.-]+)/$', 'api_docs.views.language_view', name='language'), |
252 | 18 | url(r'^(?P<topic_name>[\w\.-]+)/(?P<language_name>[\w\.-]+)/(?P<release_version>[\w\.-]+)/$', 'api_docs.views.version_view', name='version'), | 18 | url(r'^(?P<topic_name>[\w\.-]+)/(?P<language_name>[\w\.-]+)/(?P<release_version>[\w\.-]+)/$', 'api_docs.views.version_view', name='version'), |
253 | 19 | url(r'^(?P<topic_name>[\w\.-]+)/(?P<language_name>[\w\.-]+)/\+release/$', 'api_docs.views.release_version', name='release_version'), | ||
254 | 19 | url(r'^(?P<topic_name>[\w\.-]+)/(?P<language_name>[\w\.-]+)/(?P<release_version>[\w\.-]+)/(?P<element_fullname>[\w\.\-\:]+)/$', 'api_docs.views.element_view', name='element'), | 20 | url(r'^(?P<topic_name>[\w\.-]+)/(?P<language_name>[\w\.-]+)/(?P<release_version>[\w\.-]+)/(?P<element_fullname>[\w\.\-\:]+)/$', 'api_docs.views.element_view', name='element'), |
255 | 20 | 21 | ||
256 | 21 | ) | 22 | ) |
257 | 22 | 23 | ||
258 | === modified file 'api_docs/views.py' | |||
259 | --- api_docs/views.py 2015-03-27 21:00:43 +0000 | |||
260 | +++ api_docs/views.py 2016-02-24 17:45:37 +0000 | |||
261 | @@ -52,6 +52,38 @@ | |||
262 | 52 | } | 52 | } |
263 | 53 | return render_to_response('api_docs/language.html', context, RequestContext(request)) | 53 | return render_to_response('api_docs/language.html', context, RequestContext(request)) |
264 | 54 | 54 | ||
265 | 55 | from django.forms import ModelForm | ||
266 | 56 | class VersionForm(ModelForm): | ||
267 | 57 | class Meta: | ||
268 | 58 | model = Version | ||
269 | 59 | fields = ['name', 'slug'] | ||
270 | 60 | |||
271 | 61 | def release_version(request, topic_name, language_name): | ||
272 | 62 | language = get_object_or_404(Language, topic__slug=topic_name, slug=language_name) | ||
273 | 63 | |||
274 | 64 | version = Version(language=language) | ||
275 | 65 | |||
276 | 66 | if request.method == 'POST': | ||
277 | 67 | form = VersionForm(request.POST, instance=version) | ||
278 | 68 | if form.is_valid(): | ||
279 | 69 | form.save() | ||
280 | 70 | language.current_version = language.development_version | ||
281 | 71 | language.development_version = version | ||
282 | 72 | language.save() | ||
283 | 73 | version.import_from(language.current_version) | ||
284 | 74 | version.save() | ||
285 | 75 | return HttpResponseRedirect(reverse('api_docs:version', args=[topic_name, language_name, version.slug])) | ||
286 | 76 | else: | ||
287 | 77 | form = VersionForm(instance=version) | ||
288 | 78 | |||
289 | 79 | context = { | ||
290 | 80 | 'form': form, | ||
291 | 81 | 'topic': language.topic, | ||
292 | 82 | 'language': language, | ||
293 | 83 | 'version': version, | ||
294 | 84 | 'previous': language.development_version, | ||
295 | 85 | } | ||
296 | 86 | return render_to_response('api_docs/version_edit.html', context, RequestContext(request)) | ||
297 | 55 | 87 | ||
298 | 56 | def version_view(request, topic_name, language_name, release_version): | 88 | def version_view(request, topic_name, language_name, release_version): |
299 | 57 | version = _get_release_version(topic_name, language_name, release_version) | 89 | version = _get_release_version(topic_name, language_name, release_version) |
300 | 58 | 90 | ||
301 | === modified file 'update_apidocs.sh' | |||
302 | --- update_apidocs.sh 2016-01-11 15:33:54 +0000 | |||
303 | +++ update_apidocs.sh 2016-02-24 17:45:37 +0000 | |||
304 | @@ -2,113 +2,112 @@ | |||
305 | 2 | 2 | ||
306 | 3 | mkdir -p /tmp/apidoc_sources/ | 3 | mkdir -p /tmp/apidoc_sources/ |
307 | 4 | 4 | ||
308 | 5 | ##### SDK 15.04.1 | ||
309 | 6 | # Archives to download packages from | 5 | # Archives to download packages from |
310 | 7 | export SERIES="vivid" | 6 | export SERIES="vivid" |
311 | 8 | 7 | ||
312 | 9 | #### Apps/QML | 8 | #### Apps/QML |
313 | 10 | ## QtQML & QtQuick | 9 | ## QtQML & QtQuick |
314 | 11 | ./get_package.py qtdeclarative5-doc-html | 10 | ./get_package.py qtdeclarative5-doc-html |
317 | 12 | python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04.1 -s "Language Types" -N QtQml -i /tmp/apidoc_sources/usr/share/qt5/doc/qtqml/qtqml.index | 11 | python manage.py import_qdoc -p -t apps -l qml -r development -s "Language Types" -N QtQml -i /tmp/apidoc_sources/usr/share/qt5/doc/qtqml/qtqml.index |
318 | 13 | python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04.1 -s "Graphical Interface" -n QtQuick -i /tmp/apidoc_sources/usr/share/qt5/doc/qtquick/qtquick.index | 12 | python manage.py import_qdoc -p -t apps -l qml -r development -s "Graphical Interface" -n QtQuick -i /tmp/apidoc_sources/usr/share/qt5/doc/qtquick/qtquick.index |
319 | 14 | 13 | ||
320 | 15 | ## QtMultimedia & QtAudioEngine | 14 | ## QtMultimedia & QtAudioEngine |
321 | 16 | ./get_package.py qtmultimedia5-doc-html | 15 | ./get_package.py qtmultimedia5-doc-html |
323 | 17 | python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04.1 -s "Multimedia" -n QtMultimedia -i /tmp/apidoc_sources/usr/share/qt5/doc/qtmultimedia/qtmultimedia.index | 16 | python manage.py import_qdoc -p -t apps -l qml -r development -s "Multimedia" -n QtMultimedia -i /tmp/apidoc_sources/usr/share/qt5/doc/qtmultimedia/qtmultimedia.index |
324 | 18 | 17 | ||
325 | 19 | ## QtSensors | 18 | ## QtSensors |
326 | 20 | ./get_package.py qtsensors5-doc-html | 19 | ./get_package.py qtsensors5-doc-html |
328 | 21 | python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04.1 -s "Device and Sensors" -n QtSensors -i /tmp/apidoc_sources/usr/share/qt5/doc/qtsensors/qtsensors.index | 20 | python manage.py import_qdoc -p -t apps -l qml -r development -s "Device and Sensors" -n QtSensors -i /tmp/apidoc_sources/usr/share/qt5/doc/qtsensors/qtsensors.index |
329 | 22 | 21 | ||
330 | 23 | ## QtFeedback | 22 | ## QtFeedback |
331 | 24 | ./get_package.py qtfeedback5-doc-html | 23 | ./get_package.py qtfeedback5-doc-html |
333 | 25 | python manage.py import_qdoc -t apps -l qml -r sdk-15.04.1 -s "Device and Sensors" -n QtFeedback -i /tmp/apidoc_sources/usr/share/qt5/doc/qtfeedback/qtfeedback.index | 24 | python manage.py import_qdoc -t apps -l qml -r development -s "Device and Sensors" -n QtFeedback -i /tmp/apidoc_sources/usr/share/qt5/doc/qtfeedback/qtfeedback.index |
334 | 26 | 25 | ||
335 | 27 | ## QtLocation | 26 | ## QtLocation |
336 | 28 | ./get_package.py qtlocation5-doc-html | 27 | ./get_package.py qtlocation5-doc-html |
338 | 29 | python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04.1 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtlocation/qtlocation.index | 28 | python manage.py import_qdoc -p -t apps -l qml -r development.1 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtlocation/qtlocation.index |
339 | 30 | 29 | ||
340 | 31 | ## QtOrganizer | 30 | ## QtOrganizer |
341 | 32 | ./get_package.py qtpim5-doc-html | 31 | ./get_package.py qtpim5-doc-html |
344 | 33 | python manage.py import_qdoc -t apps -l qml -r sdk-15.04.1 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtorganizer/qtorganizer.index | 32 | python manage.py import_qdoc -t apps -l qml -r development -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtorganizer/qtorganizer.index |
345 | 34 | python manage.py import_qdoc -t apps -l qml -r sdk-15.04.1 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtcontacts/qtcontacts.index | 33 | python manage.py import_qdoc -t apps -l qml -r development -s "Platform Services" -i /tmp/apidoc_sources/usr/share/qt5/doc/qtcontacts/qtcontacts.index |
346 | 35 | 34 | ||
347 | 36 | ## Ubuntu.Components | 35 | ## Ubuntu.Components |
348 | 37 | ./get_package.py ubuntu-ui-toolkit-doc | 36 | ./get_package.py ubuntu-ui-toolkit-doc |
350 | 38 | python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04.1 -s "Graphical Interface" -n Ubuntu.Components -i /tmp/apidoc_sources/usr/share/ubuntu-ui-toolkit/doc/html/ubuntuuserinterfacetoolkit.index | 37 | python manage.py import_qdoc -Pp -t apps -l qml -r development -s "Graphical Interface" -n Ubuntu.Components -i /tmp/apidoc_sources/usr/share/ubuntu-ui-toolkit/doc/html/ubuntuuserinterfacetoolkit.index |
351 | 39 | 38 | ||
352 | 40 | ## Ubuntu.OnlineAccounts | 39 | ## Ubuntu.OnlineAccounts |
353 | 41 | ./get_package.py accounts-qml-module-doc | 40 | ./get_package.py accounts-qml-module-doc |
355 | 42 | python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04.1 -s "Platform Services" -N Ubuntu.OnlineAccounts -i /tmp/apidoc_sources/usr/share/accounts-qml-module/doc/html/onlineaccounts-qml-api.index | 41 | python manage.py import_qdoc -Pp -t apps -l qml -r development -s "Platform Services" -N Ubuntu.OnlineAccounts -i /tmp/apidoc_sources/usr/share/accounts-qml-module/doc/html/onlineaccounts-qml-api.index |
356 | 43 | 42 | ||
357 | 44 | ## Ubuntu.Content | 43 | ## Ubuntu.Content |
358 | 45 | ./get_package.py libcontent-hub-doc | 44 | ./get_package.py libcontent-hub-doc |
359 | 46 | gunzip -f /tmp/apidoc_sources/usr/share/doc/content-hub/qml/html/ubuntu-content-qml-api.index.gz | 45 | gunzip -f /tmp/apidoc_sources/usr/share/doc/content-hub/qml/html/ubuntu-content-qml-api.index.gz |
361 | 47 | python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04.1 -s "Platform Services" -N Ubuntu.Content -i /tmp/apidoc_sources/usr/share/doc/content-hub/qml/html/ubuntu-content-qml-api.index | 46 | python manage.py import_qdoc -Pp -t apps -l qml -r development -s "Platform Services" -N Ubuntu.Content -i /tmp/apidoc_sources/usr/share/doc/content-hub/qml/html/ubuntu-content-qml-api.index |
362 | 48 | 47 | ||
363 | 49 | # U1db | 48 | # U1db |
364 | 50 | ./get_package.py libu1db-qt5-doc | 49 | ./get_package.py libu1db-qt5-doc |
366 | 51 | python manage.py import_qdoc -p -t apps -l qml -r sdk-15.04.1 -s "Platform Services" -N U1db -i /tmp/apidoc_sources/usr/share/u1db-qt/doc/html/u1db-qt.index | 50 | python manage.py import_qdoc -p -t apps -l qml -r development -s "Platform Services" -N U1db -i /tmp/apidoc_sources/usr/share/u1db-qt/doc/html/u1db-qt.index |
367 | 52 | 51 | ||
368 | 53 | ## Ubuntu.DownloadManager | 52 | ## Ubuntu.DownloadManager |
369 | 54 | ./get_package.py libubuntu-download-manager-client-doc | 53 | ./get_package.py libubuntu-download-manager-client-doc |
370 | 55 | gunzip -f /tmp/apidoc_sources/usr/share/doc/ubuntu-download-manager/qml/html/ubuntu-download-manager-qml-api.index.gz | 54 | gunzip -f /tmp/apidoc_sources/usr/share/doc/ubuntu-download-manager/qml/html/ubuntu-download-manager-qml-api.index.gz |
372 | 56 | python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04.1 -s "Platform Services" -N Ubuntu.DownloadManager -i /tmp/apidoc_sources/usr/share/doc/ubuntu-download-manager/qml/html/ubuntu-download-manager-qml-api.index | 55 | python manage.py import_qdoc -Pp -t apps -l qml -r development -s "Platform Services" -N Ubuntu.DownloadManager -i /tmp/apidoc_sources/usr/share/doc/ubuntu-download-manager/qml/html/ubuntu-download-manager-qml-api.index |
373 | 57 | 56 | ||
374 | 58 | ## Ubuntu.Web | 57 | ## Ubuntu.Web |
375 | 59 | ./get_package.py qtdeclarative5-ubuntu-web-plugin-doc | 58 | ./get_package.py qtdeclarative5-ubuntu-web-plugin-doc |
376 | 60 | gunzip -f /tmp/apidoc_sources/usr/share/doc/ubuntu-web/html/ubuntuweb.index.gz | 59 | gunzip -f /tmp/apidoc_sources/usr/share/doc/ubuntu-web/html/ubuntuweb.index.gz |
378 | 61 | python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04.1 -s "Graphical Interface" -N Ubuntu.Web -i /tmp/apidoc_sources/usr/share/doc/ubuntu-web/html/ubuntuweb.index | 60 | python manage.py import_qdoc -Pp -t apps -l qml -r development -s "Graphical Interface" -N Ubuntu.Web -i /tmp/apidoc_sources/usr/share/doc/ubuntu-web/html/ubuntuweb.index |
379 | 62 | 61 | ||
380 | 63 | ## Ubuntu.Connectivity | 62 | ## Ubuntu.Connectivity |
381 | 64 | ./get_package.py connectivity-doc | 63 | ./get_package.py connectivity-doc |
383 | 65 | python manage.py import_qdoc -Pp -t apps -l qml -r sdk-15.04.1 -s "Platform Services" -N Ubuntu.Connectivity -i /tmp/apidoc_sources/usr/share/doc/connectivity-api/qml/html/connectivity.index | 64 | python manage.py import_qdoc -Pp -t apps -l qml -r development -s "Platform Services" -N Ubuntu.Connectivity -i /tmp/apidoc_sources/usr/share/doc/connectivity-api/qml/html/connectivity.index |
384 | 66 | 65 | ||
385 | 67 | #### Aps/HTML5 | 66 | #### Aps/HTML5 |
386 | 68 | ## UbuntuUI | 67 | ## UbuntuUI |
387 | 69 | ./get_package.py ubuntu-html5-ui-toolkit-doc | 68 | ./get_package.py ubuntu-html5-ui-toolkit-doc |
389 | 70 | python manage.py import_yuidoc -i -t apps -l html5 -r sdk-15.04.1 -s "Graphical Interface" -d /tmp/apidoc_sources/usr/share/doc/ubuntu-html5-ui-toolkit-doc/data.json | 69 | python manage.py import_yuidoc -i -t apps -l html5 -r development -s "Graphical Interface" -d /tmp/apidoc_sources/usr/share/doc/ubuntu-html5-ui-toolkit-doc/data.json |
390 | 71 | 70 | ||
391 | 72 | ## Platform Bindings | 71 | ## Platform Bindings |
392 | 73 | ./get_package.py unity-webapps-qml-doc | 72 | ./get_package.py unity-webapps-qml-doc |
393 | 74 | ## OnlineAccounts3 | 73 | ## OnlineAccounts3 |
395 | 75 | python manage.py import_yuidoc -t apps -l html5 -r sdk-15.04.1 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/online-accounts/data.json | 74 | python manage.py import_yuidoc -t apps -l html5 -r development -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/online-accounts/data.json |
396 | 76 | ## AlarmAPI | 75 | ## AlarmAPI |
398 | 77 | python manage.py import_yuidoc -t apps -l html5 -r sdk-15.04.1 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/alarm-api/data.json | 76 | python manage.py import_yuidoc -t apps -l html5 -r development -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/alarm-api/data.json |
399 | 78 | ## ContentHub | 77 | ## ContentHub |
401 | 79 | python manage.py import_yuidoc -t apps -l html5 -r sdk-15.04.1 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/content-hub/data.json | 78 | python manage.py import_yuidoc -t apps -l html5 -r development -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/content-hub/data.json |
402 | 80 | ## RuntimeAPI | 79 | ## RuntimeAPI |
404 | 81 | python manage.py import_yuidoc -t apps -l html5 -r sdk-15.04.1 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/runtime-api/data.json | 80 | python manage.py import_yuidoc -t apps -l html5 -r development -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-webapps-qml/doc/api/runtime-api/data.json |
405 | 82 | 81 | ||
406 | 83 | #### Autopilot/Python | 82 | #### Autopilot/Python |
407 | 84 | ## Autopilot | 83 | ## Autopilot |
408 | 85 | ./get_package.py python3-autopilot | 84 | ./get_package.py python3-autopilot |
409 | 86 | find /tmp/apidoc_sources/usr/share/doc/python3-autopilot/json/ -name "*.gz" -print0 |xargs -0 gunzip | 85 | find /tmp/apidoc_sources/usr/share/doc/python3-autopilot/json/ -name "*.gz" -print0 |xargs -0 gunzip |
411 | 87 | 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 | 86 | python manage.py import_sphinx -t autopilot -l python -r development -s ./api_docs/importers/autopilot_sections.py -i /tmp/apidoc_sources/usr/share/doc/python3-autopilot/json/objects.inv |
412 | 88 | 87 | ||
413 | 89 | ./get_package.py ubuntu-ui-toolkit-autopilot | 88 | ./get_package.py ubuntu-ui-toolkit-autopilot |
414 | 90 | find /tmp/apidoc_sources/usr/share/doc/ubuntu-ui-toolkit-autopilot/json/ -name "*.gz" -print0 |xargs -0 gunzip | 89 | find /tmp/apidoc_sources/usr/share/doc/ubuntu-ui-toolkit-autopilot/json/ -name "*.gz" -print0 |xargs -0 gunzip |
416 | 91 | 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 | 90 | python manage.py import_sphinx -t autopilot -l python -r development -s ./api_docs/importers/autopilot_sections.py -i /tmp/apidoc_sources/usr/share/doc/ubuntu-ui-toolkit-autopilot/json/objects.inv |
417 | 92 | 91 | ||
418 | 93 | ./get_package.py python3-scope-harness | 92 | ./get_package.py python3-scope-harness |
419 | 94 | find /tmp/apidoc_sources/usr/share/doc/python3-scope-harness/json/ -name "*.gz" -print0 |xargs -0 gunzip | 93 | find /tmp/apidoc_sources/usr/share/doc/python3-scope-harness/json/ -name "*.gz" -print0 |xargs -0 gunzip |
421 | 95 | 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-scope-harness/json/objects.inv | 94 | python manage.py import_sphinx -t autopilot -l python -r development -s ./api_docs/importers/autopilot_sections.py -i /tmp/apidoc_sources/usr/share/doc/python3-scope-harness/json/objects.inv |
422 | 96 | 95 | ||
423 | 97 | #### Scopes/C++ | 96 | #### Scopes/C++ |
424 | 98 | ## unity.scopes | 97 | ## unity.scopes |
425 | 99 | ./get_package.py libunity-scopes-doc | 98 | ./get_package.py libunity-scopes-doc |
427 | 100 | python manage.py import_doxygen -t scopes -l cpp -r sdk-15.04.1 -s ./api_docs/importers/scope_sections.py -N unity.scopes -d /tmp/apidoc_sources/usr/share/doc/unity-scopes/ | 99 | python manage.py import_doxygen -t scopes -l cpp -r development -s ./api_docs/importers/scope_sections.py -N unity.scopes -d /tmp/apidoc_sources/usr/share/doc/unity-scopes/ |
428 | 101 | 100 | ||
429 | 102 | ## Accounts | 101 | ## Accounts |
430 | 103 | ./get_package.py libaccounts-qt-doc | 102 | ./get_package.py libaccounts-qt-doc |
432 | 104 | python manage.py import_doxygen -t scopes -l cpp -r sdk-15.04.1 -s ./api_docs/importers/accounts_sections.py -n Accounts -d /tmp/apidoc_sources/usr/share/doc/libaccounts-qt/html/ | 103 | python manage.py import_doxygen -t scopes -l cpp -r development -s ./api_docs/importers/accounts_sections.py -n Accounts -d /tmp/apidoc_sources/usr/share/doc/libaccounts-qt/html/ |
433 | 105 | 104 | ||
434 | 106 | ## U1db | 105 | ## U1db |
435 | 107 | ./get_package.py libu1db-qt5-doc | 106 | ./get_package.py libu1db-qt5-doc |
437 | 108 | python manage.py import_qdoc -Pp -N U1db -t scopes -l cpp -r sdk-15.04.1 -s "Platform Services" -i /tmp/apidoc_sources/usr/share/u1db-qt/doc/html/u1db-qt.index | 107 | python manage.py import_qdoc -Pp -N U1db -t scopes -l cpp -r development -s "Platform Services" -i /tmp/apidoc_sources/usr/share/u1db-qt/doc/html/u1db-qt.index |
438 | 109 | 108 | ||
439 | 110 | #### Scopes/Javascript | 109 | #### Scopes/Javascript |
440 | 111 | SOURCE=http://ppa.launchpad.net/ubuntu-sdk-team/ppa/ubuntu ./get_package.py unity-js-scopes-doc | 110 | SOURCE=http://ppa.launchpad.net/ubuntu-sdk-team/ppa/ubuntu ./get_package.py unity-js-scopes-doc |
442 | 112 | python manage.py import_yuidoc -t scopes -l js -r sdk-15.04.1 -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-js-scopes/doc/docbuild/data.json | 111 | python manage.py import_yuidoc -t scopes -l js -r development -s "Platform Services" -d /tmp/apidoc_sources/usr/share/unity-js-scopes/doc/docbuild/data.json |
443 | 113 | 112 | ||
444 | 114 | rm -r /tmp/apidoc_sources/ | 113 | rm -r /tmp/apidoc_sources/ |
To test, you will need existing API docs with a version marked as the "development" version for a language. Then log in using an account with admin access and navigate to that version's page, you should see a link in the upper-right marked "New Release". Clicking that will take you to a page where you can define the name of the new version, and submitting that will copy the contents from the previous "development" version into the new one, mark the old one as "current" and the new one as "development"