diff --git a/README.md b/README.md index 8bc8e45..456d760 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,10 @@ Config values resolve in this priority: 3. TOML config file 4. Hardcoded defaults +## Example + +See example [config](example/book/config), [shelf](example/book/shelf.d/archive.toml), and [template](example/book/template.json) files. + ## Customization ### Theme diff --git a/example/book/config b/example/book/config new file mode 100644 index 0000000..a85c47c --- /dev/null +++ b/example/book/config @@ -0,0 +1,4 @@ +shelf_directory = "/Users/username/.config/book/shelf.d" +catalog_format = "toml" +autoconfirm = true +interactive = true \ No newline at end of file diff --git a/example/book/shelf.d/archive.toml b/example/book/shelf.d/archive.toml new file mode 100644 index 0000000..9d0ca12 --- /dev/null +++ b/example/book/shelf.d/archive.toml @@ -0,0 +1,29 @@ +shelf_name = "archive" +shelf_desc = "where books get lost!" + +[Collections] + [Collections.alpha] + collection_name = "alpha" + collection_desc = "first collection for losing in the stacks" + + [[Collections.alpha.marks]] + catalog_id = "569273e2" + title = "Example Article One" + url = "https://example.com/article-one" + tags = ["demo", "test"] + + [Collections.beta] + collection_name = "beta" + collection_desc = "second collection collecting dust" + + [[Collections.beta.marks]] + catalog_id = "0ff1faa4" + title = "Example Article Two" + url = "https://example.com/article-two" + tags = ["sample", "fixture"] + + [[Collections.beta.marks]] + catalog_id = "d86b5744" + title = "Example Article Three" + url = "https://example.com/article-three" + tags = ["sample", "fixture", "demo"] diff --git a/example/book/template.json b/example/book/template.json new file mode 100644 index 0000000..c1008fa --- /dev/null +++ b/example/book/template.json @@ -0,0 +1,14 @@ +{ + "collection-list": { + "primary_title": "Congratulations! You picked shelf:", + "list_title": "With the auspicious list of collections:" + }, + "mark-list": { + "primary_title": "Congratulations! You picked shelf:", + "secondary_title": "With the infamous collection:", + "list_title": "With the worrisome list of marks:" + }, + "shelf-list": { + "list_title": "Congratulations! You've knocked over all your shelves:" + } +} \ No newline at end of file