thorstenb / odpdown

Generate OpenDocument Presentation (odp) files from markdown
Other
109 stars 18 forks source link

Allow master file which assembles others #4

Open aspiers opened 9 years ago

aspiers commented 9 years ago

Currently the various .md files and external sources need to be assembled via the command-line. This is cumbersome, and also means that this essential data is only tracked in someone's ~/.bash_history or ~/.zshhistory rather than in git. It would be much nicer to support a single input file which would contain something like this (syntax entirely made up and not necessarily recommended for the implementation):

# SUSE style
template: suse-template.odp

# page 3 of hand_crafted.odp is a section break slide which we want to re-use several times
define: section-break hand_crafted.odp 3

# Hand-crafted title slide
include: hand_crafted.odp 1

include: intro.md

include: <section-break>

include: concepts.md
# some fancy architecture diagram
include: hand_crafted.odp 2

include: <section-break>

include: lab-1.md

etc.

In fact, if you made the above format compatible with markdown, then it could be a normal .md file with pre-processing, and then all .md files could benefit from the same pre-processing. So you could do

include: hand_crafted.odp 2

from directly within concepts.md. This would be a significant improvement because then you wouldn't be forced to split up a single logical section into multiple .md files just in order to splice in a hand-crafted slide from somewhere else.

thorstenb commented 8 years ago

Pointers for pre-processor: https://github.com/lepture/mistune-contrib/blob/master/mistune_contrib/meta.py

Inspiration for markup: http://kramdown.gettalong.org/syntax.html#non-content-elements