forked from regebro/hovercraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hovercraft-t2t.t2t
executable file
·385 lines (205 loc) · 6.22 KB
/
hovercraft-t2t.t2t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
Hovercraft for txt2tags
%!target: rst
% we need to use ---- as a shortcut for transitions (otherwise it will be considered as list => pb with heading:
%!preproc(rst): '^----' '---------------------'
%!preproc(rst): '\/\*/\*' '---------------------'
%!preproc(rst): '\*-\*-' '---------------------'
%!preproc(rst): '\/\...' '---------------------'
% The note syntax in hovercraft was too rst looking for us. So we're using %note or %%note
%!preproc(rst): '%%note:' '.. note:: \n\n '
%!preproc(rst): '%note:' '.. note:: \n\n '
%!preproc(rst): '%%class:' ':class:'
%!preproc(rst): '%%id:' ':id:'
%!preproc(rst): '%%data' ':data'
% markup is not interpreted in txt2tags heading, but it is in rst. Bold is ok, but here we convert extra // into * (which means italic in rst)
%!postproc(rst): '\/\/(.*?)\/\/' '*\1*'
%-!postproc(rst): '^- ' '\n* '
%-!postproc(rst): '<div class = "step" >
:title: Hovercraft-t2t! demo
%%data-transition-duration: 1500
:css: hovercraft.css
:skip-help: true
This is a demo for Hovercraft! You can view it as a finished presentation
at http://farvardin.github.com/hovercraft-t2t/
It's also useful as an example, in which case it's supposed to be read as
`source code <../_sources/examples/hovercraft-t2t.t2t>`_.
You can render this presentation to HTML with the command::
txt2tags hovercraft-t2t.t2t && hovercraft hovercraft-t2t.rst sample
And then view the outdir/index.html file to see how it turned out.
If you are seeing this text, and not reading this as source code, you are
doing it wrong! It's going to be confusing and not very useful.
Use The Source, Luke! But first you probably want to read through the
official documentation at https://hovercraft.readthedocs.org/ (TODO)
Other alternatives:
- http://reb4.me/s5/impress.js (make doc + impress.js, in plain text)
- http://www.bortzmeyer.org/logiciel-presentation-nouveau.html
NOTE: This presentation will only start after the symbol below (either 4 dashes, slash star slash star, or slash dot dot dot)
/...
= The problem =
== Making presentations is no //fun!// ==
%%note: Welcome to the presenter console!
/...
= GUI tools are inflexible =
- It's hard to reorganize or import text
- Sluggy and memory hungry
- You get caught up in design early in the process.
%note:
Here you have a view of the current slide, a preview of the next slide
and your notes.
/...
%%class: green
= Use txt2tags! =
[t2t_logo.png]
- You can use your favorite text-editor!
- Many tools available: export to beamer, pdf, html
- Convenient (and powerful!)
%note:
You also have a clock and a timer, so you know how much time you have
left.
/...
= But then there was Prezi =
Sliding from left to right is no longer enough.
You need to be able to...
%note:
If you click on the timer it restarts from zero. This is handy when you
are rehearsing the presentation and need to make sure it fits in the time
allocated.
----
%%data-y: r1000
= ...pan... =
%note:
If you have more notes than fits in the console, you can scroll down, but
more handily, you can scroll the text up by pressing space bar.
----
%%data-rotate: 90
= ...rotate... =
%note:
If there isn't more text to scroll up, space bar will go to the next
slide. Therefore you, as a presenter, just press space everytime you run
out of things to say!
----
%%data-x: r0
%%data-y: r500
%%data-scale: 0.1
= ...and zoom! =
%note:
Zooming is cool. But one day it will grow old as well. What will we do
then to make presentations interesting?
----
%%data-x: r-800
%%data-scale: 1
= But Prezi is a GUI =
So we are back to square one.
(And it is closed source to boot)
%note:
It's probably back to making bad jokes again.
----
= What about impress.js? =
It's open source!
Supports pan, tilt and zoom!
----
%%id: ThreeD
%%data-y: r1200
%%data-rotate-x: 180
= In three dimensions! =
//But...//
%%note:
Wow! 3D! You didn't see that one coming, did you?
----
= It's HTML... =
Not a friendly format to edit
----
%%data-x: r800
= ...and manual positioning =
So inserting one slide means
repositioning all the following slides!
%%note:
The endless repositioning of slides is what prompted me to write
Hovercraft! in the first place.
/...
%%id: thequestion
%%data-x: r0
%%data-y: r-1200
= //Is there no solution?// =
Of course there is!
%note:
What would be the point of this slide show if I didn't have a solution?
Duh!
/...
%%data-rotate-y: 180
%%data-scale: 3
%%data-x: r-2500
%%data-y: r0
%%class: orange
= Introducing **Hovercraft!** =
%note:
TADA!
/...
%%class: blue
%%data-x: r-3000
%%data-scale: 1
== //txt2tags// ==
plus
....
== impress.js ==
plus
....
== impressConsole.js ==
plus
....
== positioning! ==
/...
%%data-y: r-1200
= Position slides =
- Automatically!
- Absolutely!
- Relative to the previous slide!
- Along an SVG path!
%note:
That SVG path support was a lot of work. And all I used it for was to
position the slides in circles.
/...
= Presenter console! =
- A view of the current slide
- A view of the next slide
- Your notes
- A clock
- A timer
%note:
You found the presenter console already!
/...
= **Hovercraft!** =
The merge of convenience and cool!
%note:
A slogan: The ad-mans best friend!
/...
%%data-x: 0
%%data-y: 2500
%%data-z: 4000
%%data-rotate-x: 90
//and now...//
= **Hovercraft-t2t!** =
Edit your presentation with the txt2tags syntax!
On Github:
https://github.com/farvardin/hovercraft-t2t
%note:
Fork and contribute!
/...
%%data-x: 0
%%data-y: 4500
%%data-z: 4000
%%data-rotate-x: 00
**Note**: We didn't code hovercraft.
Hovercraft-t2t is only a frontend to produce a reStructuredText document from a txt2tags document, and it will be parsed further with the hovercraft tool.
The original hovercraft is located at https://github.com/regebro/hovercraft
/...
= How to use it =
- Install hovercraft with this command:
``` pip install hovercraft
%note: If it fails, try:
sudo pip install --upgrade setuptools
pip-3.2 install --upgrade hovercraft
- Study the //t2t// source at:
https://github.com/farvardin/hovercraft-t2t/blob/master/hovercraft-t2t.t2t
/...
= Thank you for your attention! =