From ee99902feaf62a60d006a5187815bdf4aa45e8b7 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 25 Oct 2020 14:14:40 -0600 Subject: build both HTML and PDF distributions --- .build.yml | 13 ++++++++++--- errors.md | 4 ++++ etc/md.yml | 23 +++++++++++++++++++++++ etc/pdf.yml | 20 ++++++++++++++++++++ index.md | 4 ++++ safety.md | 4 ++++ syntax.md | 4 ++++ tagged-unions.md | 4 ++++ types.md | 4 ++++ vs-c.md | 4 ++++ 10 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 etc/md.yml create mode 100644 etc/pdf.yml 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 -- cgit v1.2.3