-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add makefile to generate html / pdf from slides markdown files
- Loading branch information
Manuel Schmidt
committed
Jul 14, 2019
1 parent
83ce4a3
commit d901790
Showing
6 changed files
with
199 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package-lock.json | ||
node_modules/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright 2019 Manuel Schmidt | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# Published at https://github.com/mschmnet/awk-slides/ | ||
|
||
MARP=./node_modules/.bin/marp | ||
|
||
FILES:=$(patsubst %.md, %, $(wildcard *.md)) | ||
FILES:=$(filter-out README, $(FILES)) | ||
|
||
all: pdf html | ||
|
||
pdf: $(patsubst %,pdf/%.pdf,$(FILES)) | ||
|
||
html: $(patsubst %,html/%.htm,$(FILES)) | ||
|
||
pdf/%.pdf: %.md | ||
$(MAKE) $(MARP) | ||
@echo "Generating pdf slides..." | ||
$(MARP) $< --output $@ | ||
|
||
html/%.htm: %.md | ||
$(MAKE) $(MARP) | ||
@echo "Generating html slides..." | ||
$(MARP) $< --output $@ | ||
|
||
$(MARP): | ||
npm install --save-dev @marp-team/marp-cli | ||
|
||
clean: | ||
rm pdf/*.pdf | ||
rm html/*.htm | ||
|
||
help: list | ||
|
||
list: | ||
@echo "make [all]: Generates html and pdf slides" | ||
@echo "make html: Generates html slides" | ||
@echo "make pdf: Generates pdf slides" | ||
@echo "make clean: Remove all generated files" | ||
|
||
|
||
.PHONY: pdf html help list clean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,28 @@ | ||
# awk-slides | ||
Slides for a short awk introduction | ||
# How to generate pdf and html files | ||
|
||
## Requirements | ||
|
||
* `npm` | ||
* `make` (if you don't have `make` just have a look at the Makefile to find out how you can generate the slides) | ||
|
||
## PDF / HTML generation | ||
|
||
### Generate both html and pdf | ||
|
||
make [all] | ||
|
||
### Generate pdf | ||
|
||
make pdf | ||
|
||
### Generate html | ||
|
||
make html | ||
|
||
### List targets | ||
|
||
make help | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
# Short AWK introduction | ||
--- | ||
theme: uncover | ||
|
||
--- | ||
|
||
# A short AWK introduction | ||
|
||
|
||
https://github.com/mschmnet/awk-slides | ||
© 2019 Manuel Schmidt | ||
|
||
--- | ||
|
||
Another test | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.