Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.

Commit 4e84e98

Browse files
committed
feat: Add cheatsheet and bump build system
1 parent e4f2b55 commit 4e84e98

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
all: build
22

3+
qr:
4+
docker run -v "$(PWD):/qr:z" -e QR_TEXT="$$(sed -n '4 p' docs/metadata.txt)" -e QR_FILE=docs/static/qr.png valien/docker-qr-generator
5+
36
.PHONY: docs
4-
docs:
7+
docs: qr
58
mkdir -p out/docs
69
if [ -d "docs/static" ]; then cp -r docs/static out/docs; fi
710
echo "<!DOCTYPE html><meta charset="utf-8"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><meta name=\"description\" content=\"$$(sed -n '2 p' docs/metadata.txt)\"><link rel=\"stylesheet\" href=\"https://unpkg.com/marx-css/css/marx.min.css\"><title>$$(sed -n '1 p' docs/metadata.txt)</title><main><h1>$$(sed -n '1 p' docs/metadata.txt)</h1><p>$$(sed -n '2 p' docs/metadata.txt)</p><hr><a href=\"$$(sed -n '4 p' docs/metadata.txt)\" target=\"_blank\">📃 View source (✍️ $$(sed -n '3 p' docs/metadata.txt))</a><br><a href=\"$$(sed -n '5 p' docs/metadata.txt)\" download=\"$$(sed -n '1 p' docs/metadata.txt).zip\">📥 Download all as ZIP</a><hr><div>You may do the following:</div><ul>" > "out/docs/index.html"
811
for document in docs/*.md; do\
912
echo "Compiling $${document} ..." ;\
10-
docker run -v "$(PWD):/data:z" pandoc/latex "$${document}" --resource-path=docs --pdf-engine=xelatex -o "out/$${document}.pdf" & docker run -v "$(PWD):/data:z" pandoc/latex "$${document}" --resource-path=docs --toc --self-contained -t html5 -o "out/$${document}.html" & docker run -v "$(PWD):/data:z" pandoc/latex "$${document}" --resource-path=docs --self-contained -t slidy --slide-level 3 -o "out/$${document}.slides.html" & docker run -v "$(PWD):/data:z" pandoc/latex "$${document}" --resource-path=docs -t beamer --slide-level 3 --pdf-engine=xelatex -o "out/$${document}.slides.pdf";\
11-
echo "<li><a href=\"$${document#docs/}.html\" target=\"_blank\">🌐 View $${document#docs/} in your browser</a> (also available as <a href=\"$${document#docs/}.slides.html\" target=\"_blank\">slides</a>) or <a href=\"$${document#docs/}.pdf\" target=\"_blank\">📥 download $${document#docs/} as PDF</a> (also available as <a href=\"$${document#docs/}.slides.pdf\" target=\"_blank\">slides</a>)" >> "out/docs/index.html";\
13+
docker run -v "$(PWD):/data:z" pandoc/latex "$${document}" --variable urlcolor=blue --shift-heading-level-by=-1 --number-sections --resource-path=docs --pdf-engine=xelatex -o "out/$${document}.pdf" & docker run -v "$(PWD):/data:z" pandoc/latex "$${document}" --number-sections --resource-path=docs --toc --toc-depth=6 --katex --self-contained -t html5 -o "out/$${document}.html" & docker run -v "$(PWD):/data:z" pandoc/latex "$${document}" --number-sections --resource-path=docs --katex --self-contained -t slidy --slide-level 3 -o "out/$${document}.slides.html" & docker run -v "$(PWD):/data:z" pandoc/latex "$${document}" --variable urlcolor=blue --shift-heading-level-by=-1 --number-sections --resource-path=docs -t beamer --slide-level 3 --pdf-engine=xelatex -o "out/$${document}.slides.pdf";\
14+
echo "<li><a href=\"$${document#docs/}.html\" target=\"_blank\">🌐 View $${document#docs/} in your browser</a> (also available as <a href=\"$${document#docs/}.slides.html\" target=\"_blank\">slides</a>) or <a href=\"$${document#docs/}.pdf\" target=\"_blank\">📜 open $${document#docs/} as PDF</a> (also available as <a href=\"$${document#docs/}.slides.pdf\" target=\"_blank\">slides</a>)" >> "out/docs/index.html";\
1215
done
1316
echo "</ul><div><strong><em>$$(sed -n '6 p' docs/metadata.txt)</em></strong></div></main>" >> "out/docs/index.html"
1417
mkdir -p "out/release"

docs/main.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,31 @@
55

66
# Uni Algodat Notes
77

8+
## Introduction
9+
10+
### Contributing
11+
12+
These study materials are heavily based on [professor Toenniessen's "Algorithmen und Datenstrukturen" lecture at HdM Stuttgart](https://www.hdm-stuttgart.de/vorlesung_detail?vorlid=5212224).
13+
14+
**Found an error or have a suggestion?** Please open an issue on GitHub ([github.com/pojntfx/uni-algodat-notes](https://github.com/pojntfx/uni-algodat-notes)):
15+
16+
![QR code to source repository](./static/qr.png){ width=150px }
17+
18+
If you like the study materials, a GitHub star is always appreciated :)
19+
20+
### License
21+
22+
![AGPL-3.0 license badge](https://www.gnu.org/graphics/agplv3-155x51.png){ width=128px }
23+
24+
Uni Algodat Notes (c) 2021 Felicitas Pojtinger and contributors
25+
26+
SPDX-License-Identifier: AGPL-3.0
27+
\newpage
28+
29+
## Cheatsheet
30+
31+
I created a hand-written cheatsheet which contains the most important points; you can print it (use a printer with at least 2400 DPI) for use in the exam: [Cheatsheet](./static/cheatsheet.pdf)
32+
833
## Themen
934

1035
- Einleitung

docs/static/cheatsheet.pdf

7.97 MB
Binary file not shown.

docs/static/qr.png

821 Bytes
Loading

0 commit comments

Comments
 (0)