From eda39c3aaa01298788b13edcd96adbc32ff8df62 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 15 Sep 2021 20:00:02 +0300 Subject: refactor: move document YAML metadata to top My Emacs' markdown-mode no longer gets confused by it. Sponsored-by: author --- jt.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/jt.md b/jt.md index c32ea62..2066690 100644 --- a/jt.md +++ b/jt.md @@ -1,3 +1,19 @@ +--- +title: "jt—a journalling tool" +author: +- Lars Wirzenius +- Daniel Silverstone +template: python +bindings: +- subplot/jt.yaml +- lib/files.yaml +- lib/runcmd.yaml +functions: +- subplot/jt.py +- lib/files.py +- lib/runcmd.py +... + # Introduction The **jt** software (short for "journalling tool") is a helper for @@ -317,19 +333,3 @@ typeset into HTML or PDF or to generate a program that automatically verifies that all acceptance criteria are met. [Subplot]: https://subplot.liw.fi/ - ---- -title: "jt—a journalling tool" -author: -- Lars Wirzenius -- Daniel Silverstone -template: python -bindings: -- subplot/jt.yaml -- lib/files.yaml -- lib/runcmd.yaml -functions: -- subplot/jt.py -- lib/files.py -- lib/runcmd.py -... -- cgit v1.2.1 From 4da2a60a5db498c9605497d8709b1a0ea5a92045 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 15 Sep 2021 20:02:46 +0300 Subject: fix: add impl to the bindings file, for current Subplot Sponsored-by: author --- subplot/jt.yaml | 84 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 63 insertions(+), 21 deletions(-) diff --git a/subplot/jt.yaml b/subplot/jt.yaml index dc2a666..90ca3ef 100644 --- a/subplot/jt.yaml +++ b/subplot/jt.yaml @@ -1,65 +1,107 @@ - given: "an installed jt" - function: install_jt + impl: + python: + function: install_jt - given: "an executable script {filename}" - function: create_script + impl: + python: + function: create_script - when: I invoke jt init (?P\S+) (?P\S+) "(?P.*)" regex: true - function: run_jt_init + impl: + python: + function: run_jt_init - when: I invoke jt list-journals - function: run_jt_list_journals + impl: + python: + function: run_jt_list_journals - when: I invoke jt is-journal {dirname} - function: run_jt_is_journal + impl: + python: + function: run_jt_is_journal - when: I invoke jt new "{title:text}" --editor=none --dirname={dirname} - function: run_jt_new + impl: + python: + function: run_jt_new - when: "I invoke jt edit --editor={editor} --dirname={dirname}" regex: false - function: run_jt_edit + impl: + python: + function: run_jt_edit - when: I invoke jt finish --dirname={dirname} - function: run_jt_finish + impl: + python: + function: run_jt_finish - when: I edit draft {draftno} in {dirname} to also contain "{text}" - function: edit_draft + impl: + python: + function: edit_draft - then: output contains "(?P<pattern>.*)" regex: true - function: output_contains + impl: + python: + function: output_contains - then: there are no drafts in {dirname} - function: journal_has_no_drafts + impl: + python: + function: journal_has_no_drafts - then: there is one draft in {dirname} - function: journal_has_one_draft + impl: + python: + function: journal_has_one_draft - then: there are two drafts in {dirname} - function: journal_has_two_drafts + impl: + python: + function: journal_has_two_drafts - then: draft {draftno} in {dirname} contains "{pattern:text}" - function: draft_contains_string + impl: + python: + function: draft_contains_string - then: draft {draftno} in {dirname} links to "{topic}" - function: draft_links_to_topic + impl: + python: + function: draft_links_to_topic - then: there are no journal entries in {dirname} - function: journal_has_no_entries + impl: + python: + function: journal_has_no_entries - then: there is one journal entry in {dirname}, at {variable} - function: journal_has_one_entry + impl: + python: + function: journal_has_one_entry - then: there are two journal entries in {dirname}, at {variable1} and {variable2} - function: journal_has_two_entries + impl: + python: + function: journal_has_two_entries - then: journal entry <{variable}> contains "{pattern:text}" - function: file_contains + impl: + python: + function: file_contains - then: file name <{varname}> ends with {suffix} - function: file_name_has_suffix + impl: + python: + function: file_name_has_suffix - then: there are no uncommitted changes in {dirname} - function: git_is_clean + impl: + python: + function: git_is_clean -- cgit v1.2.1