From 2bad4871ab7f4624a8731e5de2765c785a818541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20B=C3=B6sch-Plepelits?= Date: Mon, 22 Aug 2022 08:43:20 +0100 Subject: [PATCH] README: categories can be defined as YAML --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c71ef87..807fb3b0 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ git clone https://github.com/plepe/openstreetbrowser-categories-main.git node_mo You are welcome to send pull requests via Github! ### Category definition -There are currently two types of categories: `index` (for sub categories) and `overpass` (for OpenStreetMap data, loaded via an Overpass API request). Each of them is defined via a JSON structure. They can be combined into a single file. +There are currently two types of categories: `index` (for sub categories) and `overpass` (for OpenStreetMap data, loaded via an Overpass API request). Each of them is defined via a JSON (old) or YAML (recommended) structure. They can be combined into a single file. Check out the [tutorial](./doc/Tutorial.md)! @@ -57,6 +57,16 @@ File: dir.json } ``` +or File: dir.yaml +```yaml +type: index +subCategories: + - id: foo + - id: bar + type: overpass + query: node[amenity=bar] +``` + This will define a category with the id 'dir' (from the file name) with two sub-categories: 'foo' (which will be loaded from the file `foo.json`) and 'bar' (which is defined inline as category of type 'overpass' and will show all nodes with the tag 'amenity' set to value 'bar' - see below for more details). #### Category 'overpass'