diff options
Diffstat (limited to 'example')
| -rw-r--r-- | example/ansi.ans | 45 | ||||
| -rw-r--r-- | example/demo.rst | 149 | ||||
| -rw-r--r-- | example/gg.jpg | bin | 0 -> 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 | [0m [1;34m______________[0;37m [1;34m.──.[0;37m [1;34m.──.[0;37m [1;34m______________[0;37m | ||
| 2 | [A[79C | ||
| 3 | [1;34m( ( [0;37m [1;34m\ \_____)____(_____/ /[0;37m [1;34m ) )[0;37m | ||
| 4 | [A[79C | ||
| 5 | [1;34m\ )[0;37m [1;34m`─────' [0;37m [1;34m `─────'[0;37m [1;34m( /[0;37m | ||
| 6 | [A[79C | ||
| 7 | [1;34m)/ [0;37m [1;34m \([0;37m | ||
| 8 | [A[79C | ||
| 9 | [1;34m /'[0;37m [1;34m`\ [0;37m | ||
| 10 | [A[79C | ||
| 11 | [1;34mO [32m _ _ _ ____ ___ _ _ [0;37m [1;34m O[0;37m | ||
| 12 | [A[79C | ||
| 13 | [1;34m│[0;37m [1;32m / \ | \ | / ___|_ _| / \ _ __| |_ [0;37m [1;34m│[0;37m | ||
| 14 | [A[79C | ||
| 15 | [1;34m│[0;37m [1;32m / _ \ | \| \___ \| | / _ \ | '__| __|[0;37m [1;34m│[0;37m | ||
| 16 | [A[79C | ||
| 17 | [1;34m│[0;37m [1;32m / ___ \| |\ |___) | | / ___ \| | | |_ [0;37m [1;34m│[0;37m | ||
| 18 | [A[79C | ||
| 19 | [1;34m│[0;37m [1;32m/_/ \_\_| \_|____/___| /_/ \_\_| \__|[0;37m [1;34m│[0;37m | ||
| 20 | [A[79C | ||
| 21 | [1;34m│[0;37m [1;34m│[0;37m | ||
| 22 | [A[79C | ||
| 23 | [1;34mO [0;37m [1mMay be directly included[0m [1;34m O[0;37m | ||
| 24 | [A[79C | ||
| 25 | [1;34m \.[0;37m [1;34m./ [0;37m | ||
| 26 | [A[79C | ||
| 27 | [1;34m)\ [0;37m [1;34m,____[0;37m [1;34m____,[0;37m [1;34m /([0;37m | ||
| 28 | [A[79C | ||
| 29 | [1;34m/ )[0;37m [1;34m/ ____\ ____ /____ \[0;37m [1;34m( \[0;37m | ||
| 30 | [A[79C | ||
| 31 | [1;34m( (_________/_/ ) ( \_\_________) )[0;37m | ||
| 32 | [A[79C | ||
| 33 | [1;34m ~-' [0;37m [1;34m`──'[0;37m [1;34m`──'[0;37m [1;34m `-~ [0;37m | ||
| 34 | [A[79C | ||
| 35 | |||
| 36 | [A[79C | ||
| 37 | |||
| 38 | [A[79C | ||
| 39 | |||
| 40 | [A[79C | ||
| 41 | |||
| 42 | [A[79C | ||
| 43 | |||
| 44 | [A[79C | ||
| 45 | [0m \ 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 | |||
| 24 | Presentty | ||
| 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 | |||
| 32 | Presentty is a console presentation system based where slides are | ||
| 33 | authored in reStructuredText. | ||
| 34 | |||
| 35 | Bullet Lists | ||
| 36 | ============ | ||
| 37 | It is able to display lists of items: | ||
| 38 | |||
| 39 | * Pork | ||
| 40 | |||
| 41 | * Eastern North Carolina | ||
| 42 | * Lexington | ||
| 43 | |||
| 44 | * Ribs | ||
| 45 | * Brisket | ||
| 46 | |||
| 47 | |||
| 48 | Progressive Display | ||
| 49 | =================== | ||
| 50 | Bullet lists may include a *progressive* display: | ||
| 51 | |||
| 52 | .. container:: progressive | ||
| 53 | |||
| 54 | * Red Leicester | ||
| 55 | * Tilsit | ||
| 56 | * Caerphilly | ||
| 57 | |||
| 58 | |||
| 59 | Table | ||
| 60 | ===== | ||
| 61 | |||
| 62 | === === | ||
| 63 | p !p | ||
| 64 | === === | ||
| 65 | T F | ||
| 66 | F T | ||
| 67 | === === | ||
| 68 | |||
| 69 | Dissove Transition | ||
| 70 | ================== | ||
| 71 | Transitions may be "dissolve," where one slide cross-fades into the next... | ||
| 72 | |||
| 73 | Pan Transition | ||
| 74 | ============== | ||
| 75 | .. transition:: pan | ||
| 76 | |||
| 77 | ...or "pan," where the slides appear horizontally adjacent and move | ||
| 78 | right to left... | ||
| 79 | |||
| 80 | Cut Transition | ||
| 81 | ============== | ||
| 82 | .. transition:: cut | ||
| 83 | |||
| 84 | ...or "cut," where they abruptly change from one to the next. | ||
| 85 | |||
| 86 | Syntax Highligting | ||
| 87 | ================== | ||
| 88 | Pygments is used to provide syntax highlighting of code in almost any | ||
| 89 | language: | ||
| 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 | |||
| 104 | Cowsay | ||
| 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 | |||
| 112 | Figlet | ||
| 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 | |||
| 127 | ANSI 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 | |||
| 138 | Images | ||
| 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 | |||
