From 265de447d7d7e9a6094fc8d1546bff1c55a2bde6 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Wed, 19 Feb 2014 09:35:22 -0500 Subject: [PATCH] initial commit --- .gitignore | 1 + Makefile | 14 ++++++++++++++ README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ slides/.empty | 0 template.html | 26 ++++++++++++++++++++++++++ 5 files changed, 83 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.md create mode 100644 slides/.empty create mode 100644 template.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..30d6596 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +build: clean + @mkdir ./build + @for file in ./slides/*; do cat $$file >> ./build/slides.md; echo '\r\n---\r\n' >> ./build/slides.md; done; + @sed -i -e :a -e '$$d;N;2,3ba' -e 'P;D' ./build/slides.md + @cp ./template.html ./build/index.html + @sed -i -e "/{{slides}}/r ./build/slides.md" -e "//d" ./build/index.html + +clean: + @rm -rf ./build + +run: + @cd ./build && python -m SimpleHTTPServer + +.PHONY: build diff --git a/README.md b/README.md new file mode 100644 index 0000000..ac16103 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +Slideshow Builder +================= + +Nothing crazy, just a Makefile which compiles a [remark.js](http://remarkjs.com/) +presentation from a template html file and a directory of markdown slides. + +## Usage + +### Clone from github +```bash +git clone git://github.com/brettlangdon/slideshow-builder +cd ./slideshow-builder +``` + +### Write your slides +Create a new file for each individual slide in the `slides` +directory. Make sure they are in the order you wish them to +be in the slideshow. E.g. `1_title.md`, `2_about_me.md`, etc. + +Please refer to Remark's [documentation](https://github.com/gnab/remark/wiki) +for information on formatting slides. + + +### Edit Template, Optional +Edit the `template.html` file to suit your needs. + +The slides contents will be replaced with `{{slides}}` in +the template file. + +### Build Slideshow +Just run `make` from the root directory + +Everything will get put into the `build` directory. + +### Viewing slideshow +Either copy `./build/index.html` to a web server or open in a browser, +or you can run `make run` to run `python -m SimpleHTTPServer` from +within the `./build` directory. + +## License + +Do whatever you want. This is just a Makefile diff --git a/slides/.empty b/slides/.empty new file mode 100644 index 0000000..e69de29 diff --git a/template.html b/template.html new file mode 100644 index 0000000..0152bd7 --- /dev/null +++ b/template.html @@ -0,0 +1,26 @@ + + + +My Slideshow + + + + + + + + +