Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/chakrit/truth_serum
- Owner: chakrit
- Created: 2016-05-05T17:58:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-06T08:53:03.000Z (over 6 years ago)
- Last Synced: 2024-10-31T15:18:08.230Z (3 months ago)
- Topics: github-search, parsing, search, truth-serum
- Language: Ruby
- Homepage: https://www.omise.co
- Size: 53.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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_filtersquery = TruthSerum.unparse(result)
puts query
```# LICENSE
MIT