Giter VIP home page Giter VIP logo

odpdown's Introduction

Generate ODP files from markdown

PyPI version Build Status

Attributions

Original Markdown Copyright (c) 2004-2005 John Gruber http://daringfireball.net/projects/markdown/

Myself got kicked into action by seeing https://github.com/puppetlabs/showoff and getting terribly envious by realizing how much of a productivity gain that would be.

Mission

Have a tool like pandoc, latex beamer etc, that you can write (or auto-generate) input for within your favourite hacker's editor, and generate nice-looking slides from. Using your corporation's mandatory, CI-compliant and lovely-artsy Impress template. Including syntax-highlighted code snippets of your latest hack, auto-fitted into the slides.

Installation

Getting ready should be a simple matter of running

python setup.py install

from a terminal.

On Windows, run it via the command prompt (Start โ€ฃ Accessories):

setup.py install

Alternatively, running odpdown directly from the git checkout is also possible, provided you've installed the prerequisites (most significantly mistune, lpod, pygments, lxml and pillow) manually.

Tests

Run tox to run the test suite.

pip install tox
tox -v

Usage

   usage: odpdown [-h] [--version] [-p PAGE] [-n] [-s HIGHLIGHT_STYLE]
                  [-c CODE_FONT_NAME] [--break-master [BREAK_MASTER]]
                  [--content-master [CONTENT_MASTER]]
                  input_md template_odp output_odp

   Convert markdown text into OpenDocument presentations

   positional arguments:
     input_md              Input markdown file
     template_odp          Input ODP template file
     output_odp            Output ODP file

   optional arguments:
     -h, --help            show this help message and exit
     --version             show program's version number and exit
     -p PAGE, --page PAGE  Append markdown after given page. Negative numbers
                           count from the end of the slide stack. [Defaults to
                           -1]
     -n, --no-autofit      Use to disable auto-shrinking font in text boxes, to
                           fit available space.
     -s HIGHLIGHT_STYLE, --highlight-style HIGHLIGHT_STYLE
                           Set pygments color style for syntax-highlighting of
                           code snippets. Available styles in stock pygments are:
                           "default", "emacs", "friendly", and "colorful".
                           [Defaults to colorful]
     -c CODE_FONT_NAME, --code-font-name CODE_FONT_NAME
                           Set font name used for code fragments. [Defaults to
                           "Nimbus Mono L"]
     --break-master [BREAK_MASTER]
                           Use this master page for the 1st level headlines. List
                           available ones if called with empty or unknown name
     --content-master [CONTENT_MASTER]
                           Use this master page for the 2nd level headlines and
                           content. List available ones if called with empty or
                           unknown name

Example

  • Stick your markdown slides into template, use break_slides from the template's master pages for 1st level headings, and content_slides as the master page for 2nd level headings and content:

    odpdown \
       --break-master=break_slides --content-master=content_slides \
       slides.md corp_template.odp out_slides.odp
    
  • Stick a bunch of markdown chapters into template, after slide 1:

    cat intro.md deploy.md tuning.md | \
    odpdown -p 1 - corp_template.odp out_slides.odp
    
  • Stick a bunch of of markdown chapters into existing preso, e.g. to keep a few hand-crafted slides inbetween:

    # intro comes after slide one
    odpdown -p 1 into.md hand_crafted.odp out_slides.odp
    
    # deploy comes after architecture slide, which is slide 2 in
    # hand_crafted.md and 2+10 after intro got added
    odpdown -p 12 deploy.md out_slides.odp out_slides2.odp
    

Have a lot of fun,

-- Thorsten

odpdown's People

Contributors

aspiers avatar bjoernmichaelsen avatar koppor avatar netmarkjp avatar oms4suse avatar th0ma5w avatar thorstenb avatar vandenoever avatar xrmx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.