-
Notifications
You must be signed in to change notification settings - Fork 31
/
gennotes.sh
executable file
·30 lines (24 loc) · 926 Bytes
/
gennotes.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# generated the global notes.markdown as well as
# notes.pdf, for the latter to work, pandoc must
# be installed
# empty out the global notes.markdown
echo -n > notes.markdown
# add header
echo "% Programming in Lua Notes
% Patrick M. Elsen
Programming in Lua Notes
========================
Programming in Lua gives a solid base for any programmer who wants to use
Lua. It covers all aspects of Lua—from the basics to its API with C—explaining
how to make good use of its features and giving numerous code examples.
The book is targeted at people with some programming background, but it
does not assume any prior knowledge about Lua or other scripting languages.
" >> notes.markdown
# compile it
for note in ./*/notes.markdown; do
cat $note >> notes.markdown;
echo >> notes.markdown; # add newline to the end of it
done
# make pdf
pandoc --toc -V papersize:"a4paper" -o notes.pdf notes.markdown