From e489ef15175ee7ff45f20791d6c4efe782d2f4cf Mon Sep 17 00:00:00 2001 From: Hartmut Seichter Date: Wed, 22 May 2024 19:45:24 +0200 Subject: [PATCH] minor update --- README.md | 12 +++++++++--- coursebuilder/schema.py | 3 ++- test/Makefile | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 368648b..d017230 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ actual values are kept in YAML files in order to version them with git. ```sh $> python coursebuilder -usage: [-h] [-m META [META ...]] [-l LANG] [-f FIELDS [FIELDS ...]] [-s SCHEMA] [-p] [-t] [-b BOOK] [--level LEVEL] - [--table-gen TABLE_GEN] +usage: [-h] [-m META [META ...]] [-l LANG] [-f FIELDS [FIELDS ...]] [-s SCHEMA] [-q QUERY] [-p] [--title TITLE] [-b BOOK] [--level LEVEL] [--table-gen TABLE_GEN] + [--template TEMPLATE] [-o OUT] [--legacy] [--leftcol LEFTCOL] versatile curricula generator @@ -23,12 +23,18 @@ options: Fields to be used, the table will be build accordingly -s SCHEMA, --schema SCHEMA using provided schema + -q QUERY, --query QUERY + compound query to select items -p, --pagebreak add a pagebreak after each module - -t, --title take first value in list as title + --title TITLE template for title - use curly brackets (i.e. {}) to mark where the title string is inserted -b BOOK, --book BOOK process a whole curriculum book with sections --level LEVEL level of header tags --table-gen TABLE_GEN runs table generator + --template TEMPLATE defines a template to be used with fields + -o OUT, --out OUT set the output type + --legacy use legacy generator mode for compatibility + --leftcol LEFTCOL maximum size of left column ``` # Author diff --git a/coursebuilder/schema.py b/coursebuilder/schema.py index 0f7612e..1b0291d 100644 --- a/coursebuilder/schema.py +++ b/coursebuilder/schema.py @@ -164,4 +164,5 @@ class Schema: case 'multinum' : list.append( (r['label'], ', '.join( r['template'].format(value=v) for v in r['value'])) ) - return list \ No newline at end of file + return list + diff --git a/test/Makefile b/test/Makefile index b449688..646a326 100644 --- a/test/Makefile +++ b/test/Makefile @@ -23,7 +23,7 @@ ${target_de}: python ${coursebuilder} -s schema.yaml -m mod.cg.yaml -l de -f fields.yaml | pandoc ${target_flags} -o ${target_de} ${target_de_book}: - python ${coursebuilder} -s schema.yaml -b book.yaml -p --title "### {}" -l de --leftcol 20 --legacy | pandoc ${target_flags} -V lang:de -o ${target_de_book} + python ${coursebuilder} -s schema.yaml -b book.yaml -p --title "### {}" -l de --leftcol 25 --legacy | pandoc ${target_flags} -V toc:true -V lang:de -o ${target_de_book} clean: rm -f ${targets}