From 712d2c47f6ac3f74ab5ab2bd4db3ed6876461b4e Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 17 Aug 2015 06:57:12 -0700 Subject: Example using tree output and fix for the utf-8 characters that tree uses --- example/demo.rst | 16 ++++++++++++++++ presentty/presentty.py | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/example/demo.rst b/example/demo.rst index e202bc2..03900db 100644 --- a/example/demo.rst +++ b/example/demo.rst @@ -142,6 +142,22 @@ ANSI Art .. ansi:: ansi.ans + +Nice filesystem listings +======================== + +.. container:: handout + + You can cut and paste the output of tree to make nice filesystem listings. + +.. code:: + + files + ├── hello + └── world + +0 directories, 2 files + Images ====== .. container:: handout diff --git a/presentty/presentty.py b/presentty/presentty.py index b7589bf..d54d640 100644 --- a/presentty/presentty.py +++ b/presentty/presentty.py @@ -152,7 +152,7 @@ def main(): plt = palette.DARK_PALETTE hinter = slide.ScreenHinter() parser = rst.PresentationParser(plt, hinter) - program = parser.parse(open(args.file).read(), args.file) + program = parser.parse(unicode(open(args.file).read(), 'utf-8'), args.file) if args.warnings: w = parser.warnings.getvalue() if w: -- cgit v1.2.3