about summary refs log tree commit diff stats
path: root/trunk
diff options
context:
space:
mode:
Diffstat (limited to 'trunk')
-rw-r--r--trunk/backlink.head10
-rw-r--r--trunk/backlink.sh38
-rw-r--r--trunk/common-titles.head12
-rw-r--r--trunk/common-titles.sh20
-rw-r--r--trunk/external.js5
-rw-r--r--trunk/first-lines.head12
-rw-r--r--trunk/first-lines.sh26
-rw-r--r--trunk/forceascii.hs17
-rw-r--r--trunk/hapax.head14
-rw-r--r--trunk/hapax.lua251
-rw-r--r--trunk/hapaxlink.sh26
-rw-r--r--trunk/hylo.js21
-rw-r--r--trunk/island.head9
-rw-r--r--trunk/islands.head17
-rw-r--r--trunk/lozenge.js27
-rw-r--r--trunk/lozenge.sh15
-rw-r--r--trunk/river.lua230
-rw-r--r--trunk/style.css640
-rw-r--r--trunk/toc.head7
-rw-r--r--trunk/toc.sh26
-rw-r--r--trunk/versify.exebin13686106 -> 0 bytes
-rw-r--r--trunk/versify.hs15
-rw-r--r--trunk/white-streak.jpgbin352757 -> 0 bytes
23 files changed, 685 insertions, 753 deletions
diff --git a/trunk/backlink.head b/trunk/backlink.head index 816ee7d..4537545 100644 --- a/trunk/backlink.head +++ b/trunk/backlink.head
@@ -1,11 +1,11 @@
1--- 1---
2title: _TITLE_ 2title: __TITLE__
3id: _ID_ 3subtitle: backlinks
4subtitle: back-links 4id: __ID__
5genre: list 5genre: list
6 6
7project: 7project:
8 title: About autocento 8 title: Backlinks to Autocento
9 class: meta 9 class: backlinks
10... 10...
11 11
diff --git a/trunk/backlink.sh b/trunk/backlink.sh deleted file mode 100644 index f6feb7d..0000000 --- a/trunk/backlink.sh +++ /dev/null
@@ -1,38 +0,0 @@
1#!/bin/bash
2
3# Command-line variables
4searchQuery="$1"; # .html file to backlink
5outFile="$2"; # .back file to create
6headerFile="$3"; # header information file
7shift 3;
8glob="$@"; # where to search for backlinks
9
10# Find backlinkers
11echo -n "Back-linking \"$searchQuery\""
12cat "$headerFile" > "$outFile";
13if ! grep -ql "$searchQuery" $glob >> "$outFile"; then
14 echo "[_island_](${islandLink}.htm)." >> "$outFile";
15 title=`grep '^title:' "${searchQuery%.html}.txt" | cut -d' ' -f2-`;
16 echo "- [$title]($searchQuery)" >> "${islandLink}.txt"
17fi
18
19# Change title & id of $outFile
20inText="`basename $searchQuery .html`.txt";
21title=`grep '^title:' "$inText" | cut -d' ' -f2-`;
22id=`grep '^id:' "${searchQuery%.html}.txt" | cut -d' ' -f2`;
23sed -i "s/_TITLE_/$title/" "$outFile";
24sed -i "s/_ID_/$id/" "$outFile";
25echo -n "."
26
27# Change *.txt to *.html
28sed -i 's/^\(.*\)\.txt/\1.html/g' "$outFile";
29
30# Link to backlinks
31for file in `grep '.html$' "$outFile"`; do
32 fText="`basename $file .html`.txt";
33 title=`grep '^title:' $fText | cut -d' ' -f2-`;
34 sed -i "s/^$file$/- [$title](&)/" "$outFile";
35 echo -n "."
36done
37
38echo "Done."
diff --git a/trunk/common-titles.head b/trunk/common-titles.head index 705647d..784ca4d 100644 --- a/trunk/common-titles.head +++ b/trunk/common-titles.head
@@ -1,17 +1,17 @@
1--- 1---
2title: Autocento of the breakfast table 2title: Appendix C
3id: common-titles
4subtitle: index of common titles 3subtitle: index of common titles
4id: common-titles
5genre: prose 5genre: prose
6 6
7project: 7project:
8 title: About Autocento 8 title: Appendices
9 class: meta 9 class: appendices
10 next: 10 next:
11 - title: Index of first lines 11 - title: Index of first lines
12 link: first-lines 12 link: first-lines
13 prev: 13 prev:
14 - title: About _Autocento_ 14 - title: Index of islands
15 link: about 15 link: islands
16... 16...
17 17
diff --git a/trunk/common-titles.sh b/trunk/common-titles.sh deleted file mode 100644 index bae8a10..0000000 --- a/trunk/common-titles.sh +++ /dev/null
@@ -1,20 +0,0 @@
1#!/bin/bash
2
3outFile="$1";
4shift 1;
5glob="$@";
6
7echo -n "Compiling ${outFile}";
8
9for file in $glob; do
10 # Copy title to $outFile & link
11 title="$(grep '^title:' "$file" | cut -d' ' -f2- | sed 's/"//g')";
12 if (( $RANDOM % 13 == 0 )); then
13 echo -n "| " >> "$outFile";
14 else
15 echo -n " " >> "$outFile";
16 fi
17 echo "[$title](${file%.*}.html)" >> "$outFile";
18 echo -n ".";
19done
20echo "Done.";
diff --git a/trunk/external.js b/trunk/external.js deleted file mode 100644 index ee425cd..0000000 --- a/trunk/external.js +++ /dev/null
@@ -1,5 +0,0 @@
1/* External.js for Autocento of the breakfast table
2 * this gives external links the class "external."
3 */
4
5
diff --git a/trunk/first-lines.head b/trunk/first-lines.head index f73b410..d2b9eca 100644 --- a/trunk/first-lines.head +++ b/trunk/first-lines.head
@@ -1,15 +1,15 @@
1--- 1---
2title: Autocento of the breakfast table 2title: Appendix F
3id: first-lines
4subtitle: index of first lines 3subtitle: index of first lines
4id: first-lines
5genre: prose 5genre: prose
6 6
7project: 7project:
8 title: About Autocento 8 title: Appendices
9 class: meta 9 class: appendices
10 next: 10 next:
11 - title: About _Autocento_ 11 - title: Index of hapax legomena
12 link: about 12 link: hapax
13 prev: 13 prev:
14 - title: Index of common titles 14 - title: Index of common titles
15 link: common-titles 15 link: common-titles
diff --git a/trunk/first-lines.sh b/trunk/first-lines.sh deleted file mode 100644 index 1378a82..0000000 --- a/trunk/first-lines.sh +++ /dev/null
@@ -1,26 +0,0 @@
1#!/bin/bash
2
3outFile="$1";
4shift 1;
5glob="$@";
6
7firstLineOf() { # $1 = file
8 endOfYaml=$(sed -n '/^\.\.\.$/=' "$1")
9 tryLineNumber=$((endOfYaml + 1))
10 try=""
11 while [[ -z $try ]]; do
12 try=$(head -n $tryLineNumber "$1" | tail -n 1 |\
13 sed -e 's/^[|>] //' -e 's/[][]//g' -e 's/^#.*//' -e 's/^--.*//')
14 (( tryLineNumber += 1 ))
15 done
16 echo "$try"
17}
18
19echo -n "Compiling ${outFile}"
20
21for file in $glob; do
22 # Copy first line to $outFile & link
23 echo "[$(firstLineOf "$file")](${file%.*}.html)" >> $outFile;
24 echo -n ".";
25done
26echo "Done."
diff --git a/trunk/forceascii.hs b/trunk/forceascii.hs deleted file mode 100644 index b5f1645..0000000 --- a/trunk/forceascii.hs +++ /dev/null
@@ -1,17 +0,0 @@
1-- Preprocessor for hapax.lua writer
2-- because for some damn reason, UTF-8 confuses things
3
4import Text.Pandoc.JSON
5import Data.Char (isAscii)
6
7main :: IO ()
8main = toJSONFilter unFancy
9
10unFancy :: Inline -> Inline
11unFancy (Str s) = Str $ map makeAscii s
12unFancy x = x
13
14makeAscii :: Char -> Char
15makeAscii c
16 | isAscii c = c
17 | otherwise = ' '
diff --git a/trunk/hapax.head b/trunk/hapax.head index 88b23bf..c07e79c 100644 --- a/trunk/hapax.head +++ b/trunk/hapax.head
@@ -1,11 +1,17 @@
1--- 1---
2title: Autocento of the breakfast table 2title: Appendix H
3subtitle: index of hapax legomena
3id: hapax 4id: hapax
4subtitle: hapax legomena
5genre: prose 5genre: prose
6 6
7project: 7project:
8 title: About autocento 8 title: Appendices
9 class: meta 9 class: appendices
10 next:
11 - title: Index of islands
12 link: islands
13 prev:
14 - title: Index of first lines
15 link: first-lines
10... 16...
11 17
diff --git a/trunk/hapax.lua b/trunk/hapax.lua deleted file mode 100644 index af59e59..0000000 --- a/trunk/hapax.lua +++ /dev/null
@@ -1,251 +0,0 @@
1-- Pandoc Hapax writer
2-- it takes out all formatting, leaving only a river of text
3-- running down the page: one word per line, stripping all duplicates
4-- vim: fdm=marker
5-- invoke with: pandoc -t hapax.lua
6
7os.setlocale("en_US.UTF-8")
8
9function hapax(s)
10 local function tablify (s, p)
11 local t={}
12 for w in s:gmatch(p) do
13 table.insert(t, w)
14 end
15 return t
16 end
17 local function stripDupes (t)
18 local seen = {}
19 local remove = {}
20 for i = 1, #t do
21 element = t[i]
22 if seen[element] then
23 remove[element] = true
24 else
25 seen[element] = true
26 end
27 end
28 for i = #t, 1, -1 do
29 if remove[t[i]] then
30 table.remove(t, i)
31 end
32 end
33 return t
34 end
35 return table.concat(stripDupes(tablify(s, "%S+")), "\n")
36end
37
38function flow(s)
39 return s:gsub("%s+", "\n")
40end
41
42function nude(s)
43 s = s:lower()
44 -- Expand contractions
45 s = s:gsub("'ll", " will ")
46 s = s:gsub("'ve", " have ")
47 s = s:gsub("'re", " are ")
48 s = s:gsub("i'm", " i am ")
49 s = s:gsub("it's", "it is")
50 s = s:gsub("n't", " not ")
51 s = s:gsub("&", " and ")
52 -- -- Remove dashes (not hyphens)
53 s = s:gsub('%-[%-%s]+', ' ')
54 -- Remove everything that is not letters or numbers
55 s = s:gsub('[^A-Za-z0-9/\'-]', ' ')
56 -- Remove extra spaces
57 s = s:gsub('%s+', ' ')
58 return " "..s.." "
59end
60
61-- This function is called once for the whole document. Parameters:
62-- body is a string, metadata is a table, variables is a table.
63-- One could use some kind of templating
64-- system here; this just gives you a simple standalone HTML file.
65function Doc(body, metadata, variables)
66 local buffer = ""
67 local function add(s)
68 buffer = buffer .. nude(s) .. "\n"
69 end
70 if metadata['title'] then
71 add(metadata['title'])
72 end
73 if metadata['subtitle'] then
74 add(metadata['subtitle'])
75 end
76 add(body)
77 return hapax(flow(buffer))
78 -- return flow(buffer)
79end
80
81-- Remove all formatting {{{
82function Note(s)
83 return s
84end
85
86function Blocksep()
87 return "\n"
88end
89function Emph(s)
90 return s
91end
92
93function Strong(s)
94 return s
95end
96
97function Subscript(s)
98 return s
99end
100
101function Superscript(s)
102 return s
103end
104
105function SmallCaps(s)
106 return s
107end
108
109function Strikeout(s)
110 return s
111end
112
113function Code(s, attr)
114 return s
115end
116
117function CodeBlock(s, attr)
118 return s
119end
120
121function InlineMath(s)
122 return s
123end
124
125function DisplayMath(s)
126 return s
127end
128
129function Span(s, attr)
130 return s
131end
132
133function Cite(s)
134 return s
135end
136
137function Plain(s)
138 return s
139end
140
141-- Links only include the link text
142function Link(s, src, tit)
143 return s
144end
145
146-- Images have nothing to give us
147-- (but add a space just in case)
148function Image(s, src, tit)
149 return "\n"
150end
151
152function RawBlock(s)
153 return s
154end
155
156function RawInline(s)
157 return s
158end
159
160function CaptionedImage(s, src, tit)
161 return "\n"
162end
163
164function Str(s)
165 return s
166end
167
168function Div(s, attr)
169 return s
170end
171
172function Space(s)
173 return "\n"
174end
175
176function LineBreak()
177 return "\n"
178end
179
180function Para(s)
181 return s
182end
183
184function Header(lev, s, attr)
185 return s
186end
187
188function BlockQuote(s)
189 return s
190end
191
192function HorizontalRule()
193 return "\n"
194end
195
196function BulletList(items)
197 local buffer = ""
198 for _, item in pairs(items) do
199 buffer = buffer .. " " .. item .. "\n"
200 end
201 return buffer .. "\n"
202end
203
204function OrderedList(items)
205 local buffer = ""
206 for _, item in pairs(items) do
207 buffer = buffer .. " " .. item .. "\n"
208 end
209 return buffer .. "\n"
210end
211
212function DefinitionList(items)
213 local buffer = ""
214 for _, item in pairs(items) do
215 for k, v in pairs(item) do
216 buffer = buffer .. " " .. k .. "\n" .. v .. "\n"
217 end
218 end
219 return buffer .. "\n"
220end
221
222function Table(caption, aligns, widths, headers, rows)
223 local buffer = ""
224 local function add(s)
225 buffer = buffer .. " " .. s .. "\n"
226 end
227 if caption ~= "" then
228 add(caption)
229 end
230 for _,h in pairs(headers) do
231 add(h)
232 end
233 for _, row in pairs(rows) do
234 for _, cell in pairs(row) do
235 add(cell)
236 end
237 end
238 return buffer
239end
240-- }}}
241
242-- The following code will produce runtime warnings when you haven't defined
243-- all of the functions you need for the custom writer, so it's useful
244-- to include when you're working on a writer.
245local meta = {}
246meta.__index =
247 function(_, key)
248 io.stderr:write(string.format("WARNING: Undefined function '%s'\n",key))
249 return function() return "" end
250 end
251setmetatable(_G, meta)
diff --git a/trunk/hapaxlink.sh b/trunk/hapaxlink.sh deleted file mode 100644 index 286c43d..0000000 --- a/trunk/hapaxlink.sh +++ /dev/null
@@ -1,26 +0,0 @@
1#!/bin/bash
2
3file="$1";
4headFile="$2";
5shift 2;
6glob="$@"; # *.hapax
7
8tempFile="${RANDOM}.tmp"
9
10echo -n "Linking \"$file\""
11# Begin
12cat "$headFile" > "$tempFile";
13echo -n "."
14# Link words to files they appear in
15for word in `sort "$file"`; do
16 f=`grep -liwq "^$word$" $glob`;
17 link="`basename $f .hapax`.html"
18 echo "[$word]($link)" >> "$tempFile";
19 echo -n "."
20done
21
22# Make the changes happen
23rm "$file"
24mv "$tempFile" "$file"
25
26echo "Done."
diff --git a/trunk/hylo.js b/trunk/hylo.js deleted file mode 100644 index 5a39427..0000000 --- a/trunk/hylo.js +++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * Hyphenator_Loader 1.1.0 - client side hyphenation for webbrowsers
3 * Copyright (C) 2014 Mathias Nater, Zürich (mathias at mnn dot ch)
4 * Project and Source hosted on http://code.google.com/p/hyphenator/
5 *
6 * This JavaScript code is free software: you can redistribute
7 * it and/or modify it under the terms of the GNU Lesser
8 * General Public License (GNU LGPL) as published by the Free Software
9 * Foundation, either version 3 of the License, or (at your option)
10 * any later version. The code is distributed WITHOUT ANY WARRANTY;
11 * without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU GPL for more details.
13 *
14 * As additional permission under GNU GPL version 3 section 7, you
15 * may distribute non-source (e.g., minimized or compacted) forms of
16 * that code without the copy of the GNU GPL normally required by
17 * section 4, provided you include this license notice and a URL
18 * through which recipients can access the Corresponding Source.
19 */
20
21var Hyphenator_Loader=(function(window){'use strict';var languages,config,path,createElem=function(tagname){var r;if(window.document.createElementNS){r=window.document.createElementNS('http://www.w3.org/1999/xhtml',tagname);}else if(window.document.createElement){r=window.document.createElement(tagname);}return r;},checkLangSupport=function(lang,longword){var shadow,computedHeight,bdy=window.document.getElementsByTagName('body')[0];shadow=createElem('div');shadow.style.width='5em';shadow.style.MozHyphens='auto';shadow.style['-webkit-hyphens']='auto';shadow.style['-ms-hyphens']='auto';shadow.style.hyphens='auto';shadow.style.fontSize='12px';shadow.style.lineHeight='12px';shadow.style.visibility='hidden';shadow.lang=lang;shadow.style['-webkit-locale']="'"+lang+"'";shadow.innerHTML=longword;bdy.appendChild(shadow);computedHeight=shadow.offsetHeight;bdy.removeChild(shadow);return(computedHeight>12)?true:false;},loadNrunHyphenator=function(config){var head,script,interval;head=window.document.getElementsByTagName('head').item(0);script=createElem('script');script.src=path;script.type='text/javascript';head.appendChild(script);interval=window.setInterval(function(){if(window.Hyphenator!==undefined){window.clearInterval(interval);Hyphenator.config(config);Hyphenator.run();}},10);},runner=function(){var loadHyphenator=false,r,results={},lang;for(lang in languages){if(languages.hasOwnProperty(lang)){r=checkLangSupport(lang,languages[lang]);results[lang]=r;loadHyphenator=loadHyphenator||!r;}}if(loadHyphenator){loadNrunHyphenator(config);}},runOnContentLoaded=function(window,f){var toplevel,hyphRunForThis={},doFrames=false,contextWindow,documentLoaded,add=window.document.addEventListener?'addEventListener':'attachEvent',rem=window.document.addEventListener?'removeEventListener':'detachEvent',pre=window.document.addEventListener?'':'on',init=function(context){contextWindow=context||window;if(!hyphRunForThis[contextWindow.location.href]&&(!documentLoaded||!!contextWindow.frameElement)){documentLoaded=true;f();hyphRunForThis[contextWindow.location.href]=true;}},doScrollCheck=function(){try{window.document.documentElement.doScroll("left");}catch(error){window.setTimeout(doScrollCheck,1);return;}init(window);},doOnLoad=function(){var i,haveAccess,fl=window.frames.length;if(doFrames&&fl>0){for(i=0;i<fl;i+=1){haveAccess=undefined;try{haveAccess=window.frames[i].document.toString();}catch(e){haveAccess=undefined;}if(!!haveAccess){if(window.frames[i].location.href!=='about:blank'){init(window.frames[i]);}}}contextWindow=window;f();hyphRunForThis[window.location.href]=true;}else{init(window);}},DOMContentLoaded=function(e){if(e.type==='readystatechange'&&window.document.readyState!=='complete'){return;}window.document[rem](pre+e.type,DOMContentLoaded,false);if(!doFrames&&window.frames.length===0){init(window);}};if(window.document.readyState==="complete"||window.document.readyState==="interactive"){window.setTimeout(doOnLoad,1);}else{window.document[add](pre+"DOMContentLoaded",DOMContentLoaded,false);window.document[add](pre+'readystatechange',DOMContentLoaded,false);window[add](pre+'load',doOnLoad,false);toplevel=false;try{toplevel=!window.frameElement;}catch(ignore){}if(window.document.documentElement.doScroll&&toplevel){doScrollCheck();}}};return{init:function(langs,p,configs){languages=langs;path=p;config=configs||{};runOnContentLoaded(window,runner);}};}(window));Hyphenator_Loader.init({"en":"hyphenationalgorithm",},"./Hyphenator.js",{classname:'prose',defaultlanguage:'en',displaytogglebox:true,togglebox:function(){var bdy,myTextNode,text=(Hyphenator.doHyphenation?'-':'~'),myBox=contextWindow.document.getElementById('HyphenatorToggleBox');if(!!myBox){myBox.firstChild.data=text;}else{bdy=contextWindow.document.getElementsByTagName('body')[0];myBox=createElem('div',contextWindow);myBox.setAttribute('id','HyphenatorToggleBox');myBox.setAttribute('class',dontHyphenateClass);myTextNode=contextWindow.document.createTextNode(text);myBox.appendChild(myTextNode);myBox.onclick=Hyphenator.toggleHyphenation;myBox.style.position='absolute';myBox.style.top='0px';myBox.style.right='0px';myBox.style.margin='0';myBox.style.backgroundColor=rgba(0,0,0,255);myBox.style.color=rgba(255,255,255,100);myBox.style.font='6pt Arial';myBox.style.letterSpacing='0.2em';myBox.style.padding='3px';myBox.style.cursor='pointer';myBox.style.WebkitBorderBottomLeftRadius='4px';myBox.style.MozBorderRadiusBottomleft='4px';myBox.style.borderBottomLeftRadius='4px';bdy.appendChild(myBox);}},useCSS3hyphenation:true});
diff --git a/trunk/island.head b/trunk/island.head deleted file mode 100644 index 1a9b454..0000000 --- a/trunk/island.head +++ /dev/null
@@ -1,9 +0,0 @@
1---
2title: Islands
3genre: list
4
5project:
6 title: About autocento
7 class: meta
8...
9
diff --git a/trunk/islands.head b/trunk/islands.head new file mode 100644 index 0000000..ec04b14 --- /dev/null +++ b/trunk/islands.head
@@ -0,0 +1,17 @@
1---
2title: Appendix I
3subtitle: islands
4id: islands
5genre: list
6
7project:
8 title: Appendices
9 class: appendices
10 next:
11 - title: Index of common titles
12 link: common-titles
13 prev:
14 - title: Index of hapax legomena
15 link: hapax
16...
17
diff --git a/trunk/lozenge.js b/trunk/lozenge.js deleted file mode 100644 index 62fcfd0..0000000 --- a/trunk/lozenge.js +++ /dev/null
@@ -1,27 +0,0 @@
1/* Lozenge.js for Autocento of the breakfast table
2 * Cause a#lozenge to link to random file in array
3 * vim: fdm=marker
4 */
5
6function _lozenge() {
7 var lozenge = document.getElementById('lozenge');
8 // array with all files {{{
9 var files=["about-the-author.html","about.html","about_author.html","abstract.html","amber-alert.html","and.html","angeltoabraham.html","apollo11.html","arspoetica.html","art.html","axe.html","big-dipper.html","boar.html","boy_bus.html","building.html","call-me-aural-pleasure.html","cereal.html","cold-wind.html","collage-instrument.html","creation-myth.html","deadman.html","death-zone.html","deathstrumpet.html","dollywood.html","dream.html","early.html","elegyforanalternateself.html","epigraph.html","ex-machina.html","exasperated.html","father.html","feedingtheraven.html","finding-the-lion.html","fire.html","found-typewriter-poem.html","hands.html","hard-game.html","hardware.html","howithappened.html","howtoread.html","hymnal.html","i-am.html","i-think-its-you.html","i-want-to-say.html","i-wanted-to-tell-you-something.html","in-bed.html","initial-conditions.html","january.html","joke.html","lappel-du-vide.html","largest-asteroid.html","last-bastion.html","last-passenger.html","leaf.html","leg.html","likingthings.html","listen.html","love-as-god.html","lovesong.html","man.html","manifesto_poetics.html","moon-drowning.html","moongone.html","mountain.html","movingsideways.html","music-433.html","no-nothing.html","notes.html","nothing-is-ever-over.html","on-genre-dimension.html","one-hundred-lines.html","onformalpoetry.html","options.html","ouroboros_memory.html","paul.html","peaches.html","philosophy.html","phone.html","planks.html","plant.html","poetry-time.html","prelude.html","problems.html","process.html","proverbs.html","punch.html","purpose-dogs.html","question.html","real-writer.html","reports.html","riptide_memory.html","ronaldmcdonald.html","roughgloves.html","sapling.html","seasonal-affective-disorder.html","sense-of-it.html","serengeti.html","shed.html","shipwright.html","sixteenth-chapel.html","snow.html","something-simple.html","spittle.html","squirrel.html","stagnant.html","statements-frag.html","stayed-on-the-bus.html","stump.html","swansong-alt.html","swansong.html","swear.html","table_contents.html","tapestry.html","telemarketer.html","the-night-we-met.html","the-sea_the-beach.html","theoceanoverflowswithcamels.html","time-looks-up-to-the-sky.html","todaniel.html","toilet.html","toothpaste.html","treatise.html","underwear.html","walking-in-the-rain.html","wallpaper.html","weplayedthosegamestoo.html","what-we-are-made-of.html","when-im-sorry-i.html","window.html","words-irritable-reaching.html","words-meaning.html","worse-looking-over.html","writing.html","x-ray.html","yellow.html"]
10 // }}}
11
12 var index = Math.floor(Math.random() * files.length);
13
14 var url = window.location.pathname;
15 var current = url.substring(url.lastIndexOf('/')+1);
16
17 if (current != files[index]) {
18 lozenge.setAttribute("href", files[index]);
19 lozenge.setAttribute("title", "To random article");
20 } else {
21 _lozenge()
22 }
23}
24
25window.onload = function () {
26 _lozenge()
27};
diff --git a/trunk/lozenge.sh b/trunk/lozenge.sh deleted file mode 100644 index 9f0cd55..0000000 --- a/trunk/lozenge.sh +++ /dev/null
@@ -1,15 +0,0 @@
1#!/bin/bash
2
3outFile="$1";
4shift;
5fileList="$@";
6
7echo -n "Updating \"lozenge.js\"..."
8
9list=`echo ${fileList[@]} |\
10 sed -e 's/\(\S\+.html\) \?/"\1",/g'\
11 -e 's/^\(.*\),$/var files=[\1]/'`
12
13sed -i "s/var files=.*/$list/" "$outFile";
14
15echo "Done."
diff --git a/trunk/river.lua b/trunk/river.lua deleted file mode 100644 index 4abb6d8..0000000 --- a/trunk/river.lua +++ /dev/null
@@ -1,230 +0,0 @@
1-- Pandoc River writer
2-- it takes out all formatting, leaving only a river of text
3-- running down the page: one word per line
4-- vim: fdm=marker
5-- invoke with: pandoc -t river.lua
6
7os.setlocale("en_US.UTF-8")
8
9local function flow(s)
10 return s:gsub("%s+", "\n")
11end
12
13local function nude(s)
14 -- Expand contractions
15 s = s:gsub("'%a+%s", function (x)
16 if x == "'ll" then
17 return " will "
18 elseif x == "'ve" then
19 return " have "
20 elseif x == "'re" then
21 return " are "
22 else
23 return x
24 end
25 end)
26 s = s:gsub("it's", "it is")
27 s = s:gsub("n't", " not ")
28 -- Get rid of quotes around words
29 s = s:gsub('"', ' ')
30 s = s:gsub("%s+'", ' ')
31 s = s:gsub("'%s+", ' ')
32 -- Remove HTML entities
33 s = s:gsub('&.-;', ' ')
34 s = s:gsub('%b<>', ' ')
35 -- Remove end-of-line backslashes
36 s = s:gsub('%s+\\$', ' ')
37 -- Remove dashes (not hyphens)
38 s = s:gsub('%-%-+', ' ')
39 s = s:gsub('%-%s', ' ')
40 -- Remove everything that is not letters or numbers
41 s = s:gsub('[%.!%?:;,%[%]%(%)<>]', ' ')
42 -- Remove extra spaces
43 s = s:gsub('%s+', ' ')
44 return s:lower()
45end
46
47-- This function is called once for the whole document. Parameters:
48-- body is a string, metadata is a table, variables is a table.
49-- One could use some kind of templating
50-- system here; this just gives you a simple standalone HTML file.
51function Doc(body, metadata, variables)
52 local buffer = ""
53 local function add(s)
54 buffer = buffer .. nude(s) .. "\n"
55 end
56 if metadata['title'] then
57 add(metadata['title'])
58 end
59 if metadata['subtitle'] then
60 add(metadata['subtitle'])
61 end
62 -- TODO: epigraph.content, epigraph.attrib, dedication, other metadata?
63 add(body)
64 return flow(buffer)
65end
66
67-- Remove all formatting {{{
68function Note(s)
69 return nude(s)
70end
71
72function Blocksep()
73 return "\n"
74end
75function Emph(s)
76 return nude(s)
77end
78
79function Strong(s)
80 return nude(s)
81end
82
83function Subscript(s)
84 return nude(s)
85end
86
87function Superscript(s)
88 return nude(s)
89end
90
91function SmallCaps(s)
92 return nude(s)
93end
94
95function Strikeout(s)
96 return nude(s)
97end
98
99function Code(s, attr)
100 return nude(s)
101end
102
103function CodeBlock(s, attr)
104 return nude(s)
105end
106
107function InlineMath(s)
108 return nude(s)
109end
110
111function DisplayMath(s)
112 return nude(s)
113end
114
115function Span(s, attr)
116 return nude(s)
117end
118
119function Cite(s)
120 return nude(s)
121end
122
123function Plain(s)
124 return nude(s)
125end
126
127-- Links only include the link text
128function Link(s, src, tit)
129 return nude(s)
130end
131
132-- Images have nothing to give us
133-- (but add a space just in case)
134function Image(s, src, tit)
135 return "\n"
136end
137
138function CaptionedImage(s, src, tit)
139 return "\n"
140end
141
142function Str(s)
143 return nude(s)
144end
145
146function Div(s, attr)
147 return nude(s)
148end
149
150function Space(s)
151 return "\n"
152end
153
154function LineBreak()
155 return "\n"
156end
157
158function Para(s)
159 return nude(s)
160end
161
162function Header(lev, s, attr)
163 return nude(s)
164end
165
166function BlockQuote(s)
167 return nude(s)
168end
169
170function HorizontalRule()
171 return "\n"
172end
173
174function BulletList(items)
175 local buffer = ""
176 for _, item in pairs(items) do
177 buffer = buffer .. nude(item) .. "\n"
178 end
179 return buffer .. "\n"
180end
181
182function OrderedList(items)
183 local buffer = ""
184 for _, item in pairs(items) do
185 buffer = buffer .. nude(item) .. "\n"
186 end
187 return buffer .. "\n"
188end
189
190function DefinitionList(items)
191 local buffer = ""
192 for _, item in pairs(items) do
193 for k, v in pairs(item) do
194 buffer = buffer .. nude(k) .. "\n" .. nude(v) .. "\n"
195 end
196 end
197 return buffer .. "\n"
198end
199
200function Table(caption, aligns, widths, headers, rows)
201 local buffer = ""
202 local function add(s)
203 buffer = buffer .. nude(s) .. "\n"
204 end
205 if caption ~= "" then
206 add(caption)
207 end
208 for _,h in pairs(headers) do
209 add(h)
210 end
211 for _, row in pairs(rows) do
212 for _, cell in pairs(row) do
213 add(cell)
214 end
215 end
216 return buffer
217end
218-- }}}
219
220-- The following code will produce runtime warnings when you haven't defined
221-- all of the functions you need for the custom writer, so it's useful
222-- to include when you're working on a writer.
223local meta = {}
224meta.__index =
225 function(_, key)
226 io.stderr:write(string.format("WARNING: Undefined function '%s'\n",key))
227 return function() return "" end
228 end
229setmetatable(_G, meta)
230
diff --git a/trunk/style.css b/trunk/style.css new file mode 100644 index 0000000..5f6a289 --- /dev/null +++ b/trunk/style.css
@@ -0,0 +1,640 @@
1/* CSS for Autocento at the breakfast table
2 * Case Duckworth | autocento.me
3 * vim: fdm=marker
4 */
5/* COMMON CSS */
6/* @IMPORTS {{{ */
7/* Playfair Display: headings */
8@import url(http://fonts.googleapis.com/css?family=Playfair+Display:400,700,400italic,700italic&subset=latin,latin-ext);
9/* Linux Libertine: body text */
10@import url(trunk/libertine.css);
11/* Courier New: typewriter text */
12@import url(trunk/courier-prime.css);
13/* @imports }}} */
14/* MAIN LAYOUT ELEMENTS {{{ */
15/* HTML + BODY {{{ */
16html, body {
17 margin: 0;
18 padding: 0;
19 font-family: "Libertine", Georgia, serif;
20 font-size: 100%;
21}
22html {
23 height: 100%;
24}
25body {
26 position: absolute;
27 top: 0;
28 left: 0;
29 right: 0;
30 min-height: 100%;
31 padding-left: 1em;
32 padding-right: 1em;
33}
34/* html + body }}} */
35/* HEADER + .CONTAINER + .CONTENT {{{ */
36header {
37 max-width: 39em;
38 margin: auto;
39 text-align: center;
40 border-bottom: 1px solid black;
41 padding: 1em 0;
42 margin-bottom: 1em;
43 position: relative;
44}
45.container {
46 margin: 0 auto;
47 padding-bottom: 30px;
48 text-align: center;
49}
50.content {
51 line-height: 1.3em;
52}
53/* header + .container + .content }}} */
54/* NAV + .FOOTNOTES {{{ */
55nav {
56 height: 24px;
57 width: 100%;
58 position: absolute;
59 bottom: 0;
60 left: 0;
61 text-align: center;
62 overflow: hidden;
63}
64.footnotes {
65 font-size: 0.85em;
66 width: 100%;
67 position: absolute;
68 top: 100%;
69 left: 0;
70}
71/* nav + .footnotes }}} */
72/* main layout elements }}} */
73/* HEADER ELEMENTS {{{ */
74/* .TITLE + .SUBTITLE {{{ */
75.title {
76 text-align: left;
77 display: inline-block;
78 font-family: "Playfair Display", Georgia, serif;
79 font-size: 1.5em;
80 font-weight: 400;
81 letter-spacing: 0.1em;
82 text-transform: uppercase;
83 margin: 0;
84}
85.subtitle {
86 text-align: center;
87 display: block;
88 font-family: "Playfair Display", Georgia, serif;
89 font-size: 1.25em;
90 font-style: italic;
91 font-weight: 400;
92 margin-top: 0;
93 margin-bottom: 0;
94}
95/* .title + .subtitle }}} */
96/* .HEADER-EXTRA {{{ */
97/* DEDICATION {{{ */
98.dedication {
99 font-style: italic;
100 font-size: 0.92em;
101 margin-top: 1em;
102 text-align: left;
103}
104.dedication::before {
105 content: 'for ';
106 font-style: italic;
107}
108.dedication:only-child {
109 text-align: right;
110}
111/* dedication }}} */
112/* EPIGRAPH {{{ */
113.epigraph {
114 text-align: right;
115 font-size: 0.92em;
116 font-style: italic;
117 margin-top: 1em;
118}
119.epigraph p {
120 margin: 0;
121}
122.epigraph .attrib {
123 text-align: right;
124 margin-top: 0;
125 font-size: 0.92em;
126 font-style: normal;
127}
128.epigraph .attrib::before {
129 content: '– ';
130}
131/* epigraph }}} */
132.header-extra {
133 text-align: right;
134}
135.dedication,.epigraph {
136 vertical-align: bottom;
137 display: inline-block;
138 margin-left: 2%;
139 margin-right: 2%;
140 width: 45%;
141}
142/* header-extra }}} */
143/* #SRC {{{ */
144#src {
145 border: none;
146 position: absolute;
147 top: 0;
148 right: 10px;
149 color: gray;
150 font-size: 8pt;
151}
152/* #src }}} */
153/* header elements }}} */
154/* .EKPHRASTIC {{{ */
155.ekphrastic {
156 max-width: 41em;
157 /* margin-top: -1em; */
158 margin-bottom: 1em;
159 margin-left: auto;
160 margin-right: auto;
161 text-align: center;
162}
163.ekphrastic a:link { border: none; }
164/* .ekphrastic }}} */
165/* .CONTENT ELEMENTS {{{ */
166/* BLOCK ELEMENTS {{{ */
167.content :first-child {
168 margin-top: 0;
169}
170h2 {
171 font-family: "Playfair Display", Georgia, serif;
172 font-size: 1em;
173 font-weight: 600;
174}
175blockquote {
176 border-left: 1px solid gray;
177 padding-left: 2em;
178 margin-left: 2em;
179 font-style: italic;
180}
181img {
182 max-width: 100%;
183 margin: auto;
184}
185/* block elements }}} */
186/* LINKS {{{ */
187a:link {
188 padding-top: 1px;
189 color: inherit;
190 text-decoration: none;
191 border-bottom: 1px dotted black;
192}
193a:visited {
194 color: inherit;
195}
196a:hover {
197 /* text-decoration: underline; */
198 border-bottom: 1px solid black;
199}
200a:active {
201 /* text-decoration: underline; */
202 border-bottom: 1px solid black;
203}
204/* External Links */
205a[href^="http"]:link {
206 text-decoration: none;
207 border-bottom: 1px dotted #a1a3a1;
208}
209a[href^="http"]:visited {
210}
211a[href^="http"]:hover {
212 border-bottom: 1px dashed black;
213}
214a[href^="http"]:active {
215 border-bottom: 1px dashed black;
216}
217/* links }}} */
218/* .content elements }}} */
219/* NAV ELEMENTS {{{ */
220nav a:link { border-bottom: none; }
221nav a:active { border: none; }
222nav .prevlink {
223 float: left;
224 text-align: left;
225}
226nav .nextlink {
227 float: right;
228 text-align: right;
229}
230/* Properties both types of navlinks share */
231nav .prevlink, nav .nextlink {
232 margin: 0 0.5em;
233 width: 20%;
234 display: block;
235 font-size: 0.85em;
236 font-family: "Playfair Display", Georgia, serif;
237 font-style: italic;
238 text-transform: lowercase;
239 height: 20px;
240 text-decoration: none;
241 position: relative;
242 display: table;
243 vertical-align: top;
244}
245nav .prevlink::before {
246 content: ' «';
247 font-style: normal;
248 display: table-cell;
249 vertical-align: top;
250 text-align: left;
251 padding-left: 0.5em;
252 padding-right: 0.5em;
253 width: 1em;
254}
255nav .nextlink::after {
256 content: ' »';
257 font-style: normal;
258 display: table-cell;
259 vertical-align: top;
260 text-align: right;
261 padding-left: 0.5em;
262 padding-right: 0.5em;
263 width: 1em;
264}
265#randomlink {
266 text-decoration: none;
267}
268nav .anchors {
269 position: absolute;
270 width: 100%;
271 text-align: center;
272}
273nav .anchors a {
274 margin-right: 0.25em;
275 margin-left: 0.25em;
276}
277/* nav elements }}} */
278/* .FOOTNOTES ELEMENTS {{{ */
279.footnotes li {
280 margin-right: 2em;
281 border-bottom: 1px solid gray;
282 max-width: 45em;
283 margin: auto;
284}
285.footnotes li:last-child {
286 border-bottom: none;
287}
288.footnotes p::first-line {
289 font-variant: normal !important;
290}
291.footnotes a[href^="#fnref"] {
292 float: right;
293}
294a.footnoteRef {
295 border: none;
296}
297/* .footnotes elements }}} */
298/* /1* CODE {{{ *1/ */
299/* .sourceCode { */
300/* max-width: 100%; */
301/* overflow: auto; */
302/* background-color: #303030; */
303/* color: #cccccc; */
304/* font-family: "Courier Prime", "Courier New", Courier, monospace; */
305/* font-size: 10pt; */
306/* } */
307/* .sourceCode .kw { /1* keywords *1/ */
308/* color: #f0dfaf; */
309/* font-weight: bold; */
310/* } */
311/* .sourceCode .dt { /1* datatype *1/ */
312/* color: #dfdfbf; */
313/* } */
314/* .sourceCode .dv { /1* decimal value *1/ */
315/* color: #dcdccc; */
316/* } */
317/* .sourceCode .bn { /1* base N *1/ */
318/* color: #dca3a3; */
319/* } */
320/* .sourceCode .fl { /1* float *1/ */
321/* color: #c0bed1; */
322/* } */
323/* .sourceCode .ch { /1* char *1/ */
324/* color: #dca3a3; */
325/* } */
326/* .sourceCode .st { /1* string *1/ */
327/* color: #cc9393; */
328/* } */
329/* .sourceCode .co { /1* comment *1/ */
330/* color: #7f9f7f; */
331/* font-style: italic; */
332/* } */
333/* .sourceCode .ot { /1* other token *1/ */
334/* color: #efef8f; */
335/* } */
336/* .sourceCode .at { /1* alert token *1/ */
337/* color: #ffcfaf; */
338/* } */
339/* .sourceCode .fu { /1* function *1/ */
340/* color: #efef8f; */
341/* } */
342/* .sourceCode .re { /1* region marker *1/ */
343/* } */
344/* .sourceCode .er { /1* error token *1/ */
345/* color: #c3bf9f; */
346/* } */
347/* /1* code }}} *1/ */
348/* GENRE CSS */
349/* .PROSE {{{ */
350.prose {
351 display: inline-block;
352 text-align: justify;
353 max-width: 39em;
354 margin: auto;
355 hyphens: auto;
356 -moz-hyphens: auto;
357}
358.prose p::first-child::first-line {
359 font-variant: small-caps;
360 letter-spacing: 0.1em;
361}
362/* .prose }}} */
363/* .VERSE {{{ */
364.verse {
365 display: inline-block;
366 text-align: left;
367}
368.verse p {
369 margin-bottom: 1em;
370 margin-top: 1em;
371}
372.line {
373 display: block;
374 margin: 0;
375 text-indent: -1em;
376 margin-left: 1em;
377}
378/* .verse }}} */
379/* .LIST {{{ */
380.list {
381 display: inline-block;
382 text-align: left;
383 max-width: 39em;
384 margin: auto;
385 hyphens: auto;
386 -moz-hyphens: auto;
387}
388/* .list }}} */
389/* .TABLE {{{ */
390.table {
391 display: inline-block;
392 text-align: left;
393}
394/* .table }}} */
395/* PROJECT CSS */
396/* #COVER {{{ */
397/* Flexboxing {{{ */
398#cover {
399 position: absolute;
400 top: 0;
401 bottom: 0;
402 left: 0;
403 right: 0;
404 display: -webkit-box;
405 display: -moz-box;
406 display: -ms-flexbox;
407 display: -webkit-flex;
408 display: flex;
409 -webkit-box-direction: normal;
410 -moz-box-direction: normal;
411 -webkit-box-orient: vertical;
412 -moz-box-orient: vertical;
413 -webkit-flex-direction: column;
414 -ms-flex-direction: column;
415 flex-direction: column;
416 -webkit-flex-wrap: nowrap;
417 -ms-flex-wrap: nowrap;
418 flex-wrap: nowrap;
419 -webkit-box-pack: center;
420 -moz-box-pack: center;
421 -webkit-justify-content: center;
422 -ms-flex-pack: center;
423 justify-content: center;
424 -webkit-align-content: center;
425 -ms-flex-line-pack: center;
426 align-content: center;
427 -webkit-box-align: center;
428 -moz-box-align: center;
429 -webkit-align-items: center;
430 -ms-flex-align: center;
431 align-items: center;
432 }
433#cover .title {
434 -webkit-box-ordinal-group: 1;
435 -moz-box-ordinal-group: 1;
436 -webkit-order: 0;
437 -ms-flex-order: 0;
438 order: 0;
439 -webkit-box-flex: 0;
440 -moz-box-flex: 0;
441 -webkit-flex: 0 1 auto;
442 -ms-flex: 0 1 auto;
443 flex: 0 1 auto;
444 -webkit-align-self: auto;
445 -ms-flex-item-align: auto;
446 align-self: auto;
447}
448#cover .byline {
449 -webkit-box-ordinal-group: 1;
450 -moz-box-ordinal-group: 1;
451 -webkit-order: 0;
452 -ms-flex-order: 0;
453 order: 0;
454 -webkit-box-flex: 0;
455 -moz-box-flex: 0;
456 -webkit-flex: 0 1 auto;
457 -ms-flex: 0 1 auto;
458 flex: 0 1 auto;
459 -webkit-align-self: auto;
460 -ms-flex-item-align: auto;
461 align-self: auto;
462}
463#cover .anchors {
464 -webkit-box-ordinal-group: 1;
465 -moz-box-ordinal-group: 1;
466 -webkit-order: 0;
467 -ms-flex-order: 0;
468 order: 0;
469 -webkit-box-flex: 0;
470 -moz-box-flex: 0;
471 -webkit-flex: 0 1 auto;
472 -ms-flex: 0 1 auto;
473 flex: 0 1 auto;
474 -webkit-align-self: auto;
475 -ms-flex-item-align: auto;
476 align-self: auto;
477}
478/* }}} */
479#cover {
480 color: #b2d9e5;
481 background-image: url('black-streak.jpg');
482 background-position: 0 0;
483 background-size: 100% 100%;
484 background-repeat: no-repeat;
485 background-attachment: fixed;
486 background-clip: border-box;
487 background-color: black;
488}
489#cover header {
490 border: none;
491 margin: auto;
492 padding: 0;
493}
494#cover .content {
495 max-width: 39em;
496 margin: auto;
497}
498#cover a {
499 text-decoration: none;
500 border: none;
501}
502#cover a:link {
503 color: #b2d9e5;
504}
505#cover a:visited {
506 color: #b2b2e5;
507}
508#cover a:hover {
509 color: #e5bfb2;
510}
511#cover a:active {
512 color: #e5e5b2;
513}
514#cover li {
515 list-style: none;
516}
517#cover .title {
518 text-transform: uppercase;
519 text-align: center;
520 font-size: 1.8em;
521 letter-spacing: 0.5em;
522 color: #efefb2;
523}
524#cover .byline {
525 font-style: italic;
526 text-align: center;
527 font-size: 1.3em;
528 letter-spacing: 0.2em;
529 color: #e5bfb2;
530}
531#cover .anchors a {
532 margin-left: 0.25em;
533 margin-right: 0.25em;
534}
535#cover .randomlink {
536 text-align: center;
537 font-size: 1em;
538 color: #e5bfb2;
539}
540/* #cover }}} */
541/* .ELEGIES {{{ */
542.elegies {
543}
544/* .elegies }}} */
545/* .HEZEKIAH {{{ */
546/* .hezekiah }}} */
547/* .STARK {{{ */
548/* TODO: Change to Everything Changes? */
549table { border-collapse: collapse; }
550td {
551 vertical-align: top;
552 padding-top: 0.25em;
553 padding-bottom: 0.25em;
554}
555tr {
556 border-bottom: 1px solid black;
557 border-top: 1px solid black;
558}
559/* .stark }}} */
560/* .PAUL {{{ */
561/* Blockquote = typewriter */
562.paul blockquote {
563 font-family: "Courier Prime", "Courier New", Courier, monospace;
564 font-style: normal;
565 font-size: 10pt;
566 border: 1px solid black;
567 max-width: 30em;
568 margin: auto;
569 padding: 1em;
570 text-align: left;
571}
572.paul blockquote :last-child {
573 margin: 0;
574}
575.paul blockquote p::first-line {
576 font-variant: normal !important;
577}
578.paul blockquote ul {
579 list-style-type: none;
580}
581.paul blockquote ul li::before {
582 content: '- ';
583}
584
585/* Emphasis = handwritten */
586.paul em {
587 /* font-family: "Playfair Display", Georgia, sans-serif; */
588 font-style: italic;
589}
590/* .paul }}} */
591/* .AUTOCENTO {{{ */
592.autocento {
593 background-color: white;
594}
595/* .autocento }}} */
596/* .BACKLINKS {{{ */
597.backlinks .daisy a:link {
598 font-size: 0.5em;
599 font-style: italic;
600 margin-left: 0.5em;
601 color: gray;
602 border: none;
603 position: relative;
604 top: -1em;
605}
606.backlinks .daisy a:visited {
607 color: #b2b2e5;
608}
609.backlinks .daisy a:hover {
610 color: #e5bfb2;
611}
612.backlinks .daisy a:active {
613 color: #e5e5b2;
614}
615/* .backlinks }}} */
616/* ARTICLE CSS */
617/* #TABLE_CONTENTS {{{ */
618#table_contents table {
619 max-width: 39em;
620}
621#table_contents tr {
622 border: none;
623}
624#table_contents td {
625 max-width: 50%;
626}
627/* #table_contents }}} */
628/* #ABOUT_AUTHOR {{{ */
629#about-the-author td {
630 vertical-align: middle;
631}
632/* #about_author }}} */
633/* #ABOUT {{{ */
634#about img {
635 max-width: 10em;
636 float: right;
637 padding-top: 0.5em;
638 padding-left: 1em;
639}
640/* #about }}} */
diff --git a/trunk/toc.head b/trunk/toc.head index 29cb69e..83b41d6 100644 --- a/trunk/toc.head +++ b/trunk/toc.head
@@ -1,11 +1,6 @@
1--- 1---
2title: Autocento of the breakfast table 2title: Table of contents
3id: toc 3id: toc
4subtitle: table of contents
5genre: list 4genre: list
6
7project:
8 title: About autocento
9 class: meta
10... 5...
11 6
diff --git a/trunk/toc.sh b/trunk/toc.sh deleted file mode 100644 index fe440cb..0000000 --- a/trunk/toc.sh +++ /dev/null
@@ -1,26 +0,0 @@
1#!/bin/bash
2
3outFile="$1";
4shift 1;
5glob="$@";
6
7echo -n "Compiling $outFile"
8
9for file in $glob; do
10 title=$(grep '^title: ' $file | cut -d' ' -f2-);
11 subtitle=$(grep '^subtitle: ' $file | cut -d' ' -f2-);
12 htmlFile="${file%.txt}.html"
13 # if [[ "$title" == "Autocento of the breakfast table" ]]; then
14 # echo "#. [$subtitle]($htmlFile)" >> "$outFile";
15 # else
16 # echo "#. [$title]($htmlFile)" >> "$outFile";
17 # fi
18 if [[ -n "$subtitle" ]]; then
19 echo "#. [$title: $subtitle]($htmlFile)" >> "$outFile"
20 else
21 echo "#. [$title]($htmlFile)" >> "$outFile";
22 fi
23 echo -n "."
24done
25
26echo "Done."
diff --git a/trunk/versify.exe b/trunk/versify.exe deleted file mode 100644 index d479c80..0000000 --- a/trunk/versify.exe +++ /dev/null
Binary files differ
diff --git a/trunk/versify.hs b/trunk/versify.hs deleted file mode 100644 index 48e9c00..0000000 --- a/trunk/versify.hs +++ /dev/null
@@ -1,15 +0,0 @@
1import Text.Pandoc.JSON
2import Data.List.Split
3
4main :: IO ()
5main = toJSONFilter transformVerseParas
6
7transformVerseParas :: Block -> Block
8transformVerseParas (Para xs)
9 | LineBreak `elem` xs = Para (addLineSpans xs)
10 | otherwise = Para xs
11transformVerseParas x = x
12
13addLineSpans :: [Inline] -> [Inline]
14addLineSpans = map encloseInSpan . splitWhen (== LineBreak)
15 where encloseInSpan = Span ("", ["line"], [])
diff --git a/trunk/white-streak.jpg b/trunk/white-streak.jpg deleted file mode 100644 index 318f654..0000000 --- a/trunk/white-streak.jpg +++ /dev/null
Binary files differ