Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mnalis/streetcomplete-taginfo-categorize
update list of tags combined with shop=, craft= etc. to populate and categorise tags related to KEYS_THAT_SHOULD_BE_REMOVED_WHEN_PLACE_IS_REPLACED listing in StreetComplete
https://github.com/mnalis/streetcomplete-taginfo-categorize
openstreetmap streetcomplete
Last synced: about 16 hours ago
JSON representation
update list of tags combined with shop=, craft= etc. to populate and categorise tags related to KEYS_THAT_SHOULD_BE_REMOVED_WHEN_PLACE_IS_REPLACED listing in StreetComplete
- Host: GitHub
- URL: https://github.com/mnalis/streetcomplete-taginfo-categorize
- Owner: mnalis
- Created: 2021-09-05T23:38:29.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-26T17:49:04.000Z (9 months ago)
- Last Synced: 2024-02-26T19:02:48.686Z (9 months ago)
- Topics: openstreetmap, streetcomplete
- Language: Perl
- Homepage:
- Size: 417 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Prerequisites
- make, perl, JSON perl module, json_reformat (on Debian-based system: `apt-get install make perl libjson-perl yajl-tools`)
- `https://github.com/openstreetmap/id-tagging-schema` repository in `../id-tagging-schema`
- `https://github.com/streetcomplete/StreetComplete/` repository in `../StreetComplete`## Usage instructions
Those scripts generate `KEYS_THAT_SHOULD_BE_REMOVED_WHEN_PLACE_IS_REPLACED` for the [StreetComplete](https://github.com/streetcomplete/StreetComplete) project.
`make update` should be run periodically, to find new keys with usage > 0.01%
and add them to `## TODO ##` section at the bottom of `keys.txt` file.User should then investigate and move them from there to correct section
like `### KEYS TO REMOVE ###` or `### KEYS TO KEEP ###` sections of `keys.txt`.Running `make` again will then generate `sc_to_remove.txt` with kotlin code to copy/paste to
https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/osm/Place.kt#L244
It is generated only from data in `### KEYS TO REMOVE ###` section.If in doubt, `make distclean` will force next `make update` to refetch everything
## Notes on `keys.txt` format:
* each line can contain a regex (or normal text) representing key (in-line comments are possible too, as everything after `//` or `#` is ignored
* blank lines in `### KEYS TO REMOVE ###` section will become newlines in `sc_to_remove.txt`
* lines beginning with `//` in `### KEYS TO REMOVE ###` section will be copied to `sc_to_remove.txt`
* lines beginning with `#` are ignored completely## when IS_PLACE_EXPRESSION in Place.kt changes
If [`IS_PLACE_EXPRESSION` in `Place.kt`](https://github.com/streetcomplete/StreetComplete/blob/master/app/src/main/java/de/westnordost/streetcomplete/osm/Place.kt#L34C13-L34C32)
changes (`make update` will warn you of that), then `FETCH_KEYS.make` / `FETCH_TAGS.make` should be updated too,
and scripts re-run (i.e. `make update` + `make`) in order to generate new
`KEYS_THAT_SHOULD_BE_REMOVED_WHEN_PLACE_IS_REPLACED` to put in `Place.kt`.For example, if `IS_PLACE_EXPRESSION` was extended with:
```diff
+ or healthcare
+ or """ + mapOf(
+ "leisure" to listOf(
+ "adult_gaming_centre",
+ "amusement_arcade",
```one would add `healthcare` to `FETCH_KEYS.make`, and `leisure=adult_gaming_centre leisure=amusement_arcade` to `FETCH_TAGS.make`
When one has completed updating `FETCH_KEYS.make` and `FETCH_TAGS.make`, they need to edit `Makefile` and update
`STREETCOMPLETE_LAST_GIT` at the top of it with git commit id that changed `Place.kt`, i.e. the one returned by:
```
cd $STREETCOMPLETE_PATH && git log -n 1 --format='%h' -- app/src/main/java/de/westnordost/streetcomplete/osm/Place.kt
```