summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-09-09 09:16:38 +0300
committerLars Wirzenius <liw@liw.fi>2022-09-09 09:16:38 +0300
commitf2740c77c3e3d234b724704482e7b0380c2550d4 (patch)
treea0f7c194bf97530bd5103229309f7ec554c8ec6f
parent307abfa167cd898f112472bc33a13b17a326c676 (diff)
downloadobnam2-f2740c77c3e3d234b724704482e7b0380c2550d4.tar.gz
fix: use separate subplot YAML metadata file for new Subplot
Subplot has just made a breaking change: the subplot document metadata must be in a separate YAML file, not embedded in the markdown. This adapts Obnam to that. It's a little awkward that Subplot hasn't made a release of this yet, but as I use Subplot from git, I need this now. Sponsored-by: author
-rwxr-xr-xcheck6
-rw-r--r--obnam.md23
-rw-r--r--obnam.subplot22
3 files changed, 25 insertions, 26 deletions
diff --git a/check b/check
index 905bc5b..059886d 100755
--- a/check
+++ b/check
@@ -50,11 +50,11 @@ $hideok cargo build --all-targets
got_cargo_cmd fmt && $hideok cargo fmt -- --check
$hideok cargo test
-subplot docgen obnam.md -o obnam.html
-subplot docgen obnam.md -o obnam.pdf
+subplot docgen obnam.subplot -o obnam.html
+subplot docgen obnam.subplot -o obnam.pdf
target="$(cargo metadata --format-version=1 | python3 -c 'import sys, json; o = json.load(sys.stdin); print(o["target_directory"])')"
-subplot codegen obnam.md -o test.py
+subplot codegen obnam.subplot -o test.py
rm -f test.log
if [ "$(id -un)" = root ]; then
echo Not running tests as root.
diff --git a/obnam.md b/obnam.md
index e1f3055..0c36a8b 100644
--- a/obnam.md
+++ b/obnam.md
@@ -1,26 +1,3 @@
----
-title: "Obnam2&mdash;a backup system"
-author: Lars Wirzenius
-documentclass: report
-bindings:
- - subplot/server.yaml
- - subplot/client.yaml
- - subplot/data.yaml
- - lib/files.yaml
- - lib/runcmd.yaml
-impls:
- python:
- - subplot/server.py
- - subplot/client.py
- - subplot/data.py
- - lib/daemon.py
- - lib/files.py
- - lib/runcmd.py
-classes:
- - json
- - sql
-...
-
# Abstract
Obnam is a backup system, consisting of a not very smart server for
diff --git a/obnam.subplot b/obnam.subplot
new file mode 100644
index 0000000..80deeca
--- /dev/null
+++ b/obnam.subplot
@@ -0,0 +1,22 @@
+title: "Obnam2&mdash;a backup system"
+author: Lars Wirzenius
+documentclass: report
+markdowns:
+ - obnam.md
+bindings:
+ - subplot/server.yaml
+ - subplot/client.yaml
+ - subplot/data.yaml
+ - lib/files.yaml
+ - lib/runcmd.yaml
+impls:
+ python:
+ - subplot/server.py
+ - subplot/client.py
+ - subplot/data.py
+ - lib/daemon.py
+ - lib/files.py
+ - lib/runcmd.py
+classes:
+ - json
+ - sql