iipc / jwarc

Java library for reading and writing WARC files with a typed API
Apache License 2.0
48 stars 8 forks source link

Filter expressions #3

Closed ato closed 5 years ago

ato commented 5 years ago

Parse a very simple filter expression language with Ragel?

use-cases:

operators:

! not
==, != string equality
~= regex match
<, <=, >=, > numeric comparison
&&, || boolean logic

shorthand predicates:

resource: WARC-Type == resource || WARC-Type == response
page: resource && payload.type == text/html
image: resource && payload.type ~= ^image/
error: WARC-Type == response && http.status > 400