summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorJames E. Blair <corvus@gnu.org>2014-12-20 07:35:13 -0800
committerJames E. Blair <corvus@gnu.org>2015-01-09 10:39:14 -0800
commitef9fb76de9ef299fbdc8f87f1dd05bdd1eda649e (patch)
treedc85b1dfb180f427b3686e59d6b7a8254397c1e2 /example
Initial commit
Diffstat (limited to 'example')
-rw-r--r--example/ansi.ans45
-rw-r--r--example/demo.rst149
-rw-r--r--example/gg.jpgbin0 -> 78551 bytes
3 files changed, 194 insertions, 0 deletions
diff --git a/example/ansi.ans b/example/ansi.ans
new file mode 100644
index 0000000..ea6a694
--- /dev/null
+++ b/example/ansi.ans
@@ -0,0 +1,45 @@
1 ______________ .──. .──. ______________
2
3( (  \ \_____)____(_____/ /  ) )
4
5 \ ) `─────'   `─────' ( /
6
7 )/   \(
8
9 /' `\ 
10
11O  _ _ _ ____ ___ _ _   O
12
13│  / \ | \ | / ___|_ _| / \ _ __| |_  │
14
15│  / _ \ | \| \___ \| | / _ \ | '__| __| │
16
17│  / ___ \| |\ |___) | | / ___ \| | | |_  │
18
19│ /_/ \_\_| \_|____/___| /_/ \_\_| \__| │
20
21│ │
22
23O  May be directly included  O
24
25 \. ./ 
26
27 )\  ,____ ____,  /(
28
29 / ) / ____\ ____ /____ \ ( \
30
31( (_________/_/ ) ( \_\_________) )
32
33 ~-'  `──' `──'  `-~ 
34
35
36
37
38
39
40
41
42
43
44
45 \ No newline at end of file
diff --git a/example/demo.rst b/example/demo.rst
new file mode 100644
index 0000000..bafd9ba
--- /dev/null
+++ b/example/demo.rst
@@ -0,0 +1,149 @@
1.. This is an RST comment.
2 The following directives, when used at the top of the file, set default
3 values for all slides:
4
5 This sets the transition style. Values are: 'dissolve', 'pan', or
6 'cut'. The optional argument of 'duration' sets the duration of
7 the transition in seconds (0.4 seconds by default). The same
8 syntax may be used within a slide to override the transition for
9 that slide alone.
10
11 .. transition:: dissolve
12 :duration: 0.4
13
14 This disables display of the title. Each slide must still have a
15 title, and it will be used by the presenter console, but it will
16 not be displayed on the slide. The same syntax may be used within
17 a slide to hide the title of that individual slide.
18
19 .. hidetitle::
20
21.. Slides are defined one at a time by starting a new top-level
22 section:
23
24Presentty
25=========
26.. container:: handout
27
28 Content that is placed in a container called "handout" will not be
29 displayed with the slides, but will be displayed on the presenter's
30 console.
31
32Presentty is a console presentation system based where slides are
33authored in reStructuredText.
34
35Bullet Lists
36============
37It is able to display lists of items:
38
39* Pork
40
41 * Eastern North Carolina
42 * Lexington
43
44* Ribs
45* Brisket
46
47
48Progressive Display
49===================
50Bullet lists may include a *progressive* display:
51
52.. container:: progressive
53
54 * Red Leicester
55 * Tilsit
56 * Caerphilly
57
58
59Table
60=====
61
62=== ===
63 p !p
64=== ===
65 T F
66 F T
67=== ===
68
69Dissove Transition
70==================
71Transitions may be "dissolve," where one slide cross-fades into the next...
72
73Pan Transition
74==============
75.. transition:: pan
76
77...or "pan," where the slides appear horizontally adjacent and move
78right to left...
79
80Cut Transition
81==============
82.. transition:: cut
83
84...or "cut," where they abruptly change from one to the next.
85
86Syntax Highligting
87==================
88Pygments is used to provide syntax highlighting of code in almost any
89language:
90
91.. code:: python
92
93 class UrwidTranslator(nodes.GenericNodeVisitor):
94 def depart_Text(self, node):
95 if self.stack and isinstance(self.stack[-1], 'string'):
96 # a comment
97 if self.attr:
98 t = (self.attr[-1], node.astext())
99 else:
100 t = node.astext()
101 self.stack[-1].append(t)
102 visit_literal_block = visit_textelement
103
104Cowsay
105======
106.. cowsay:: Presentty is a console-based presentation program where
107 reStructuredText is used to author slides.
108
109| If cowsay is installed, it can easily
110| be used to display text.
111
112Figlet
113======
114.. container:: handout
115
116 Cowsay and figlet are non-standard directives and will not appear
117 if the RST file is rendered with a program other than presentty.
118 If you want to ensure that the content appears in all forms, you
119 may wish to run the respective commands manually and copy the
120 output into a quoted block in the RST file.
121
122.. figlet:: FIGLET
123
124| If figlet is installed, it can be
125| used to provide large text.
126
127ANSI Art
128========
129.. hidetitle::
130.. container:: handout
131
132 Note that the ansi directive is specific to presentty, and so if an
133 RST file that includes it is rendered with another program,
134 included ANSI files will not appear.
135
136.. ansi:: ansi.ans
137
138Images
139======
140.. container:: handout
141
142 The standard sphinx image directive can be used to include bitmap
143 images (such as JPEG or PNG files) which will be automatically
144 converted to ANSI art for display. This feauter requires that PIL
145 or Pillow (Python Image Library) and jp2a be installed.
146
147.. image:: gg.jpg
148
149"Golden Gate Bridge" by Kevin Cole (CC-BY: https://flic.kr/p/7L2Rdu)
diff --git a/example/gg.jpg b/example/gg.jpg
new file mode 100644
index 0000000..77dcb67
--- /dev/null
+++ b/example/gg.jpg
Binary files differ