Permalink
Browse files

- initial commit

  • Loading branch information...
0 parents commit 93a4ec581ffcffa83476c284a9a63fab9d22d075 @jncraton committed Nov 4, 2010
Showing with 762 additions and 0 deletions.
  1. +3 −0 example.py
  2. +18 −0 makefile
  3. 0 presdown/__init__.py
  4. +16 −0 readme.txt
  5. +25 −0 src/PresDown.py
  6. +98 −0 src/slides.css
  7. +564 −0 src/slides.js
  8. +38 −0 src/template.html
@@ -0,0 +1,3 @@
+from presdown import PresDown
+
+PresDown.convert_to_html("readme.txt","readme.html")
@@ -0,0 +1,18 @@
+.PHONY: all all-before all-after clean
+all: all-before presdown/PresDown.py all-after
+
+clean:
+ rm presdown/*
+
+presdown/PresDown.py: src/PresDown.py src/slides.css src/slides.js
+ touch presdown/__init__.py
+ cat src/PresDown.py > presdown/PresDown.py
+ echo "css = r'''" >> presdown/PresDown.py
+ cat src/slides.css >> presdown/PresDown.py
+ echo "'''" >> presdown/PresDown.py
+ echo "js = r'''" >> presdown/PresDown.py
+ cat src/slides.js >> presdown/PresDown.py
+ echo "'''" >> presdown/PresDown.py
+ echo "template = Template(r'''" >> presdown/PresDown.py
+ cat src/template.html >> presdown/PresDown.py
+ echo "''')" >> presdown/PresDown.py
No changes.
@@ -0,0 +1,16 @@
+# Overview of Presdown
+- Presdown is a markup language that creates presentations
+- It is designed to be simple and is syntactically similar to markdown
+- Check out the included example.py script for it's usage
+- Execute example.py to convert this readme into a presentation
+
+# The Problem
+- Creating a presentation is time consuming
+- Often layout can be ignored while content is being developed
+- Content should be separate from the design
+
+# The Solution
+- Presdown provides markdown-like syntax for creating presentations
+- Creates presentation as HTML
+- Short presentations can be created extremely quickly
+- Design is completely separated from content
@@ -0,0 +1,25 @@
+from string import Template
+import markdown
+
+def convert_to_html(infile,outfile):
+ output = get_html(infile)
+ open(outfile, 'w').write(output)
+
+def parse_presentation_file(filename):
+ html = markdown.markdown(open(filename, 'r').read())
+
+ html = html.replace("<h1>","<li class=\"slide\"><h1 >",1)
+ html = html.replace("<h1>","</li><li class=\"slide\"><h1>")
+
+ html = html + "</li>"
+
+ return html
+
+def get_html(filename):
+ html = parse_presentation_file(filename)
+
+ output = template.substitute(presentation = html,
+ title = "",
+ js = js,
+ css = css)
+ return output
@@ -0,0 +1,98 @@
+/* s5-core.css */
+
+div#header, div#footer, div#controls, .slide {position: absolute;}
+html>body div#header, html>body div#footer,
+ html>body div#controls, html>body .slide {position: fixed;}
+.handout, .notes {display: none;}
+.layout {display: block;}
+.slide, .hideme, .incremental {visibility: hidden;}
+#slide0 {visibility: visible;}
+
+/* slides.css */
+
+div#header, div#footer, .slide {width: 100%; top: 0; left: 0;}
+div#header {top: 0; height: 3em; z-index: 1;}
+div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;}
+.slide {top: 0; width: 92%; padding: 3.5em 4% 4%; z-index: 2; list-style: none;}
+div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;}
+div#controls form {text-align: right; width: 100%; margin: 0;}
+#currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; z-index: 10;}
+html>body #currentSlide {position: fixed;}
+
+/* pretty.css */
+/* Following are the presentation styles -- edit away! */
+
+body {background: #FFF; color: #000; font-size: 2.25em;}
+:link, :visited {text-decoration: none; color: #00C;}
+#controls :active {color: #88A !important;}
+#controls :focus {outline: 1px dotted #227;}
+h1, h2, h3, h4 {font-size: 100%; margin: 0; padding: 0; font-weight: inherit;}
+ul, pre {margin: 0; line-height: 1em;}
+html, body {margin: 0; padding: 0;}
+
+blockquote, q {font-style: italic;}
+blockquote {padding: 0 2em 0.5em; margin: 0 1.5em 0.5em; text-align: center; font-size: 1em;}
+blockquote p {margin: 0;}
+blockquote i {font-style: normal;}
+blockquote b {display: block; margin-top: 0.5em; font-weight: normal; font-size: smaller; font-style: normal;}
+blockquote b i {font-style: italic;}
+
+kbd {font-weight: bold; font-size: 1em;}
+sup {font-size: smaller; line-height: 1px;}
+
+.slide code {padding: 2px 0.25em; font-weight: bold; color: #533;}
+.slide code.bad, code del {color: red;}
+.slide code.old {color: silver;}
+.slide pre {padding: 0; margin: 0.25em 0 0.5em 0.5em; color: #533; font-size: 90%;}
+.slide pre code {display: block;}
+.slide ul {margin-left: 5%; margin-right: 7%; list-style: disc;}
+.slide li {margin-top: 0.75em; margin-right: 0;}
+.slide ul ul {line-height: 1;}
+.slide ul ul li {margin: .2em; font-size: 85%; list-style: square;}
+.slide img.leader {display: block; margin: 0 auto;}
+
+div#header, div#footer {background: #005; color: #AAB;
+ font-family: Verdana, Helvetica, sans-serif;}
+div#header {background: #005;
+ line-height: 1px;}
+div#footer {font-size: 0.5em; font-weight: bold; padding: 1em 0;}
+#footer h1, #footer h2 {display: block; padding: 0 1em;}
+#footer h2 {font-style: italic;}
+
+div.long {font-size: 0.75em;}
+.slide h1 {position: absolute; top: 0.7em; left: 87px; z-index: 1;
+ margin: 0; padding: 0.3em 0 0 50px; white-space: nowrap;
+ font: bold 150%/1em Helvetica, sans-serif; text-transform: capitalize;
+ color: #DDE; background: #005;}
+.slide h3 {font-size: 130%;}
+h1 abbr {font-variant: small-caps;}
+
+div#controls {position: absolute; left: 60%; bottom: 0;
+ width: 40%;
+ text-align: right; font: bold 0.9em Verdana, Helvetica, sans-serif;}
+html>body div#controls {position: fixed; padding: 0; top: auto;}
+#controls #navLinks a {padding: 0; margin: 0 0.5em;
+ background: #005; border: none; color: #779;
+ cursor: pointer;}
+#controls #navList #jumplist {background: #DDD; color: #227;}
+
+#currentSlide {text-align: center; font-size: 0.5em; color: #449;}
+
+#slide0 {padding-top: 3.5em; font-size: 90%;}
+#slide0 h1 {position: static; margin: 1em 0 0; padding: 0;
+ font: bold 2em Helvetica, sans-serif; white-space: normal;
+ color: #000; background: transparent;}
+#slide0 h2 {font: bold italic 1em Helvetica, sans-serif; margin: 0.25em;}
+#slide0 h3 {margin-top: 1.5em; font-size: 1.5em;}
+#slide0 h4 {margin-top: 0; font-size: 1em;}
+
+ul.urls {list-style: none; display: inline; margin: 0;}
+.urls li {display: inline; margin: 0;}
+.note {display: none;}
+.external {border-bottom: 1px dotted gray;}
+html>body .external {border-bottom: none;}
+.external:after {font-size: smaller; color: #77B;}
+
+.incremental, .incremental *, .incremental *:after {color: #DDE; visibility: visible;}
+img.incremental {visibility: hidden;}
+.slide .current {color: #B02;}
Oops, something went wrong.

0 comments on commit 93a4ec5

Please sign in to comment.