summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-05-28 18:40:17 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-05-28 18:40:17 (EDT)
commita5d1ce13172e8d91d24ede48f28cc269e3d1aa23 (patch)
tree49de0d7a8c60d649edde69df4b634635c8ca7a2a
Initial commit, just copying from the specs repo.HEADmaster
-rw-r--r--.gitignore7
-rw-r--r--.htaccess4
-rw-r--r--Makefile23
-rw-r--r--include/footer.html2
-rw-r--r--include/header.html10
5 files changed, 46 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f315458
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# Swap and backup files
+.*.sw*
+.sw*
+*~
+
+# Rendered files
+policies/*.html
diff --git a/.htaccess b/.htaccess
new file mode 100644
index 0000000..cc03570
--- /dev/null
+++ b/.htaccess
@@ -0,0 +1,4 @@
+Options +FollowSymLinks
+
+RewriteEngine on
+RewriteRule ^([^/]*)$ policies/$1 [L]
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0707f0b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+.SUFFIXES:
+.SUFFIXES: .txt .html
+
+SRCS =
+OBJS = $(SRCS:.txt=.html)
+
+.PHONY: all
+all: $(OBJS)
+
+$(OBJS):
+ @printf ' RENDER %s\n' '$@'
+ @title=$$(sed -n 's/^ Title: \(.*\)$$/\1/p' $*.txt | \
+ head -n 1); \
+ sed "s#@TITLE@#$$title#" include/header.html > $@
+ @markdown $*.txt >> $@
+ @cat include/footer.html >> $@
+
+.PHONY: clean
+clean:
+ @for obj in $(OBJS); do \
+ printf ' RM %s\n' "$${obj}"; \
+ rm -f $${obj}; \
+ done
diff --git a/include/footer.html b/include/footer.html
new file mode 100644
index 0000000..7fb2bd6
--- /dev/null
+++ b/include/footer.html
@@ -0,0 +1,2 @@
+ </body>
+</html>
diff --git a/include/header.html b/include/header.html
new file mode 100644
index 0000000..3324427
--- /dev/null
+++ b/include/header.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>@TITLE@</title>
+ <link type="text/css" rel="stylesheet" href="main.css" />
+ </head>
+ <body>