about summary refs log tree commit diff stats
path: root/README.md
blob: 62fd4da95d2af8a21a09897318ce73d2b360cf35 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Source Code Htmlizer Written in Awk

Here we have a tool that's in a similar vein to [stagit][] and others.  It takes a number of files on the commandline and generates HTML for them in an output directory, then generates an index with a file listing and a readme.  It's also written completely in `awk(1p)`.  I guess that's the gimmick.

[stagit]: https://codemadness.org/stagit.html

## How to use

I don't want to figure out how to process actual command-line arguments in awk, so I've made all the configuration doable through awk variables.  The command I've been running to test `schwa` is

```sh
./schwa.awk -vreadme=README.md \
	-vreadmefilter='pandoc -thtml5' \
	-vtemplate=template.html \
	-vstatic=style.css \
	-vclone='<a href="https://git.acdw.net/schwa">https://git.acdw.net/schwa</a>'
	-vdesc="Source Code Htmlizer" \
	*
```

Of course, some explanation is in order.

### Command-line variables

template
: *needs documentation*

out
: *needs documentation*

readme
: *needs documentation*

readmefilter
: *needs documentation*

clone
: *needs documentation*

desc
: *needs documentation*

static
: *needs documentation*

### Templating

CLONE
: *needs documentation*

DESCRIPTION
: *needs documentation*

DIRECTORY
: *needs documentation*

FILENAME
: *needs documentation*

OUTFILE
: *needs documentation*

RAWFILE
: *needs documentation*

CONTENT
: *needs documentation*

#### "Conditionals"

`<!--INDEX--> ... <!--/INDEX-->`
: *needs documentation*

`<!--NORMAL--> ... <!--/NORMAL-->`
: *needs documentation*

## Contributing

Email me at <git@acdw.net> to contribute.

## License

This project is licensed under a BSD 3-clause license.
See COPYING for more details.