aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-10-25 14:14:40 -0600
committerMelody Horn <melody@boringcactus.com>2020-10-25 14:14:40 -0600
commitee99902feaf62a60d006a5187815bdf4aa45e8b7 (patch)
treeafbbda16b14ee7401f6c57d5580d9d5473c97b14
parent438deebf05347dc79797b1c476da0e65c0a5346f (diff)
downloadspec-ee99902feaf62a60d006a5187815bdf4aa45e8b7.tar.gz
spec-ee99902feaf62a60d006a5187815bdf4aa45e8b7.zip
build both HTML and PDF distributions
-rw-r--r--.build.yml13
-rw-r--r--errors.md4
-rw-r--r--etc/md.yml23
-rw-r--r--etc/pdf.yml20
-rw-r--r--index.md4
-rw-r--r--safety.md4
-rw-r--r--syntax.md4
-rw-r--r--tagged-unions.md4
-rw-r--r--types.md4
-rw-r--r--vs-c.md4
10 files changed, 81 insertions, 3 deletions
diff --git a/.build.yml b/.build.yml
index 73562ea..9f036aa 100644
--- a/.build.yml
+++ b/.build.yml
@@ -1,15 +1,22 @@
-image: debian/stable
+image: debian/testing
packages:
- pandoc
- - wkhtmltopdf
+ - weasyprint
- poppler-utils
sources:
- https://git.sr.ht/~boringcactus/crowbar-spec
tasks:
- page-count: |
cd crowbar-spec
- pandoc -s -o ../spec.pdf -t html -M "title=Crowbar Specification" *.md
+ files="index vs-c tagged-unions types safety errors syntax"
+ for file in $files
+ do
+ pandoc --defaults=etc/md.yml -o $file.html $file.md
+ done
+ pandoc --defaults=etc/pdf.yml -o ../spec.pdf *.html
cd ..
pdfinfo spec.pdf | grep Pages
+ tar czvf spec-html.tar.gz crowbar-spec/*.html
artifacts:
- spec.pdf
+ - spec-html.tar.gz
diff --git a/errors.md b/errors.md
index 1333ed7..15e4c78 100644
--- a/errors.md
+++ b/errors.md
@@ -1 +1,5 @@
+---
+title: Error Handling
+---
+
TODO
diff --git a/etc/md.yml b/etc/md.yml
new file mode 100644
index 0000000..aece004
--- /dev/null
+++ b/etc/md.yml
@@ -0,0 +1,23 @@
+from: markdown
+to: html5
+
+standalone: true
+
+verbosity: INFO
+
+top-level-division: chapter
+
+pdf-engine: weasyprint
+
+table-of-contents: false
+number-sections: true
+shift-heading-level-by: 1
+title-prefix: "Crowbar Specification: "
+eol: lf
+
+# syntax-definition:
+
+fail-if-warnings: true
+dump-args: false
+ignore-args: false
+trace: false
diff --git a/etc/pdf.yml b/etc/pdf.yml
new file mode 100644
index 0000000..5ef3857
--- /dev/null
+++ b/etc/pdf.yml
@@ -0,0 +1,20 @@
+from: html
+to: pdf
+
+standalone: true
+
+metadata:
+ title: "Crowbar Specification"
+
+verbosity: INFO
+
+top-level-division: chapter
+
+pdf-engine: weasyprint
+
+table-of-contents: true
+
+fail-if-warnings: true
+dump-args: false
+ignore-args: false
+trace: false
diff --git a/index.md b/index.md
index 6692800..c95a888 100644
--- a/index.md
+++ b/index.md
@@ -1,3 +1,7 @@
+---
+title: Introduction
+---
+
Crowbar: the good parts of C, with a little bit extra.
**This is entirely a work-in-progress, and should not be relied upon to be stable (or even true) in any way.**
diff --git a/safety.md b/safety.md
index 845c45b..2918806 100644
--- a/safety.md
+++ b/safety.md
@@ -1,3 +1,7 @@
+---
+title: Memory Safety
+---
+
Each item in Wikipedia's [list of types of memory errors](https://en.wikipedia.org/wiki/Memory_safety#Types_of_memory_errors) and what Crowbar does to prevent them.
In general, Crowbar does its best to ensure that code will not exhibit any of the following memory errors.
diff --git a/syntax.md b/syntax.md
index e0ecea5..4641562 100644
--- a/syntax.md
+++ b/syntax.md
@@ -1,3 +1,7 @@
+---
+title: Syntax
+---
+
The syntax of Crowbar mostly matches the syntax of C, with fewer obscure/advanced/edge case features.
# Source Files
diff --git a/tagged-unions.md b/tagged-unions.md
index 1333ed7..0083fff 100644
--- a/tagged-unions.md
+++ b/tagged-unions.md
@@ -1 +1,5 @@
+---
+title: Tagged Unions
+---
+
TODO
diff --git a/types.md b/types.md
index 1333ed7..549cf0a 100644
--- a/types.md
+++ b/types.md
@@ -1 +1,5 @@
+---
+title: Types
+---
+
TODO
diff --git a/vs-c.md b/vs-c.md
index e086b4c..926973c 100644
--- a/vs-c.md
+++ b/vs-c.md
@@ -1,3 +1,7 @@
+---
+title: Comparison to C
+---
+
What differentiates Crowbar from C?
# Removals