Skip to content

mmstroik/bwq

Repository files navigation

bwq

brandwatch boolean search query linter and language server written in rust.

install

cargo install bwq

usage

# lint directory (recursively) or specific file(s)
bwq check                        # lint all `.bwq` files in the current directory (and subdirectories)
bwq check path/to/queries/       # lint all `.bwq` files in `path/to/queries/` (and subdirectories)
bwq check path/to/query.bwq      # lint `query.bwq`
bwq check path/to/queries/*.txt  # lint all `.txt` files in `path/to/queries/`

# lint query strings directly
bwq check --query "term1 AND wildcardterm*"

# lint both .txt and .bwq files in current directory (and subdirectories)
bwq check -e txt -e bwq 

# show all options
bwq check --help

bw operator support

  • boolean: AND, OR, NOT
  • proximity: ~, NEAR/x, NEAR/xf
  • wildcards: *, ?
  • fields: title:, site:, rating:[1 TO 5]
  • special: {case}, #hashtag, @mention, <<<comments>>>

run bwq examples for more

About

brandwatch boolean search query linter and LSP written in rust

Resources

License

Stars

Watchers

Forks

Packages

No packages published