about summary refs log tree commit diff stats
path: root/wip
diff options
context:
space:
mode:
authorCase Duckworth2015-04-01 23:16:18 -0700
committerCase Duckworth2015-04-01 23:20:18 -0700
commitd161be120c22faf222ec15ca618ee367e4d56575 (patch)
treeb945633e680e5682a967f63bad88a2b262b4d4c6 /wip
parentMerge branch 'gh-pages' of https://github.com/duckwork/autocento into gh-pages (diff)
downloadautocento-d161be120c22faf222ec15ca618ee367e4d56575.tar.gz
autocento-d161be120c22faf222ec15ca618ee367e4d56575.zip
Refactor makefile; Add hapax preprocessor
Diffstat (limited to 'wip')
-rw-r--r--wip/00
-rw-r--r--wip/backlink.sh22
-rw-r--r--wip/makefile48
3 files changed, 0 insertions, 70 deletions
diff --git a/wip/0 b/wip/0 deleted file mode 100644 index e69de29..0000000 --- a/wip/0 +++ /dev/null
diff --git a/wip/backlink.sh b/wip/backlink.sh deleted file mode 100644 index dfbfe4b..0000000 --- a/wip/backlink.sh +++ /dev/null
@@ -1,22 +0,0 @@
1#!/bin/bash
2
3# Variables
4OPTIND=1
5header=""
6blacklist=""
7
8while getopts "h:b:" opt; do
9 case "$opt" in
10 h)
11 header=$OPTARG
12 ;;
13 b)
14 blacklist=$OPTARG
15 ;;
16 esac
17done
18
19shift $((OPTIND - 1))
20
21echo "header = $header"
22echo "blacklist = $blacklist"
diff --git a/wip/makefile b/wip/makefile deleted file mode 100644 index 88ff6c9..0000000 --- a/wip/makefile +++ /dev/null
@@ -1,48 +0,0 @@
1# MAKEFILE for Autocento of the breakfast table
2# by Case Duckworth | case.duckworth@gmail.com | autocento.me
3# inspired by Lincoln Mullen | lincolnmullen.com
4# vim: fdm=marker
5
6# Define variables {{{
7srcs := $(wildcard *.txt)
8trunk:= trunk
9versifyer = $(trunk)/versify.exe
10versifySrc= $(trunk)/versify.hs
11
12htmlBlackList = index.html template.html index-txt.html
13htmls = $(filter-out $(htmlBlackList),$(patsubst %.txt,%.html,$(srcs)))
14htmlTemplate = template.html
15htmlPandocOptions = --template=$(htmlTemplate)
16htmlPandocOptions+= --filter=$(versifyer)
17htmlPandocOptions+= --smart --mathml --section-divs
18
19backBlackList = "hapax.txt|first-lines.txt|common-titles.txt"
20backSrcs = $(patsubst %.html,%.back,$(htmls))
21backs = $(patsubst %.back, %_backlinks.htm,$(backSrcs))
22backHead = $(trunk)/backlink.head
23
24hapaxBlackList = first-lines.txt common-titles.txt hapax.txt
25hapaxs = $(patsubst %.txt,%.hapax,$(srcs))
26hapaxer = $(trunk)/hapax.lua
27hapaxHead = $(trunk)/hapax.head
28hapaxTemp = hapax.tmp
29hapaxOut = hapax.txt
30
31lozengeOut = $(trunk)/lozenge.js
32# }}}
33
34.PHONY: all
35all: $(versifyer) htmls backlinks
36.PHONY: htmls
37htmls: $(htmls)
38.PHONY: backlinks
39backlinks: $(backs)
40
41$(versifyer): $(versifySrc)
42 ghc --make $(versifySrc)
43
44%.html: %.txt template.html $(versifyer)
45 pandoc $< -f markdown -t html5 $(htmlPandocOptions) -o $@
46
47%_backlinks.htm: %.back
48 pandoc $< -f markdown -t html5 $(htmlPandocOptions) -o $@