Merge lp:~dholbach/help-app/pelican into lp:~ubuntu-touch-coreapps-drivers/help-app/trunk
- pelican
- Merge into trunk
Proposed by
Daniel Holbach
Status: | Merged |
---|---|
Merged at revision: | 37 |
Proposed branch: | lp:~dholbach/help-app/pelican |
Merge into: | lp:~ubuntu-touch-coreapps-drivers/help-app/trunk |
Diff against target: |
1394 lines (+969/-246) 29 files modified
.bzrignore (+3/-1) HACKING (+6/-6) Makefile (+11/-2) edit-here/.hyde_deps (+0/-18) edit-here/Makefile (+129/-0) edit-here/content/.hyde_deps (+0/-1) edit-here/content/apps.html (+0/-19) edit-here/content/faq.html (+0/-14) edit-here/content/get-in-touch.html (+0/-16) edit-here/content/index.html (+0/-22) edit-here/content/media/js/app.js (+0/-6) edit-here/content/meta.yaml (+0/-2) edit-here/content/pages/apps.md (+14/-0) edit-here/content/pages/faq.md (+8/-0) edit-here/content/pages/get-in-touch.md (+13/-0) edit-here/content/pages/index.md (+16/-0) edit-here/develop_server.sh (+103/-0) edit-here/fabfile.py (+73/-0) edit-here/generate-pot (+94/-0) edit-here/layout/base.j2 (+0/-52) edit-here/pelicanconf.py (+35/-0) edit-here/po/de.po (+192/-0) edit-here/po/help.pot (+178/-0) edit-here/publishconf.py (+24/-0) edit-here/site.yaml (+0/-87) edit-here/theme/static/js/app.js (+6/-0) edit-here/theme/templates/base.html (+50/-0) edit-here/theme/templates/index.html (+5/-0) edit-here/theme/templates/page.html (+9/-0) |
To merge this branch: | bzr merge lp:~dholbach/help-app/pelican |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Holbach (community) | Approve | ||
Nicholas Skaggs (community) | Needs Fixing | ||
David Planella | Pending | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message

Daniel Holbach (dholbach) wrote : | # |
Right, this doesn't work 100% yet. I'm not quite sure why. Help to debug this would be appreciated.
Revision history for this message

Nicholas Skaggs (nskaggs) wrote : | # |
See my proposed branch for some build tweaks.
https:/
Revision history for this message

Daniel Holbach (dholbach) wrote : | # |
<dholbach> I would suggest we land the pelican branch soon - it is as broken/working as the old app :)
and file bugs on all the stuff we need to do
<balloons> I agree, let's get it landed and move forward
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' |
2 | --- .bzrignore 2015-01-30 11:17:04 +0000 |
3 | +++ .bzrignore 2015-02-10 17:14:30 +0000 |
4 | @@ -1,3 +1,5 @@ |
5 | app/www |
6 | -edit-here/deploy |
7 | *.click |
8 | +edit-here/cache |
9 | +edit-here/content/pages/?? |
10 | +edit-here/backup |
11 | |
12 | === modified file 'HACKING' |
13 | --- HACKING 2015-02-02 13:34:02 +0000 |
14 | +++ HACKING 2015-02-10 17:14:30 +0000 |
15 | @@ -7,7 +7,7 @@ |
16 | |
17 | Before you get started, run: |
18 | |
19 | - sudo apt install hyde make bzr |
20 | + sudo apt install python-pelican po4a make bzr |
21 | |
22 | |
23 | Editing |
24 | @@ -22,14 +22,14 @@ |
25 | a look at http://daringfireball.net/projects/markdown/ and some of the |
26 | existing files to get started. |
27 | |
28 | -The files, although they contain Markdown, have the suffix .html which might |
29 | -be a bit confusing, but this is probably a design decision by hyde. Once |
30 | -you're happy with your edits, run |
31 | +Once you're happy with your edits, change to the top-level directory and run |
32 | |
33 | make html |
34 | |
35 | -in the top-level directory and you can find the updated HTML in |
36 | -./app/www/. |
37 | +You can find the updated HTML in ./app/www/. For instance, you can browse |
38 | +the site in firefox with |
39 | + |
40 | +firefox app/www/index.html |
41 | |
42 | |
43 | Creating a click |
44 | |
45 | === modified file 'Makefile' |
46 | --- Makefile 2015-02-02 08:29:46 +0000 |
47 | +++ Makefile 2015-02-10 17:14:30 +0000 |
48 | @@ -6,5 +6,14 @@ |
49 | click: html |
50 | cd app && click build . && mv *.click .. |
51 | |
52 | -html: |
53 | - cd edit-here/ && hyde gen |
54 | +html: translate |
55 | + make -C edit-here html |
56 | + |
57 | +serve: |
58 | + make -C edit-here serve |
59 | + |
60 | +update-pot: |
61 | + make -C edit-here update-pot |
62 | + |
63 | +translate: |
64 | + make -C edit-here translate |
65 | |
66 | === removed file 'edit-here/.hyde_deps' |
67 | --- edit-here/.hyde_deps 2015-02-02 15:33:54 +0000 |
68 | +++ edit-here/.hyde_deps 1970-01-01 00:00:00 +0000 |
69 | @@ -1,18 +0,0 @@ |
70 | -!!python/unicode '.hyde_deps': [] |
71 | -!!python/unicode 'about.html': [base.j2] |
72 | -!!python/unicode 'advanced/grouper.html': [base.j2] |
73 | -!!python/unicode 'advanced/overview.html': [base.j2] |
74 | -!!python/unicode 'advanced/sorter.html': [base.j2] |
75 | -!!python/unicode 'advanced/tagger.html': [base.j2] |
76 | -!!python/unicode 'apps.html': [base.j2] |
77 | -!!python/unicode 'en/apps.html': [base.j2] |
78 | -!!python/unicode 'en/faq.html': [base.j2] |
79 | -!!python/unicode 'faq.html': [base.j2] |
80 | -!!python/unicode 'faq/apps.html': [base.j2] |
81 | -!!python/unicode 'faq/index.html': [base.j2] |
82 | -!!python/unicode 'get-in-touch.html': [base.j2] |
83 | -!!python/unicode 'index.html': [base.j2] |
84 | -!!python/unicode 'media/app.css': [] |
85 | -!!python/unicode 'media/css/app.css': [] |
86 | -!!python/unicode 'media/css/style.css': [] |
87 | -!!python/unicode 'media/js/app.js': [] |
88 | |
89 | === added file 'edit-here/Makefile' |
90 | --- edit-here/Makefile 1970-01-01 00:00:00 +0000 |
91 | +++ edit-here/Makefile 2015-02-10 17:14:30 +0000 |
92 | @@ -0,0 +1,129 @@ |
93 | +PY?=python |
94 | +PELICAN?=pelican |
95 | +PELICANOPTS= |
96 | + |
97 | +BASEDIR=$(CURDIR) |
98 | +INPUTDIR=$(BASEDIR)/content |
99 | +OUTPUTDIR=$(BASEDIR)/../app/www |
100 | +CONFFILE=$(BASEDIR)/pelicanconf.py |
101 | +PUBLISHCONF=$(BASEDIR)/publishconf.py |
102 | + |
103 | +FTP_HOST=localhost |
104 | +FTP_USER=anonymous |
105 | +FTP_TARGET_DIR=/ |
106 | + |
107 | +SSH_HOST=localhost |
108 | +SSH_PORT=22 |
109 | +SSH_USER=root |
110 | +SSH_TARGET_DIR=/var/www |
111 | + |
112 | +S3_BUCKET=my_s3_bucket |
113 | + |
114 | +CLOUDFILES_USERNAME=my_rackspace_username |
115 | +CLOUDFILES_API_KEY=my_rackspace_api_key |
116 | +CLOUDFILES_CONTAINER=my_cloudfiles_container |
117 | + |
118 | +DROPBOX_DIR=~/Dropbox/Public/ |
119 | + |
120 | +GITHUB_PAGES_BRANCH=gh-pages |
121 | + |
122 | +DEBUG ?= 0 |
123 | +ifeq ($(DEBUG), 1) |
124 | + PELICANOPTS += -D |
125 | +endif |
126 | + |
127 | +MD_FILES=$(wildcard content/pages/*.md) |
128 | +PO_FILES=$(wildcard po/*.po) |
129 | + |
130 | +help: |
131 | + @echo 'Makefile for a pelican Web site ' |
132 | + @echo ' ' |
133 | + @echo 'Usage: ' |
134 | + @echo ' make html (re)generate the web site ' |
135 | + @echo ' make clean remove the generated files ' |
136 | + @echo ' make regenerate regenerate files upon modification ' |
137 | + @echo ' make publish generate using production settings ' |
138 | + @echo ' make serve [PORT=8000] serve site at http://localhost:8000' |
139 | + @echo ' make devserver [PORT=8000] start/restart develop_server.sh ' |
140 | + @echo ' make stopserver stop local server ' |
141 | + @echo ' make ssh_upload upload the web site via SSH ' |
142 | + @echo ' make rsync_upload upload the web site via rsync+ssh ' |
143 | + @echo ' make dropbox_upload upload the web site via Dropbox ' |
144 | + @echo ' make ftp_upload upload the web site via FTP ' |
145 | + @echo ' make s3_upload upload the web site via S3 ' |
146 | + @echo ' make cf_upload upload the web site via Cloud Files' |
147 | + @echo ' make github upload the web site via gh-pages ' |
148 | + @echo ' ' |
149 | + @echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html' |
150 | + @echo ' ' |
151 | + |
152 | +html: |
153 | + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) |
154 | + |
155 | +clean: |
156 | + [ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR) |
157 | + |
158 | +regenerate: |
159 | + $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS) |
160 | + |
161 | +serve: |
162 | +ifdef PORT |
163 | + cd $(OUTPUTDIR) && $(PY) -m pelican.server $(PORT) |
164 | +else |
165 | + cd $(OUTPUTDIR) && $(PY) -m pelican.server |
166 | +endif |
167 | + |
168 | +devserver: |
169 | +ifdef PORT |
170 | + $(BASEDIR)/develop_server.sh restart $(PORT) |
171 | +else |
172 | + $(BASEDIR)/develop_server.sh restart |
173 | +endif |
174 | + |
175 | +stopserver: |
176 | + kill -9 `cat pelican.pid` |
177 | + kill -9 `cat srv.pid` |
178 | + @echo 'Stopped Pelican and SimpleHTTPServer processes running in background.' |
179 | + |
180 | +publish: |
181 | + $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS) |
182 | + |
183 | +ssh_upload: publish |
184 | + scp -P $(SSH_PORT) -r $(OUTPUTDIR)/* $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) |
185 | + |
186 | +rsync_upload: publish |
187 | + rsync -e "ssh -p $(SSH_PORT)" -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude |
188 | + |
189 | +dropbox_upload: publish |
190 | + cp -r $(OUTPUTDIR)/* $(DROPBOX_DIR) |
191 | + |
192 | +ftp_upload: publish |
193 | + lftp ftp://$(FTP_USER)@$(FTP_HOST) -e "mirror -R $(OUTPUTDIR) $(FTP_TARGET_DIR) ; quit" |
194 | + |
195 | +s3_upload: publish |
196 | + s3cmd sync $(OUTPUTDIR)/ s3://$(S3_BUCKET) --acl-public --delete-removed --guess-mime-type |
197 | + |
198 | +cf_upload: publish |
199 | + cd $(OUTPUTDIR) && swift -v -A https://auth.api.rackspacecloud.com/v1.0 -U $(CLOUDFILES_USERNAME) -K $(CLOUDFILES_API_KEY) upload -c $(CLOUDFILES_CONTAINER) . |
200 | + |
201 | +github: publish |
202 | + ghp-import -m "Generate Pelican site" -b $(GITHUB_PAGES_BRANCH) $(OUTPUTDIR) |
203 | + git push origin $(GITHUB_PAGES_BRANCH) |
204 | + |
205 | +update-pot: |
206 | + po4a-gettextize -f text -o markdown -M utf-8 -L utf-8 \ |
207 | + $(foreach md_file,$(MD_FILES),-m $(md_file))\ |
208 | + -p po/help.pot |
209 | + |
210 | + |
211 | +translate: |
212 | + $(foreach po_file,$(PO_FILES),$(shell mkdir $(INPUTDIR)/pages/$(shell basename $(po_file) .po))) |
213 | + $(foreach md_file,\ |
214 | + $(MD_FILES),\ |
215 | + $(foreach po_file,\ |
216 | + $(PO_FILES),\ |
217 | + $(shell po4a-translate -k 0 -f text -o markdown -M utf-8 -L utf-8 \ |
218 | + -m $(md_file) -p $(po_file) \ |
219 | + > $(INPUTDIR)/pages/$(shell basename $(po_file) .po)/$(shell basename $(md_file))))) |
220 | + |
221 | +.PHONY: html help clean regenerate serve devserver publish ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github |
222 | |
223 | === added file 'edit-here/__init__.py' |
224 | === removed file 'edit-here/content/.hyde_deps' |
225 | --- edit-here/content/.hyde_deps 2015-01-30 10:45:07 +0000 |
226 | +++ edit-here/content/.hyde_deps 1970-01-01 00:00:00 +0000 |
227 | @@ -1,1 +0,0 @@ |
228 | -{} |
229 | |
230 | === removed file 'edit-here/content/apps.html' |
231 | --- edit-here/content/apps.html 2015-02-02 15:33:54 +0000 |
232 | +++ edit-here/content/apps.html 1970-01-01 00:00:00 +0000 |
233 | @@ -1,19 +0,0 @@ |
234 | ---- |
235 | -extends: base.j2 |
236 | ---- |
237 | - |
238 | -{% block content %} |
239 | -# FAQ - Apps |
240 | - |
241 | -Are you looking for a good way to do X and can't find it in the app |
242 | -store? Want some suggestions to solve a particular problem? |
243 | - |
244 | ---- |
245 | -**Q:** Do you have Spotify? |
246 | -**A:** If you have a Spotify premium account, just install 'CuteSpotify' |
247 | - ([video](https://www.youtube.com/watch?v=ea90rwK_VuI)). |
248 | ---- |
249 | -**Q:** Do you have Google Authenticator? |
250 | -**A:** Sure, install the 'Authenticator' app from the software store. |
251 | ---- |
252 | -{% endblock %} |
253 | |
254 | === removed file 'edit-here/content/faq.html' |
255 | --- edit-here/content/faq.html 2015-02-02 15:33:54 +0000 |
256 | +++ edit-here/content/faq.html 1970-01-01 00:00:00 +0000 |
257 | @@ -1,14 +0,0 @@ |
258 | ---- |
259 | -extends: base.j2 |
260 | ---- |
261 | - |
262 | -{% block content %} |
263 | -# Get your questions answered. |
264 | - |
265 | -We divided the questions up into categories, so you can spot yours more |
266 | -easily. Here we go: |
267 | - |
268 | - * [Apps](apps.html) |
269 | - * ... |
270 | - |
271 | -{% endblock %} |
272 | |
273 | === removed file 'edit-here/content/get-in-touch.html' |
274 | --- edit-here/content/get-in-touch.html 2015-02-01 23:05:46 +0000 |
275 | +++ edit-here/content/get-in-touch.html 1970-01-01 00:00:00 +0000 |
276 | @@ -1,16 +0,0 @@ |
277 | ---- |
278 | -extends: base.j2 |
279 | ---- |
280 | - |
281 | -{% block content %} |
282 | -Ubuntu has a huge community. You can easily get in touch with experts and |
283 | -other enthusiasts. One good way to do so, particularly if you **have |
284 | -questions**, is [AskUbuntu](http://www.askubuntu.com). It's a |
285 | -collaboratively-edited question and answer site for Ubuntu users and |
286 | -developers. 100% free, no registration required. |
287 | - |
288 | -Another great place to **get involved** with Ubuntu is our very own |
289 | -[Ubuntu Community Website](http://community.ubuntu.com/). You can very |
290 | -easily find out about all the indiviual teams in Ubuntu, what they do, |
291 | -where they hang out and how to get involved. |
292 | -{% endblock %} |
293 | |
294 | === removed file 'edit-here/content/index.html' |
295 | --- edit-here/content/index.html 2015-02-02 15:33:54 +0000 |
296 | +++ edit-here/content/index.html 1970-01-01 00:00:00 +0000 |
297 | @@ -1,22 +0,0 @@ |
298 | ---- |
299 | -extends: base.j2 |
300 | ---- |
301 | - |
302 | -{% block content %} |
303 | -# Welcome to Help for Ubuntu for devices! |
304 | - |
305 | -The world-wide Ubuntu community wants to give you the best possible |
306 | -experience on your Ubuntu device. This is why we collected: |
307 | - |
308 | - * answers to frequently asked questions |
309 | - * tips and tricks to make you more productive |
310 | - * links to get in touch with experts and other community members |
311 | - |
312 | -in this app for you. |
313 | - |
314 | -[Take me to the FAQ!](faq.html) |
315 | -[Get in touch](get-in-touch.html) |
316 | - |
317 | ---- |
318 | - |
319 | -{% endblock %} |
320 | |
321 | === removed directory 'edit-here/content/media' |
322 | === removed directory 'edit-here/content/media/css' |
323 | === removed file 'edit-here/content/media/css/app.css' |
324 | === removed directory 'edit-here/content/media/js' |
325 | === removed file 'edit-here/content/media/js/app.js' |
326 | --- edit-here/content/media/js/app.js 2015-01-30 10:45:07 +0000 |
327 | +++ edit-here/content/media/js/app.js 1970-01-01 00:00:00 +0000 |
328 | @@ -1,6 +0,0 @@ |
329 | -window.onload = function () { |
330 | - var UI = new UbuntuUI(); |
331 | - UI.init(); |
332 | -}; |
333 | - |
334 | - |
335 | |
336 | === removed file 'edit-here/content/meta.yaml' |
337 | --- edit-here/content/meta.yaml 2015-01-30 10:45:07 +0000 |
338 | +++ edit-here/content/meta.yaml 1970-01-01 00:00:00 +0000 |
339 | @@ -1,2 +0,0 @@ |
340 | -level: basic |
341 | - |
342 | |
343 | === added directory 'edit-here/content/pages' |
344 | === added file 'edit-here/content/pages/apps.md' |
345 | --- edit-here/content/pages/apps.md 1970-01-01 00:00:00 +0000 |
346 | +++ edit-here/content/pages/apps.md 2015-02-10 17:14:30 +0000 |
347 | @@ -0,0 +1,14 @@ |
348 | +Title: FAQ - Apps |
349 | +Lang: en |
350 | + |
351 | +Are you looking for a good way to do X and can't find it in the app |
352 | +store? Want some suggestions to solve a particular problem? |
353 | + |
354 | +--- |
355 | +**Q:** Do you have Spotify? |
356 | +**A:** If you have a Spotify premium account, just install 'CuteSpotify' |
357 | + ([video](https://www.youtube.com/watch?v=ea90rwK_VuI)). |
358 | +--- |
359 | +**Q:** Do you have Google Authenticator? |
360 | +**A:** Sure, install the 'Authenticator' app from the software store. |
361 | +--- |
362 | |
363 | === added file 'edit-here/content/pages/faq.md' |
364 | --- edit-here/content/pages/faq.md 1970-01-01 00:00:00 +0000 |
365 | +++ edit-here/content/pages/faq.md 2015-02-10 17:14:30 +0000 |
366 | @@ -0,0 +1,8 @@ |
367 | +Title: Get your questions answered. |
368 | +Lang: en |
369 | + |
370 | +We divided the questions up into categories, so you can spot yours more |
371 | +easily. Here we go: |
372 | + |
373 | + * [Apps](apps.html) |
374 | + * ... |
375 | |
376 | === added file 'edit-here/content/pages/get-in-touch.md' |
377 | --- edit-here/content/pages/get-in-touch.md 1970-01-01 00:00:00 +0000 |
378 | +++ edit-here/content/pages/get-in-touch.md 2015-02-10 17:14:30 +0000 |
379 | @@ -0,0 +1,13 @@ |
380 | +Title: Get in touch |
381 | +Lang: en |
382 | + |
383 | +Ubuntu has a huge community. You can easily get in touch with experts and |
384 | +other enthusiasts. One good way to do so, particularly if you **have |
385 | +questions**, is [AskUbuntu](http://www.askubuntu.com). It's a |
386 | +collaboratively-edited question and answer site for Ubuntu users and |
387 | +developers. 100% free, no registration required. |
388 | + |
389 | +Another great place to **get involved** with Ubuntu is our very own |
390 | +[Ubuntu Community Website](http://community.ubuntu.com/). You can very |
391 | +easily find out about all the indiviual teams in Ubuntu, what they do, |
392 | +where they hang out and how to get involved. |
393 | |
394 | === added file 'edit-here/content/pages/index.md' |
395 | --- edit-here/content/pages/index.md 1970-01-01 00:00:00 +0000 |
396 | +++ edit-here/content/pages/index.md 2015-02-10 17:14:30 +0000 |
397 | @@ -0,0 +1,16 @@ |
398 | +Title: Welcome to Help for Ubuntu for devices! |
399 | +Lang: en |
400 | + |
401 | +The world-wide Ubuntu community wants to give you the best possible |
402 | +experience on your Ubuntu device. This is why we collected: |
403 | + |
404 | + * answers to frequently asked questions |
405 | + * tips and tricks to make you more productive |
406 | + * links to get in touch with experts and other community members |
407 | + |
408 | +in this app for you. |
409 | + |
410 | +[Take me to the FAQ!](faq.html) |
411 | +[Get in touch](get-in-touch.html) |
412 | + |
413 | +--- |
414 | |
415 | === added file 'edit-here/develop_server.sh' |
416 | --- edit-here/develop_server.sh 1970-01-01 00:00:00 +0000 |
417 | +++ edit-here/develop_server.sh 2015-02-10 17:14:30 +0000 |
418 | @@ -0,0 +1,103 @@ |
419 | +#!/usr/bin/env bash |
420 | +## |
421 | +# This section should match your Makefile |
422 | +## |
423 | +PY=${PY:-python} |
424 | +PELICAN=${PELICAN:-pelican} |
425 | +PELICANOPTS= |
426 | + |
427 | +BASEDIR=$(pwd) |
428 | +INPUTDIR=$BASEDIR/content |
429 | +OUTPUTDIR=$(BASEDIR)/../app/www |
430 | +CONFFILE=$BASEDIR/pelicanconf.py |
431 | + |
432 | +### |
433 | +# Don't change stuff below here unless you are sure |
434 | +### |
435 | + |
436 | +SRV_PID=$BASEDIR/srv.pid |
437 | +PELICAN_PID=$BASEDIR/pelican.pid |
438 | + |
439 | +function usage(){ |
440 | + echo "usage: $0 (stop) (start) (restart) [port]" |
441 | + echo "This starts Pelican in debug and reload mode and then launches" |
442 | + echo "an HTTP server to help site development. It doesn't read" |
443 | + echo "your Pelican settings, so if you edit any paths in your Makefile" |
444 | + echo "you will need to edit your settings as well." |
445 | + exit 3 |
446 | +} |
447 | + |
448 | +function alive() { |
449 | + kill -0 $1 >/dev/null 2>&1 |
450 | +} |
451 | + |
452 | +function shut_down(){ |
453 | + PID=$(cat $SRV_PID) |
454 | + if [[ $? -eq 0 ]]; then |
455 | + if alive $PID; then |
456 | + echo "Stopping HTTP server" |
457 | + kill $PID |
458 | + else |
459 | + echo "Stale PID, deleting" |
460 | + fi |
461 | + rm $SRV_PID |
462 | + else |
463 | + echo "HTTP server PIDFile not found" |
464 | + fi |
465 | + |
466 | + PID=$(cat $PELICAN_PID) |
467 | + if [[ $? -eq 0 ]]; then |
468 | + if alive $PID; then |
469 | + echo "Killing Pelican" |
470 | + kill $PID |
471 | + else |
472 | + echo "Stale PID, deleting" |
473 | + fi |
474 | + rm $PELICAN_PID |
475 | + else |
476 | + echo "Pelican PIDFile not found" |
477 | + fi |
478 | +} |
479 | + |
480 | +function start_up(){ |
481 | + local port=$1 |
482 | + echo "Starting up Pelican and HTTP server" |
483 | + shift |
484 | + $PELICAN --debug --autoreload -r $INPUTDIR -o $OUTPUTDIR -s $CONFFILE $PELICANOPTS & |
485 | + pelican_pid=$! |
486 | + echo $pelican_pid > $PELICAN_PID |
487 | + cd $OUTPUTDIR |
488 | + $PY -m pelican.server $port & |
489 | + srv_pid=$! |
490 | + echo $srv_pid > $SRV_PID |
491 | + cd $BASEDIR |
492 | + sleep 1 |
493 | + if ! alive $pelican_pid ; then |
494 | + echo "Pelican didn't start. Is the Pelican package installed?" |
495 | + return 1 |
496 | + elif ! alive $srv_pid ; then |
497 | + echo "The HTTP server didn't start. Is there another service using port" $port "?" |
498 | + return 1 |
499 | + fi |
500 | + echo 'Pelican and HTTP server processes now running in background.' |
501 | +} |
502 | + |
503 | +### |
504 | +# MAIN |
505 | +### |
506 | +[[ ($# -eq 0) || ($# -gt 2) ]] && usage |
507 | +port='' |
508 | +[[ $# -eq 2 ]] && port=$2 |
509 | + |
510 | +if [[ $1 == "stop" ]]; then |
511 | + shut_down |
512 | +elif [[ $1 == "restart" ]]; then |
513 | + shut_down |
514 | + start_up $port |
515 | +elif [[ $1 == "start" ]]; then |
516 | + if ! start_up $port; then |
517 | + shut_down |
518 | + fi |
519 | +else |
520 | + usage |
521 | +fi |
522 | |
523 | === added file 'edit-here/fabfile.py' |
524 | --- edit-here/fabfile.py 1970-01-01 00:00:00 +0000 |
525 | +++ edit-here/fabfile.py 2015-02-10 17:14:30 +0000 |
526 | @@ -0,0 +1,73 @@ |
527 | +from fabric.api import * |
528 | +import fabric.contrib.project as project |
529 | +import os |
530 | +import sys |
531 | +import SimpleHTTPServer |
532 | +import SocketServer |
533 | + |
534 | +# Local path configuration (can be absolute or relative to fabfile) |
535 | +env.deploy_path = '../app/www' |
536 | +DEPLOY_PATH = env.deploy_path |
537 | + |
538 | +# Remote server configuration |
539 | +production = 'root@localhost:22' |
540 | +dest_path = '/var/www' |
541 | + |
542 | +# Rackspace Cloud Files configuration settings |
543 | +env.cloudfiles_username = 'my_rackspace_username' |
544 | +env.cloudfiles_api_key = 'my_rackspace_api_key' |
545 | +env.cloudfiles_container = 'my_cloudfiles_container' |
546 | + |
547 | + |
548 | +def clean(): |
549 | + if os.path.isdir(DEPLOY_PATH): |
550 | + local('rm -rf {deploy_path}'.format(**env)) |
551 | + local('mkdir {deploy_path}'.format(**env)) |
552 | + |
553 | +def build(): |
554 | + local('pelican -s pelicanconf.py') |
555 | + |
556 | +def rebuild(): |
557 | + clean() |
558 | + build() |
559 | + |
560 | +def regenerate(): |
561 | + local('pelican -r -s pelicanconf.py') |
562 | + |
563 | +def serve(): |
564 | + os.chdir(env.deploy_path) |
565 | + |
566 | + PORT = 8000 |
567 | + class AddressReuseTCPServer(SocketServer.TCPServer): |
568 | + allow_reuse_address = True |
569 | + |
570 | + server = AddressReuseTCPServer(('', PORT), SimpleHTTPServer.SimpleHTTPRequestHandler) |
571 | + |
572 | + sys.stderr.write('Serving on port {0} ...\n'.format(PORT)) |
573 | + server.serve_forever() |
574 | + |
575 | +def reserve(): |
576 | + build() |
577 | + serve() |
578 | + |
579 | +def preview(): |
580 | + local('pelican -s publishconf.py') |
581 | + |
582 | +def cf_upload(): |
583 | + rebuild() |
584 | + local('cd {deploy_path} && ' |
585 | + 'swift -v -A https://auth.api.rackspacecloud.com/v1.0 ' |
586 | + '-U {cloudfiles_username} ' |
587 | + '-K {cloudfiles_api_key} ' |
588 | + 'upload -c {cloudfiles_container} .'.format(**env)) |
589 | + |
590 | +@hosts(production) |
591 | +def publish(): |
592 | + local('pelican -s publishconf.py') |
593 | + project.rsync_project( |
594 | + remote_dir=dest_path, |
595 | + exclude=".DS_Store", |
596 | + local_dir=DEPLOY_PATH.rstrip('/') + '/', |
597 | + delete=True, |
598 | + extra_opts='-c', |
599 | + ) |
600 | |
601 | === added file 'edit-here/generate-pot' |
602 | --- edit-here/generate-pot 1970-01-01 00:00:00 +0000 |
603 | +++ edit-here/generate-pot 2015-02-10 17:14:30 +0000 |
604 | @@ -0,0 +1,94 @@ |
605 | +#!/usr/bin/python3 |
606 | + |
607 | +# We need this script to help us generate a .pot file, which does not |
608 | +# contain the meta-data strings at the top of the markdown files. |
609 | + |
610 | +import glob |
611 | +import os |
612 | +import shutil |
613 | +import subprocess |
614 | +import sys |
615 | + |
616 | +from pelicanconf import PATH |
617 | + |
618 | +METADATA_TAGS = [ |
619 | + 'title', |
620 | + 'lang', |
621 | + 'date', |
622 | + 'save_as', |
623 | + ] |
624 | + |
625 | + |
626 | +class Translations(object): |
627 | + def __init__(self): |
628 | + self._cleanup() |
629 | + self.translations_dir = os.path.abspath(os.path.join(PATH, '../po')) |
630 | + self.available_languages = list( |
631 | + map(lambda a: os.path.basename(a).split('.po')[0], |
632 | + glob.glob(self.translations_dir+'/*.po'))) |
633 | + self.documents = self._find_documents() |
634 | + |
635 | + def _find_documents(self): |
636 | + documents = [] |
637 | + for dirpath, dirnames, filenames in os.walk(PATH): |
638 | + for filename in filenames: |
639 | + documents += [os.path.join(dirpath, filename)] |
640 | + return documents |
641 | + |
642 | + def _cleanup(self): |
643 | + pwd = os.getcwd() |
644 | + os.chdir(os.path.join(PATH, '../..')) |
645 | + subprocess.call(['make', 'clean']) |
646 | + os.chdir(pwd) |
647 | + |
648 | + def backup_documents(self): |
649 | + shutil.copytree(PATH, os.path.join(PATH, '../backup/')) |
650 | + |
651 | + def _remove_metadata(self, filename): |
652 | + lines = open(filename).readlines() |
653 | + index = 0 |
654 | + for line in lines: |
655 | + if not [x for x in METADATA_TAGS if line.startswith(x+':')] and \ |
656 | + line.strip()!='': |
657 | + index = lines.index(line) |
658 | + break |
659 | + os.remove(filename) |
660 | + with open(filename, 'w', encoding='utf-8') as new_file: |
661 | + new_file.write(''.join(lines[index:])) |
662 | + |
663 | + def clean_documents(self): |
664 | + for document in self.documents: |
665 | + self._remove_metadata(document) |
666 | + |
667 | + def generate_pot_file(self): |
668 | + args = [ |
669 | + '-f', 'text', |
670 | + '-o', 'markdown', |
671 | + '-M', 'utf-8', |
672 | + '-L', 'utf-8', |
673 | + ] |
674 | + for document in self.documents: |
675 | + args += [ '-m', document ] |
676 | + args += [ |
677 | + '-p', os.path.join(self.translations_dir, 'help.pot') |
678 | + ] |
679 | + subprocess.call([ 'po4a-gettextize' ]+args) |
680 | + |
681 | + def copy_backuped_data_back(self): |
682 | + shutil.rmtree(PATH) |
683 | + shutil.copytree(os.path.join('backup'), PATH) |
684 | + |
685 | + |
686 | +def main(): |
687 | + translations = Translations() |
688 | + translations.backup_documents() |
689 | + translations.clean_documents() |
690 | + translations.generate_pot_file() |
691 | + translations.copy_backuped_data_back() |
692 | + |
693 | +if __name__ == '__main__': |
694 | + try: |
695 | + main() |
696 | + except KeyboardInterrupt: |
697 | + print('Aborted.', file=sys.stderr) |
698 | + sys.exit(1) |
699 | |
700 | === removed directory 'edit-here/layout' |
701 | === removed file 'edit-here/layout/base.j2' |
702 | --- edit-here/layout/base.j2 2015-01-30 10:45:07 +0000 |
703 | +++ edit-here/layout/base.j2 1970-01-01 00:00:00 +0000 |
704 | @@ -1,52 +0,0 @@ |
705 | -<!doctype html> |
706 | -<html lang="en"> |
707 | - <head> |
708 | - <title>Ubuntu for devices - Help</title> |
709 | - <meta name="description" content="Ubuntu for devices - Help"> |
710 | - <meta name="viewport" content="width=device-width, initial-scale=1, |
711 | - maximum-scale=1, user-scalable=0"> |
712 | - <meta charset="utf-8" /> |
713 | - <link rel="stylesheet" href="{{ media_url('css/app.css') }}"> |
714 | - |
715 | - <!-- |
716 | - Ubuntu UI javascript imports - Ambiance theme |
717 | - Ubuntu provides building blocks that you can use in your application. For more information, you can check out the documentation at http://design.ubuntu.com/apps. |
718 | - --> |
719 | - <!-- Ubuntu UI Style imports - Ambiance theme --> |
720 | - <link href="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" /> |
721 | - |
722 | - <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/fast-buttons.js"></script> |
723 | - <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/core.js"></script> |
724 | - <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/buttons.js"></script> |
725 | - <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/dialogs.js"></script> |
726 | - <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/page.js"></script> |
727 | - <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/pagestacks.js"></script> |
728 | - <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/tab.js"></script> |
729 | - <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/tabs.js"></script> |
730 | - |
731 | - <script src="{{ media_url('js/app.js') }}"></script> |
732 | - |
733 | - </head> |
734 | - <body> |
735 | - <div data-role="mainview"> |
736 | - <header data-role="header"> |
737 | - <ul data-role="tabs"> |
738 | - <li data-role="tabitem" data-page="main">Help for Ubuntu for devices</li> |
739 | - </ul> |
740 | - </header> |
741 | - |
742 | - <div data-role="content"> |
743 | - |
744 | - <article id="content"> |
745 | - {# Main content block. Notice it has to pass through the |
746 | - Markdown filter to generate HTML. If a block in content |
747 | - pages contains only markup, you can omit the filter. |
748 | - #} |
749 | - {% filter markdown -%} |
750 | - {% block content %}{% endblock %} |
751 | - {%- endfilter %} |
752 | - </article> |
753 | - </div> |
754 | - </div> |
755 | - </body> |
756 | -</html> |
757 | |
758 | === added file 'edit-here/pelicanconf.py' |
759 | --- edit-here/pelicanconf.py 1970-01-01 00:00:00 +0000 |
760 | +++ edit-here/pelicanconf.py 2015-02-10 17:14:30 +0000 |
761 | @@ -0,0 +1,35 @@ |
762 | +#!/usr/bin/env python |
763 | +# -*- coding: utf-8 -*- # |
764 | +from __future__ import unicode_literals |
765 | + |
766 | +AUTHOR = u'Ubuntu Core Apps Developers' |
767 | +SITENAME = u'Ubuntu for devices: Help' |
768 | +SITEURL = '' |
769 | + |
770 | +PATH = 'content' |
771 | + |
772 | +TIMEZONE = 'Europe/Paris' |
773 | + |
774 | +DEFAULT_LANG = u'en' |
775 | + |
776 | +# Feed generation is usually not desired when developing |
777 | +FEED_ALL_ATOM = None |
778 | +CATEGORY_FEED_ATOM = None |
779 | +TRANSLATION_FEED_ATOM = None |
780 | +AUTHOR_FEED_ATOM = None |
781 | +AUTHOR_FEED_RSS = None |
782 | + |
783 | +# Blogroll |
784 | +LINKS = () |
785 | + |
786 | +# Social widget |
787 | +SOCIAL = () |
788 | + |
789 | +DEFAULT_PAGINATION = False |
790 | + |
791 | +# Uncomment following line if you want document-relative URLs when developing |
792 | +#RELATIVE_URLS = True |
793 | + |
794 | +TAGS_SAVE_AS = '' |
795 | +TAG_SAVE_AS = '' |
796 | +THEME = 'theme' |
797 | |
798 | === added directory 'edit-here/po' |
799 | === added file 'edit-here/po/de.po' |
800 | --- edit-here/po/de.po 1970-01-01 00:00:00 +0000 |
801 | +++ edit-here/po/de.po 2015-02-10 17:14:30 +0000 |
802 | @@ -0,0 +1,192 @@ |
803 | +# SOME DESCRIPTIVE TITLE |
804 | +# Copyright (C) YEAR Free Software Foundation, Inc. |
805 | +# This file is distributed under the same license as the PACKAGE package. |
806 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
807 | +# |
808 | +#, fuzzy |
809 | +msgid "" |
810 | +msgstr "" |
811 | +"Project-Id-Version: PACKAGE VERSION\n" |
812 | +"POT-Creation-Date: 2015-02-09 15:37+0100\n" |
813 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
814 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
815 | +"Language-Team: LANGUAGE <LL@li.org>\n" |
816 | +"Language: \n" |
817 | +"MIME-Version: 1.0\n" |
818 | +"Content-Type: text/plain; charset=CHARSET\n" |
819 | +"Content-Transfer-Encoding: 8bit\n" |
820 | + |
821 | +#. type: Plain text |
822 | +#: content/pages/faq.md:2 |
823 | +msgid "Title: Get your questions answered." |
824 | +msgstr "Title: Lass Deine Fragen beantworten." |
825 | + |
826 | +#. type: Plain text |
827 | +#: content/pages/faq.md:4 content/pages/get-in-touch.md:4 content/pages/index.md:4 content/pages/apps.md:4 |
828 | +msgid "Lang: en" |
829 | +msgstr "Lang: de" |
830 | + |
831 | +#. type: Plain text |
832 | +#: content/pages/faq.md:6 content/pages/get-in-touch.md:6 content/pages/index.md:6 content/pages/apps.md:6 |
833 | +msgid "Date:" |
834 | +msgstr "Date:" |
835 | + |
836 | +#. type: Plain text |
837 | +#: content/pages/faq.md:8 |
838 | +msgid "save_as: faq.html" |
839 | +msgstr "save_as: de/faq.html" |
840 | + |
841 | +#. type: Plain text |
842 | +#: content/pages/faq.md:11 |
843 | +msgid "" |
844 | +"We divided the questions up into categories, so you can spot yours more " |
845 | +"easily. Here we go:" |
846 | +msgstr "Wir haben die Fragen in Kategorien aufgeteilt, so dass Du Deine " |
847 | +"einfacher finden kannst. Los geht's:" |
848 | + |
849 | +#. type: Bullet: ' * ' |
850 | +#: content/pages/faq.md:13 |
851 | +msgid "[Apps](apps.html)" |
852 | +msgstr "[Apps](apps.html)" |
853 | + |
854 | +#. type: Bullet: ' * ' |
855 | +#: content/pages/faq.md:13 |
856 | +msgid "..." |
857 | +msgstr "..." |
858 | + |
859 | +#. type: Plain text |
860 | +#: content/pages/get-in-touch.md:2 |
861 | +msgid "Title: Get in touch" |
862 | +msgstr "Title: Kontakt" |
863 | + |
864 | +#. type: Plain text |
865 | +#: content/pages/get-in-touch.md:8 |
866 | +msgid "save_as: get-in-touch.html" |
867 | +msgstr "save_as: de/get-in-touch.html" |
868 | + |
869 | +#. type: Plain text |
870 | +#: content/pages/get-in-touch.md:13 |
871 | +#, no-wrap |
872 | +msgid "" |
873 | +"Ubuntu has a huge community. You can easily get in touch with experts and\n" |
874 | +"other enthusiasts. One good way to do so, particularly if you **have \n" |
875 | +"questions**, is [AskUbuntu](http://www.askubuntu.com). It's a \n" |
876 | +"collaboratively-edited question and answer site for Ubuntu users and \n" |
877 | +"developers. 100% free, no registration required. \n" |
878 | +msgstr "" |
879 | +"Ubuntu hat eine riesige community. Du kannst sehr einfach mit Experten \n" |
880 | +"und anderen Enthusiasten in Kontakt kommen. Ein guter Weg, vor allen \n" |
881 | +"Dingen, wenn Du **Fragen haben** soltest, ist \n" |
882 | +"[AskUbuntu](http://www.askubuntu.com). Es ist eine Seite auf \n" |
883 | +"gemeinschaftlich Fragen beantwortet werden. Sie ist 100% kostenlos und \n" |
884 | +"frei. Keine Registrierung notwendig. \n" |
885 | + |
886 | +#. type: Plain text |
887 | +#: content/pages/get-in-touch.md:18 |
888 | +msgid "" |
889 | +"Another great place to **get involved** with Ubuntu is our very own [Ubuntu " |
890 | +"Community Website](http://community.ubuntu.com/). You can very easily find " |
891 | +"out about all the indiviual teams in Ubuntu, what they do, where they hang " |
892 | +"out and how to get involved." |
893 | +msgstr "" |
894 | + |
895 | +#. type: Plain text |
896 | +#: content/pages/index.md:2 |
897 | +msgid "Title: Welcome to Help for Ubuntu for devices!" |
898 | +msgstr "Title: Willkommen zur Hilfe für Ubuntu" |
899 | + |
900 | +#. type: Plain text |
901 | +#: content/pages/index.md:8 |
902 | +msgid "save_as: index.html" |
903 | +msgstr "save_as: de/index.html" |
904 | + |
905 | +#. type: Plain text |
906 | +#: content/pages/index.md:11 |
907 | +msgid "" |
908 | +"The world-wide Ubuntu community wants to give you the best possible " |
909 | +"experience on your Ubuntu device. This is why we collected:" |
910 | +msgstr "" |
911 | + |
912 | +#. type: Bullet: ' * ' |
913 | +#: content/pages/index.md:15 |
914 | +msgid "answers to frequently asked questions" |
915 | +msgstr "" |
916 | + |
917 | +#. type: Bullet: ' * ' |
918 | +#: content/pages/index.md:15 |
919 | +msgid "tips and tricks to make you more productive" |
920 | +msgstr "" |
921 | + |
922 | +#. type: Bullet: ' * ' |
923 | +#: content/pages/index.md:15 |
924 | +msgid "links to get in touch with experts and other community members" |
925 | +msgstr "" |
926 | + |
927 | +#. type: Plain text |
928 | +#: content/pages/index.md:17 |
929 | +msgid "in this app for you." |
930 | +msgstr "" |
931 | + |
932 | +#. type: Plain text |
933 | +#: content/pages/index.md:18 |
934 | +#, no-wrap |
935 | +msgid "[Take me to the FAQ!](faq.html) \n" |
936 | +msgstr "[Take me to the FAQ!](faq.html) \n" |
937 | + |
938 | +#. type: Plain text |
939 | +#: content/pages/index.md:20 |
940 | +msgid "[Get in touch](get-in-touch.html)" |
941 | +msgstr "[Get in touch](get-in-touch.html)" |
942 | + |
943 | +#. type: Plain text |
944 | +#: content/pages/apps.md:2 |
945 | +msgid "Title: FAQ - Apps" |
946 | +msgstr "Title: FAQ - Apps" |
947 | + |
948 | +#. type: Plain text |
949 | +#: content/pages/apps.md:8 |
950 | +msgid "save_as: apps.html" |
951 | +msgstr "save_as: de/apps.html" |
952 | + |
953 | +#. type: Plain text |
954 | +#: content/pages/apps.md:11 |
955 | +msgid "" |
956 | +"Are you looking for a good way to do X and can't find it in the app store? " |
957 | +"Want some suggestions to solve a particular problem?" |
958 | +msgstr "Suchst Du nach einem guten Weg X zu tun und Du findest nichts dazu \n" |
959 | +"im Software Store? Suchst Du Tips, um bestimmte Probleme zu lösen?" |
960 | + |
961 | +#. type: Plain text |
962 | +#: content/pages/apps.md:13 |
963 | +#, no-wrap |
964 | +msgid "**Q:** Do you have Spotify? \n" |
965 | +msgstr "**Q:** Gibt es Spotify? \n" |
966 | + |
967 | +#. type: Plain text |
968 | +#: content/pages/apps.md:16 |
969 | +#, no-wrap |
970 | +msgid "" |
971 | +"**A:** If you have a Spotify premium account, just install 'CuteSpotify'\n" |
972 | +" ([video](https://www.youtube.com/watch?v=ea90rwK_VuI)).\n" |
973 | +"---\n" |
974 | +msgstr "" |
975 | +"**A:** Wenn Du einen Spotify Premium Account hast, installiere einfach \n" |
976 | +" 'CuteSpotify' ([video](https://www.youtube.com/watch?v=ea90rwK_VuI)).\n" |
977 | +"---\n" |
978 | + |
979 | +#. type: Plain text |
980 | +#: content/pages/apps.md:17 |
981 | +#, no-wrap |
982 | +msgid "**Q:** Do you have Google Authenticator? \n" |
983 | +msgstr "**Q:** Gibt es Googlt Authenticator? \n" |
984 | + |
985 | +#. type: Plain text |
986 | +#: content/pages/apps.md:19 |
987 | +#, no-wrap |
988 | +msgid "" |
989 | +"**A:** Sure, install the 'Authenticator' app from the software store.\n" |
990 | +"---\n" |
991 | +msgstr "" |
992 | +"**A:** Klar, installiere einfach die 'Authenticator' App aus dem Software \n" |
993 | +"Store. \n" |
994 | +"---\n" |
995 | |
996 | === added file 'edit-here/po/help.pot' |
997 | --- edit-here/po/help.pot 1970-01-01 00:00:00 +0000 |
998 | +++ edit-here/po/help.pot 2015-02-10 17:14:30 +0000 |
999 | @@ -0,0 +1,178 @@ |
1000 | +# SOME DESCRIPTIVE TITLE |
1001 | +# Copyright (C) YEAR Free Software Foundation, Inc. |
1002 | +# This file is distributed under the same license as the PACKAGE package. |
1003 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
1004 | +# |
1005 | +#, fuzzy |
1006 | +msgid "" |
1007 | +msgstr "" |
1008 | +"Project-Id-Version: PACKAGE VERSION\n" |
1009 | +"POT-Creation-Date: 2015-02-09 15:37+0100\n" |
1010 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
1011 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
1012 | +"Language-Team: LANGUAGE <LL@li.org>\n" |
1013 | +"Language: \n" |
1014 | +"MIME-Version: 1.0\n" |
1015 | +"Content-Type: text/plain; charset=CHARSET\n" |
1016 | +"Content-Transfer-Encoding: 8bit\n" |
1017 | + |
1018 | +#. type: Plain text |
1019 | +#: content/pages/faq.md:2 |
1020 | +msgid "Title: Get your questions answered." |
1021 | +msgstr "" |
1022 | + |
1023 | +#. type: Plain text |
1024 | +#: content/pages/faq.md:4 content/pages/get-in-touch.md:4 content/pages/index.md:4 content/pages/apps.md:4 |
1025 | +msgid "Lang: en" |
1026 | +msgstr "" |
1027 | + |
1028 | +#. type: Plain text |
1029 | +#: content/pages/faq.md:6 content/pages/get-in-touch.md:6 content/pages/index.md:6 content/pages/apps.md:6 |
1030 | +msgid "Date:" |
1031 | +msgstr "" |
1032 | + |
1033 | +#. type: Plain text |
1034 | +#: content/pages/faq.md:8 |
1035 | +msgid "save_as: faq.html" |
1036 | +msgstr "" |
1037 | + |
1038 | +#. type: Plain text |
1039 | +#: content/pages/faq.md:11 |
1040 | +msgid "" |
1041 | +"We divided the questions up into categories, so you can spot yours more " |
1042 | +"easily. Here we go:" |
1043 | +msgstr "" |
1044 | + |
1045 | +#. type: Bullet: ' * ' |
1046 | +#: content/pages/faq.md:13 |
1047 | +msgid "[Apps](apps.html)" |
1048 | +msgstr "" |
1049 | + |
1050 | +#. type: Bullet: ' * ' |
1051 | +#: content/pages/faq.md:13 |
1052 | +msgid "..." |
1053 | +msgstr "" |
1054 | + |
1055 | +#. type: Plain text |
1056 | +#: content/pages/get-in-touch.md:2 |
1057 | +msgid "Title: Get in touch" |
1058 | +msgstr "" |
1059 | + |
1060 | +#. type: Plain text |
1061 | +#: content/pages/get-in-touch.md:8 |
1062 | +msgid "save_as: get-in-touch.html" |
1063 | +msgstr "" |
1064 | + |
1065 | +#. type: Plain text |
1066 | +#: content/pages/get-in-touch.md:13 |
1067 | +#, no-wrap |
1068 | +msgid "" |
1069 | +"Ubuntu has a huge community. You can easily get in touch with experts and\n" |
1070 | +"other enthusiasts. One good way to do so, particularly if you **have \n" |
1071 | +"questions**, is [AskUbuntu](http://www.askubuntu.com). It's a \n" |
1072 | +"collaboratively-edited question and answer site for Ubuntu users and \n" |
1073 | +"developers. 100% free, no registration required. \n" |
1074 | +msgstr "" |
1075 | + |
1076 | +#. type: Plain text |
1077 | +#: content/pages/get-in-touch.md:18 |
1078 | +msgid "" |
1079 | +"Another great place to **get involved** with Ubuntu is our very own [Ubuntu " |
1080 | +"Community Website](http://community.ubuntu.com/). You can very easily find " |
1081 | +"out about all the indiviual teams in Ubuntu, what they do, where they hang " |
1082 | +"out and how to get involved." |
1083 | +msgstr "" |
1084 | + |
1085 | +#. type: Plain text |
1086 | +#: content/pages/index.md:2 |
1087 | +msgid "Title: Welcome to Help for Ubuntu for devices!" |
1088 | +msgstr "" |
1089 | + |
1090 | +#. type: Plain text |
1091 | +#: content/pages/index.md:8 |
1092 | +msgid "save_as: index.html" |
1093 | +msgstr "" |
1094 | + |
1095 | +#. type: Plain text |
1096 | +#: content/pages/index.md:11 |
1097 | +msgid "" |
1098 | +"The world-wide Ubuntu community wants to give you the best possible " |
1099 | +"experience on your Ubuntu device. This is why we collected:" |
1100 | +msgstr "" |
1101 | + |
1102 | +#. type: Bullet: ' * ' |
1103 | +#: content/pages/index.md:15 |
1104 | +msgid "answers to frequently asked questions" |
1105 | +msgstr "" |
1106 | + |
1107 | +#. type: Bullet: ' * ' |
1108 | +#: content/pages/index.md:15 |
1109 | +msgid "tips and tricks to make you more productive" |
1110 | +msgstr "" |
1111 | + |
1112 | +#. type: Bullet: ' * ' |
1113 | +#: content/pages/index.md:15 |
1114 | +msgid "links to get in touch with experts and other community members" |
1115 | +msgstr "" |
1116 | + |
1117 | +#. type: Plain text |
1118 | +#: content/pages/index.md:17 |
1119 | +msgid "in this app for you." |
1120 | +msgstr "" |
1121 | + |
1122 | +#. type: Plain text |
1123 | +#: content/pages/index.md:18 |
1124 | +#, no-wrap |
1125 | +msgid "[Take me to the FAQ!](faq.html) \n" |
1126 | +msgstr "" |
1127 | + |
1128 | +#. type: Plain text |
1129 | +#: content/pages/index.md:20 |
1130 | +msgid "[Get in touch](get-in-touch.html)" |
1131 | +msgstr "" |
1132 | + |
1133 | +#. type: Plain text |
1134 | +#: content/pages/apps.md:2 |
1135 | +msgid "Title: FAQ - Apps" |
1136 | +msgstr "" |
1137 | + |
1138 | +#. type: Plain text |
1139 | +#: content/pages/apps.md:8 |
1140 | +msgid "save_as: apps.html" |
1141 | +msgstr "" |
1142 | + |
1143 | +#. type: Plain text |
1144 | +#: content/pages/apps.md:11 |
1145 | +msgid "" |
1146 | +"Are you looking for a good way to do X and can't find it in the app store? " |
1147 | +"Want some suggestions to solve a particular problem?" |
1148 | +msgstr "" |
1149 | + |
1150 | +#. type: Plain text |
1151 | +#: content/pages/apps.md:13 |
1152 | +#, no-wrap |
1153 | +msgid "**Q:** Do you have Spotify? \n" |
1154 | +msgstr "" |
1155 | + |
1156 | +#. type: Plain text |
1157 | +#: content/pages/apps.md:16 |
1158 | +#, no-wrap |
1159 | +msgid "" |
1160 | +"**A:** If you have a Spotify premium account, just install 'CuteSpotify'\n" |
1161 | +" ([video](https://www.youtube.com/watch?v=ea90rwK_VuI)).\n" |
1162 | +"---\n" |
1163 | +msgstr "" |
1164 | + |
1165 | +#. type: Plain text |
1166 | +#: content/pages/apps.md:17 |
1167 | +#, no-wrap |
1168 | +msgid "**Q:** Do you have Google Authenticator? \n" |
1169 | +msgstr "" |
1170 | + |
1171 | +#. type: Plain text |
1172 | +#: content/pages/apps.md:19 |
1173 | +#, no-wrap |
1174 | +msgid "" |
1175 | +"**A:** Sure, install the 'Authenticator' app from the software store.\n" |
1176 | +"---\n" |
1177 | +msgstr "" |
1178 | |
1179 | === added file 'edit-here/publishconf.py' |
1180 | --- edit-here/publishconf.py 1970-01-01 00:00:00 +0000 |
1181 | +++ edit-here/publishconf.py 2015-02-10 17:14:30 +0000 |
1182 | @@ -0,0 +1,24 @@ |
1183 | +#!/usr/bin/env python |
1184 | +# -*- coding: utf-8 -*- # |
1185 | +from __future__ import unicode_literals |
1186 | + |
1187 | +# This file is only used if you use `make publish` or |
1188 | +# explicitly specify it as your config file. |
1189 | + |
1190 | +import os |
1191 | +import sys |
1192 | +sys.path.append(os.curdir) |
1193 | +from pelicanconf import * |
1194 | + |
1195 | +SITEURL = '' |
1196 | +RELATIVE_URLS = False |
1197 | + |
1198 | +FEED_ALL_ATOM = 'feeds/all.atom.xml' |
1199 | +CATEGORY_FEED_ATOM = 'feeds/%s.atom.xml' |
1200 | + |
1201 | +DELETE_OUTPUT_DIRECTORY = True |
1202 | + |
1203 | +# Following items are often useful when publishing |
1204 | + |
1205 | +#DISQUS_SITENAME = "" |
1206 | +#GOOGLE_ANALYTICS = "" |
1207 | |
1208 | === removed file 'edit-here/site.yaml' |
1209 | --- edit-here/site.yaml 2015-02-02 08:29:46 +0000 |
1210 | +++ edit-here/site.yaml 1970-01-01 00:00:00 +0000 |
1211 | @@ -1,87 +0,0 @@ |
1212 | -mode: learning |
1213 | -media_root: media |
1214 | -media_url: media |
1215 | -base_url: |
1216 | -deploy_root: ../app/www/ |
1217 | -# If your site is nested inside of a bigger one, you can use media_url and |
1218 | -# base_url to properly generate links on your site. For example, if your URL |
1219 | -# will be some.domain.com/starter/, use: |
1220 | -# media_url: /starter/media |
1221 | -# base_url: /starter/ |
1222 | -template: hyde.ext.templates.jinja.Jinja2Template |
1223 | -plugins: |
1224 | - - hyde.ext.plugins.meta.MetaPlugin |
1225 | - - hyde.ext.plugins.auto_extend.AutoExtendPlugin |
1226 | - # Plugins needed for the advances section. |
1227 | - - hyde.ext.plugins.sorter.SorterPlugin |
1228 | - - hyde.ext.plugins.grouper.GrouperPlugin |
1229 | - - hyde.ext.plugins.tagger.TaggerPlugin |
1230 | -context: |
1231 | - data: |
1232 | - author: |
1233 | - name: Ubuntu Community |
1234 | - url: "http://ubuntu.com" |
1235 | - project: |
1236 | - name: Ubuntu |
1237 | - url: "http://ubuntu.com" |
1238 | - menu: |
1239 | - - title: Home |
1240 | - url: index.html |
1241 | - - title: Get in touch |
1242 | - url: get-in-touch.html |
1243 | - |
1244 | -### Advanced part ### |
1245 | - |
1246 | -# This defines meta data on the whole site. |
1247 | -meta: |
1248 | - # 'nodemeta' will tell Hyde what file to look for inside a folder from |
1249 | - # which to apply meta data to all files (resources) inside it. This is |
1250 | - # a great way of simply adding or modifying properties of a very large |
1251 | - # number of files. |
1252 | - nodemeta: meta.yaml |
1253 | - ga_tracking_code: XX-XXXXXXXX-X |
1254 | - |
1255 | -sorter: |
1256 | - name: # the name of the sorter (no pun intended) |
1257 | - attr: name # by which attributes will resources be sorted |
1258 | - filters: |
1259 | - source_file.kind: html |
1260 | - # You can include only files from a certain folder. |
1261 | - #resource.node: (name of the folder) |
1262 | - #reverse: True # if you need the list backwards |
1263 | - file_type: |
1264 | - attr: |
1265 | - - source_file.kind |
1266 | - - source_file.size |
1267 | - index: |
1268 | - attr: meta.index |
1269 | - filters: |
1270 | - source_file.kind: html |
1271 | - learning_order: |
1272 | - attr: meta.learning_order |
1273 | - filters: |
1274 | - source_file.kind: html |
1275 | - |
1276 | -grouper: |
1277 | - level: |
1278 | - sorter: name |
1279 | - description: Difficulty levels |
1280 | - groups: |
1281 | - - name: basic |
1282 | - description: Basic |
1283 | - - name: advanced |
1284 | - description: Advanced |
1285 | - # You can have more than one group section, depending on your needs. |
1286 | - # For example: "categories", "menu sections", etc. |
1287 | - #category: |
1288 | - # description: To which category a blog post belongs to. |
1289 | - # groups: |
1290 | - # - name: software |
1291 | - # description: Software engineering |
1292 | - # - name: web |
1293 | - # description: Web technologies |
1294 | - # - name: seo |
1295 | - # description: Search Engine Optimization |
1296 | - |
1297 | -tagger: |
1298 | - sorter: name |
1299 | |
1300 | === added directory 'edit-here/theme' |
1301 | === added directory 'edit-here/theme/static' |
1302 | === added directory 'edit-here/theme/static/css' |
1303 | === added file 'edit-here/theme/static/css/app.css' |
1304 | === added directory 'edit-here/theme/static/js' |
1305 | === added file 'edit-here/theme/static/js/app.js' |
1306 | --- edit-here/theme/static/js/app.js 1970-01-01 00:00:00 +0000 |
1307 | +++ edit-here/theme/static/js/app.js 2015-02-10 17:14:30 +0000 |
1308 | @@ -0,0 +1,6 @@ |
1309 | +window.onload = function () { |
1310 | + var UI = new UbuntuUI(); |
1311 | + UI.init(); |
1312 | +}; |
1313 | + |
1314 | + |
1315 | |
1316 | === added directory 'edit-here/theme/templates' |
1317 | === added file 'edit-here/theme/templates/base.html' |
1318 | --- edit-here/theme/templates/base.html 1970-01-01 00:00:00 +0000 |
1319 | +++ edit-here/theme/templates/base.html 2015-02-10 17:14:30 +0000 |
1320 | @@ -0,0 +1,50 @@ |
1321 | +<!doctype html> |
1322 | +<html lang="en"> |
1323 | + <head> |
1324 | + <title>Ubuntu for devices - Help</title> |
1325 | + <meta name="description" content="Ubuntu for devices - Help"> |
1326 | + <meta name="viewport" content="width=device-width, initial-scale=1, |
1327 | + maximum-scale=1, user-scalable=0"> |
1328 | + <meta charset="utf-8" /> |
1329 | + <link rel="stylesheet" href="{{ THEME_STATIC_DIR }}/css/app.css" /> |
1330 | + |
1331 | + <!-- |
1332 | + Ubuntu UI javascript imports - Ambiance theme |
1333 | + Ubuntu provides building blocks that you can use in your application. For more information, you can check out the documentation at http://design.ubuntu.com/apps. |
1334 | + --> |
1335 | + <!-- Ubuntu UI Style imports - Ambiance theme --> |
1336 | + <link href="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/css/appTemplate.css" rel="stylesheet" type="text/css" /> |
1337 | + |
1338 | + <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/fast-buttons.js"></script> |
1339 | + <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/core.js"></script> |
1340 | + <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/buttons.js"></script> |
1341 | + <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/dialogs.js"></script> |
1342 | + <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/page.js"></script> |
1343 | + <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/pagestacks.js"></script> |
1344 | + <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/tab.js"></script> |
1345 | + <script src="/usr/share/ubuntu-html5-ui-toolkit/0.1/ambiance/js/tabs.js"></script> |
1346 | + |
1347 | + <script src="{{ THEME_STATIC_DIR }}/js/app.js"></script> |
1348 | + |
1349 | + </head> |
1350 | + <body> |
1351 | + <div data-role="mainview"> |
1352 | + <header data-role="header"> |
1353 | + <ul data-role="tabs"> |
1354 | + <li data-role="tabitem" data-page="main">Help for Ubuntu for devices</li> |
1355 | + </ul> |
1356 | + </header> |
1357 | + |
1358 | + <div data-role="content"> |
1359 | + |
1360 | + <article id="content"> |
1361 | + {# Main content block. Notice it has to pass through the |
1362 | + Markdown filter to generate HTML. If a block in content |
1363 | + pages contains only markup, you can omit the filter. |
1364 | + #} |
1365 | + {% block content %}{% endblock %} |
1366 | + </article> |
1367 | + </div> |
1368 | + </div> |
1369 | + </body> |
1370 | +</html> |
1371 | |
1372 | === added file 'edit-here/theme/templates/index.html' |
1373 | --- edit-here/theme/templates/index.html 1970-01-01 00:00:00 +0000 |
1374 | +++ edit-here/theme/templates/index.html 2015-02-10 17:14:30 +0000 |
1375 | @@ -0,0 +1,5 @@ |
1376 | +{% extends "base.html" %} |
1377 | +{% block content %} |
1378 | +<section id="content"> |
1379 | +</section><!-- /#content --> |
1380 | +{% endblock content %} |
1381 | |
1382 | === added file 'edit-here/theme/templates/page.html' |
1383 | --- edit-here/theme/templates/page.html 1970-01-01 00:00:00 +0000 |
1384 | +++ edit-here/theme/templates/page.html 2015-02-10 17:14:30 +0000 |
1385 | @@ -0,0 +1,9 @@ |
1386 | +{% extends "base.html" %} |
1387 | +{% block title %}{{ page.title }}{%endblock%} |
1388 | +{% block content %} |
1389 | + <h1>{{ page.title }}</h1> |
1390 | + {% import 'translations.html' as translations with context %} |
1391 | + {{ translations.translations_for(page) }} |
1392 | + {{ page.content }} |
1393 | +{% endblock %} |
1394 | + |
I believe the german translation isn't quite right:
nskaggs@ balloons: ~/projects/ ubuntutouch/ merges/ pelican$ make html nskaggs/ projects/ ubuntutouch/ merges/ pelican/ edit-here' nskaggs/ projects/ ubuntutouch/ merges/ pelican/ edit-here' nskaggs/ projects/ ubuntutouch/ merges/ pelican/ edit-here' projects/ ubuntutouch/ merges/ pelican/ edit-here/ content -o /home/nskaggs/ projects/ ubuntutouch/ merges/ pelican/ edit-here/ ../app/ www -s /home/nskaggs/ projects/ ubuntutouch/ merges/ pelican/ edit-here/ pelicanconf. py projects/ ubuntutouch/ merges/ pelican/ edit-here/ content/ pages/apps. md projects/ ubuntutouch/ merges/ pelican/ edit-here/ content/ pages/de/ apps.md projects/ ubuntutouch/ merges/ pelican/ app/www/ pages/faq- apps.html is to be overwritten nskaggs/ projects/ ubuntutouch/ merges/ pelican/ edit-here'
make -C edit-here translate
make[1]: Entering directory '/home/
make[1]: 'translate' is up to date.
make[1]: Leaving directory '/home/
make -C edit-here html
make[1]: Entering directory '/home/
pelican /home/nskaggs/
WARNING: There are 2 variants of "faq-apps" with lang en
WARNING: /home/nskaggs/
WARNING: /home/nskaggs/
CRITICAL: File /home/nskaggs/
Makefile:61: recipe for target 'html' failed
make[1]: *** [html] Error 1
make[1]: Leaving directory '/home/
Makefile:10: recipe for target 'html' failed
make: *** [html] Error 2