From ef9fb76de9ef299fbdc8f87f1dd05bdd1eda649e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Sat, 20 Dec 2014 07:35:13 -0800 Subject: Initial commit --- example/ansi.ans | 45 +++++++++++++++++ example/demo.rst | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ example/gg.jpg | Bin 0 -> 78551 bytes 3 files changed, 194 insertions(+) create mode 100644 example/ansi.ans create mode 100644 example/demo.rst create mode 100644 example/gg.jpg (limited to 'example') 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 @@ + ______________ .──. .──. ______________ + +( (  \ \_____)____(_____/ /  ) ) + + \ ) `─────'   `─────' ( / + + )/   \( + + /' `\  + +O  _ _ _ ____ ___ _ _   O + +│  / \ | \ | / ___|_ _| / \ _ __| |_  │ + +│  / _ \ | \| \___ \| | / _ \ | '__| __| │ + +│  / ___ \| |\ |___) | | / ___ \| | | |_  │ + +│ /_/ \_\_| \_|____/___| /_/ \_\_| \__| │ + +│ │ + +O  May be directly included  O + + \. ./  + + )\  ,____ ____,  /( + + / ) / ____\ ____ /____ \ ( \ + +( (_________/_/ ) ( \_\_________) ) + + ~-'  `──' `──'  `-~  + + + + + + + + + + + + \ 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 @@ +.. This is an RST comment. + The following directives, when used at the top of the file, set default + values for all slides: + + This sets the transition style. Values are: 'dissolve', 'pan', or + 'cut'. The optional argument of 'duration' sets the duration of + the transition in seconds (0.4 seconds by default). The same + syntax may be used within a slide to override the transition for + that slide alone. + + .. transition:: dissolve + :duration: 0.4 + + This disables display of the title. Each slide must still have a + title, and it will be used by the presenter console, but it will + not be displayed on the slide. The same syntax may be used within + a slide to hide the title of that individual slide. + + .. hidetitle:: + +.. Slides are defined one at a time by starting a new top-level + section: + +Presentty +========= +.. container:: handout + + Content that is placed in a container called "handout" will not be + displayed with the slides, but will be displayed on the presenter's + console. + +Presentty is a console presentation system based where slides are +authored in reStructuredText. + +Bullet Lists +============ +It is able to display lists of items: + +* Pork + + * Eastern North Carolina + * Lexington + +* Ribs +* Brisket + + +Progressive Display +=================== +Bullet lists may include a *progressive* display: + +.. container:: progressive + + * Red Leicester + * Tilsit + * Caerphilly + + +Table +===== + +=== === + p !p +=== === + T F + F T +=== === + +Dissove Transition +================== +Transitions may be "dissolve," where one slide cross-fades into the next... + +Pan Transition +============== +.. transition:: pan + +...or "pan," where the slides appear horizontally adjacent and move +right to left... + +Cut Transition +============== +.. transition:: cut + +...or "cut," where they abruptly change from one to the next. + +Syntax Highligting +================== +Pygments is used to provide syntax highlighting of code in almost any +language: + +.. code:: python + + class UrwidTranslator(nodes.GenericNodeVisitor): + def depart_Text(self, node): + if self.stack and isinstance(self.stack[-1], 'string'): + # a comment + if self.attr: + t = (self.attr[-1], node.astext()) + else: + t = node.astext() + self.stack[-1].append(t) + visit_literal_block = visit_textelement + +Cowsay +====== +.. cowsay:: Presentty is a console-based presentation program where + reStructuredText is used to author slides. + +| If cowsay is installed, it can easily +| be used to display text. + +Figlet +====== +.. container:: handout + + Cowsay and figlet are non-standard directives and will not appear + if the RST file is rendered with a program other than presentty. + If you want to ensure that the content appears in all forms, you + may wish to run the respective commands manually and copy the + output into a quoted block in the RST file. + +.. figlet:: FIGLET + +| If figlet is installed, it can be +| used to provide large text. + +ANSI Art +======== +.. hidetitle:: +.. container:: handout + + Note that the ansi directive is specific to presentty, and so if an + RST file that includes it is rendered with another program, + included ANSI files will not appear. + +.. ansi:: ansi.ans + +Images +====== +.. container:: handout + + The standard sphinx image directive can be used to include bitmap + images (such as JPEG or PNG files) which will be automatically + converted to ANSI art for display. This feauter requires that PIL + or Pillow (Python Image Library) and jp2a be installed. + +.. image:: gg.jpg + +"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 Binary files /dev/null and b/example/gg.jpg differ -- cgit v1.2.3