Skip to content

Commit cc8ce87

Browse files
committed
Convert build to Makefile, add dependencies, remove products
1 parent 3342bd7 commit cc8ce87

File tree

9 files changed

+52
-916
lines changed

9 files changed

+52
-916
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
*.html
2+
.last_push
13
__pycache__
4+
libwyag.py
25
src
3-
*.html
6+
wyag

.gitmodules

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
[submodule "org-html-themes"]
2-
path = org-html-themes
1+
[submodule "lib/org-html-themes"]
2+
path = lib/org-html-themes
33
url = https://github.com/fniessen/org-html-themes
4+
[submodule "lib/htmlize"]
5+
path = lib/htmlize
6+
url = https://github.com/hniksic/emacs-htmlize

Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
all: article program
2+
article: write-yourself-a-git.html
3+
program: wyag libwyag.py
4+
push: .last_push
5+
6+
.PHONY: all article clean program push test
7+
8+
write-yourself-a-git.html: write-yourself-a-git.org wyag libwyag.py
9+
emacs --batch write-yourself-a-git.org \
10+
--eval "(add-to-list 'load-path (expand-file-name \"./lib/htmlize\"))" \
11+
--eval "(setq org-babel-inline-result-wrap \"%s\")" \
12+
--eval "(setq org-confirm-babel-evaluate nil)" \
13+
--eval "(setq python-indent-guess-indent-offset nil)" \
14+
--eval "(setq org-export-with-broken-links t)" \
15+
--eval "(setq org-html-htmlize-output-type 'css)" \
16+
-f org-html-export-to-html
17+
18+
wyag libwyag.py: write-yourself-a-git.org
19+
emacs --batch write-yourself-a-git.org -f org-babel-tangle
20+
21+
clean:
22+
rm -f wyag libwyag.py write-yourself-a-git.html .last_push
23+
24+
test: wyag libwyag.py
25+
./wyag-tests.sh
26+
27+
.last_push: write-yourself-a-git.html
28+
scp -r write-yourself-a-git.html k9.thb.lt\:/var/www/wyag.thb.lt/index.html; \
29+
scp -r lib/org-html-themes/src k9.thb.lt:/var/www/wyag.thb.lt/; \
30+
touch .last_push

README.org

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
#+TITLE: Write yourself a Git!
22

33
Source repository for the [[https://wyag.thb.lt][Write yourself a Git]] article.
4+
5+
Wyag is a [[https://en.wikipedia.org/wiki/Literate_programming][literate program]] written in [[https://orgmode.org/][org-mode]], which means the same source document can be used to produce the HTML version of the article as published on [[https://wyag.thb.lt]] and the program itself. You only need a reasonably recent Emacs and the =make= program, then:
6+
7+
#+begin_src shell
8+
$ git clone --recursive https://github.com/thblt/write-yourself-a-git
9+
$ cd write-yourself-a-git
10+
$ make all
11+
#+end_src

lib/htmlize

Submodule htmlize added at dd27bc3

0 commit comments

Comments
 (0)