Update template README
authorMikael Berthe <mikael@lilotux.net>
Sun, 07 May 2017 16:38:52 +0200
changeset 86 9e846c5af138
parent 85 a4464c0b0c36
child 87 cd1c3f1610e4
Update template README
templates/README.md
--- a/templates/README.md	Sun May 07 16:38:52 2017 +0200
+++ b/templates/README.md	Sun May 07 16:38:52 2017 +0200
@@ -1,16 +1,39 @@
-# Templates
+# Templates and Themes
 
 This folder contains sample templates to customize madonctl output.
 
-I'd like to eventually have support for themes with collections of templates.
+Feel free to contribute if you have nice templates or if you want to work on themes as well!
+
+## Configuration
+
+The template prefix directory can be set in the configuration file with the
+'template_directory' setting, or with the `MADONCTL_TEMPLATE_DIRECTORY`
+environment variable.\
+If set, template files are looked up relatively from this repository first
+(unless they are absolute paths or start with "./" or "../").
+
+The themes are located in the `themes` directory, inside the base template
+directory.
+A theme is a collection of templates grouped in a theme directory (the name of
+the directory is the name of the theme).\
+E.g. `$template_directory/themes/ansi/`
+
+## Templates
 
 Here's an example using a template with ANSI color escape codes (for UNIX/Linux):
 
     madonctl timeline --limit 2 --template-file ansi-status.tmpl
 
-The template prefix directory can be set in the configuration file with the 'template_directory' setting,
-or with the `MADONCTL_TEMPLATE_DIRECTORY` environment variable. \
-If set, template files are looked up relatively from this repository first
-(unless they are absolute paths or start with "./" or "../").
+## Themes
+
+To use a theme, simply specify the theme name with the --theme flag (the
+--output=theme flag is implied):
 
-Feel free to contribute if you have nice templates or if you want to work on themes as well!
+    madonctl timeline --limit=2 --theme=ansi
+    madonctl accounts statuses --limit 5 --theme ansi
+
+    madonctl --theme=ansi accounts notifications --list
+    madonctl --theme=ansi stream
+
+Currently, if a template is missing, madonctl will fall back to the _plain_
+output format.  (In the future it might just fail with an error message.)