Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chakrit/truth_serum

Ruby lib for parsing github-style searches.
https://github.com/chakrit/truth_serum

github-search parsing search truth-serum

Last synced: 3 months ago
JSON representation

Ruby lib for parsing github-style searches.

Awesome Lists containing this project

README

        

# TRUTH SERUM

Features

* Parses `keywords` as well as `filters:value` syntax.
* Handles `"quotes spaces ::: escapes \r\n newlines"`.
* Has proper lexing and parsing system instead of a regular expression.

# INSTALL

```
gem install truth_serum
```

# USAGE

```rb
require 'truth_serum'

result = TruthSerum.parse("hello world key:value -negate:yes")
puts result.terms
puts result.filters
puts result.negative_filters

query = TruthSerum.unparse(result)
puts query
```

# LICENSE

MIT