Idea: CLI supporting raw filters json
- Dominant language
- JavaScript
- Stars
- 44
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Per @springmeyer 's thoughts:
The CLI currently expects a `--style` flag that reads a mbgl style that is then run through `/lib/styleToFilters.js`
I think it would be ideal to also:
- Have the CLI accept an option like `--filters` that would be the JSON schema which `new shaver.Filter` expects (in place of `--style`)
- Have this "Filters" JSON schema clearly documented in the readme so that it is obvious how to use shaver without needing to form up a full mbgl style.
This could be useful for testing and finding lurking parsing bugs.
refs https://github.com/mapbox/vtshaver/blob/da0b5bad9bcf08368f47cb97081cd2917bdfab0d/src/filters.cpp#L42
Contributor guide
Research direction
Start with the CLI handling for the existing --style option and lib/styleToFilters.js, then inspect the Filter schema referenced in src/filters.cpp. Add support for a --filters JSON input and document that schema in the README. Done means the CLI accepts raw filter JSON in place of a style and the README explains how to use it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, javascript
- Domain
- cli, documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100