pistachiology / truth_serum

Ruby lib for parsing github-style searches.

Home Page:https://www.omise.co

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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

ezoic increase your site revenue

About

Ruby lib for parsing github-style searches.

https://www.omise.co


Languages

Language:Ruby 99.4%Language:Shell 0.6%