about summary refs log tree commit diff stats
path: root/front-matter/process.txt
blob: 955f0f3b5f6a462e39a61a431a13024e5c24ce25 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
title: Autocento of the breakfast table
subtitle: process narrative
genre: prose

id: process
toc: "Process narrative"

project:
    title: Front matter
    class: front-matter
...

## Hi.  My name is Case Duckworth.  This is my thesis.

_Autocento of the breakfast table_ is an inter/hypertextual exploration of the workings of inspiration, revision, and obsession.
I've compiled this work over multiple years, and recently linked it all together to form a (hopefully) more cohesive whole.
To make this easier than collating everything by hand, I've relied on a process that leverages open-source technologies to publish my work onto a web platform.

## Process steps

1. Write poems.
2. Convert to Markdown.
    - Markdown, originally by [John Gruber][], is a lightweight markup language that allows me to focus on the _content_ of my writing, knowing that I can work on the _presentation_ later.
    - The original `markdown.pl` program is buggy and inconsistent with how it applies styles to markup.  It also only works to convert text to HTML.
    - Because of these limitations, I've used John MacFarlane's [extended Markdown syntax][], which lets me write richer documents and programmatically compile my work into multiple formats.
3. Compile to HTML with Pandoc.
    - At first, I used this code in the shell to generate my HTML:
    ```bash
    for file in *.txt; do
        pandoc "$file" -f markdown -t html5 \
        --template=template.html -o "${file%txt}html"
    done
    ```
        but this proved tedious with time.
    - After a lot of experimenting with different scripting languages, I finally realized that [`GNU make`][] would fit this task perfectly.
    - You can see my makefile [here][makefile]---it's kind of a mess, but it does the job.  See below for a more detailed explanation of the makefile.
4. Style the pages with CSS.
    - I use a pretty basic style for _Autocento_.  You can see my stylesheet [here][stylesheet].
4. Use [Github][] to put them online.
    - Github uses `git` under the hood---a Version Control System developed for keeping track of large code projects.
    - My workflow with `git` looks like this:
        - Change files in the project directory---revise a poem, change the makefile, add a style, etc.
        - (If necessary, re-compile with `make`.)
        - `git status` tells me which files have changed, which have been added, and if any have been deleted.
        - `git add -A` adds all the changes to the _staging area_, or I can add individual files, depending on what I want to commit.
        - `git commit -m "[message]"` commits the changes to git.  This means they're "saved"---if I do something I want to revert, I can `git revert` back to a commit and start again.
        - `git push` pushes the changes to the _remote repository_---in this case, the Github repo that serves <http://autocento.me>.
        - Lather, rinse, repeat.
5. Write Makefile to extend build capabilities.
    - As of now, I've completed a _[Hapax legomenon][]_ compiler, a [back-link][] compiler, and an updater for the [random link functionality][] that's on this site.
    - I'd like to build a compiler for the [Index of first lines][] and [Index of common titles][] once I have time.

## The beauty of this system

- I can compile these poems into (almost) any format: `pandoc` supports a lot.
- Once I complete the above process once, I can focus on revising my poems.
- These poems are online for anyone to see and use for their own work.

[John Gruber]: http://daringfireball.net/projects/markdown/
[extended Markdown syntax]: http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
[`GNU make`]: https://www.gnu.org/software/make/manual/make.html
[makefile]: https://github.com/duckwork/autocento/blob/gh-pages/makefile
[stylesheet]: https://github.com/duckwork/autocento/blob/gh-pages/style.css
[Github]: https://github.com
[Hapax legomenon]: hapax.html
[back-link]: makefile
[random link functionality]: trunk/lozenge.js
[Index of first lines]: first-lines.html
[Index of common titles]: common-titles.html