changeset 3:c23adc60a4f5 default tip

add makefile
author akahori
date Tue, 26 Mar 2019 12:50:24 +0900
parents e86dfb640e86
children
files Makefile sample.md
diffstat 2 files changed, 78 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Tue Mar 26 12:50:24 2019 +0900
@@ -0,0 +1,35 @@
+# https://qiita.com/takara@github/items/a0a295d265ab5ff43ddc
+
+NAME:=slideshow_docker
+VERSION:=latest
+MD=README.md
+REMOVEFILE=${wildcard *.html} s6 scripts .DS_Store
+
+build:
+	docker build -t $(NAME):$(VERSION) . 
+
+run: 
+	docker run --rm -v $(shell pwd):/slideshow --name $(NAME) $(NAME):$(VERSION) $(MD)
+
+contener=`docker ps -a -q`
+image=`docker images | awk '/^<none>/ { print $$3 }'`
+
+build-run: build run
+
+clean:
+	@if [ "$(image)" != "" ] ; then \
+		docker rmi $(image); \
+	fi
+	@if [ "$(contener)" != "" ] ; then \
+		docker rm $(contener); \
+	fi
+	cleanf
+
+cleanf: # clean file
+	rm -rf $(REMOVEFILE)
+
+attach:
+	docker exec -it $(NAME) /bin/sh
+
+logs:
+	docker logs $(NAME)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sample.md	Tue Mar 26 12:50:24 2019 +0900
@@ -0,0 +1,43 @@
+# s6cr - Slide Show (S9) Template Pack
+
+## What's Slide Show (S9)?
+
+A Ruby gem that lets you create slide shows and author slides in plain text
+using a wiki-style markup language that's easy-to-write and easy-to-read.
+More [Slide Show (S9) Project Site](http://slideshow-s9.github.io)
+
+## Intro
+
+Note, the package is configured to use the following headers in `slides.html.erb`:
+
+    author: Your Name Here
+    title: Your Slide Show Title Here
+    profile: Your Profile Here
+    lang: Your Language Here
+
+## Try It Yourself - How To Use the Template Pack
+
+If you want to try it yourself, clone the template pack using `hg`. Issue the commands:
+
+    $ cd ~/.slideshow/templates
+    $ hg clone ssh://firefly.cr.ie.u-ryukyu.ac.jp/~one/hg/Members/atton/slideshow-s6cr
+
+To check if the new template got installed, use the `list` command:
+
+    $ slideshow list
+
+Listing something like:
+
+    Installed templates include:
+       s6cr.txt (~/.slideshow/templates/slideshow-cr/s6cr.txt)
+
+Now you're ready to use it using the `-t/--template` switch. Example:
+
+    $ slideshow build tutorial -t s6cr
+
+That's it.
+
+
+## PDF generation
+
+    $ wkhtmltopdf --outline --orientation Landscape slide.pdf.html slide.pdf