{"id":43269178,"url":"https://github.com/polm/philtre","last_synced_at":"2026-02-01T15:39:11.614Z","repository":{"id":57322970,"uuid":"54040471","full_name":"polm/philtre","owner":"polm","description":"Search objects with a familiar syntax.","archived":false,"fork":false,"pushed_at":"2017-04-11T13:27:19.000Z","size":122,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T09:32:21.058Z","etag":null,"topics":["search"],"latest_commit_sha":null,"homepage":null,"language":"LiveScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-16T14:48:02.000Z","updated_at":"2020-05-11T09:26:04.000Z","dependencies_parsed_at":"2022-08-25T20:00:10.795Z","dependency_job_id":null,"html_url":"https://github.com/polm/philtre","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/polm/philtre","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polm%2Fphiltre","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polm%2Fphiltre/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polm%2Fphiltre/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polm%2Fphiltre/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polm","download_url":"https://codeload.github.com/polm/philtre/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polm%2Fphiltre/sbom","scorecard":{"id":740257,"data":{"date":"2025-08-11","repo":{"name":"github.com/polm/philtre","commit":"d03ce07593f895ed23a7a6f41051311256412a7f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T17:13:36.972Z","repository_id":57322970,"created_at":"2025-08-22T17:13:36.972Z","updated_at":"2025-08-22T17:13:36.972Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28981350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T15:35:50.179Z","status":"ssl_error","status_checked_at":"2026-02-01T15:35:38.075Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["search"],"created_at":"2026-02-01T15:39:10.944Z","updated_at":"2026-02-01T15:39:11.607Z","avatar_url":"https://github.com/polm.png","language":"LiveScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Philtre\n\nA library for searching objects, with syntax inspired by Gmail and Github searches. \n\n![philtre demo](http://i.imgur.com/tQN1AaD.gif)\n\nAt the core of Philtre is a function (`philtre`) that takes two arguments: a query (as a string) and a list of Javascript objects. It then returns the objects that match the query. \n\nYou can try this out using the included command line script and sample data file. The command line script reads one JSON object per line from stdin (like [jq](https://stedolan.github.io/jq/)), filters them using the supplied query, and prints the specified field:\n\n    philtre [query] [field-to-print] \u003c [input.json]\n\nTo try it out yourself:\n\n    mkdir fiddle \u0026\u0026 cd fiddle \u0026\u0026 git clone https://github.com/polm/philtre.git\n    ./bin/philtre \"#restaurants\" title \u003c data/dampfkraft.json \n    ./bin/philtre \"is:location #restaurants\" title \u003c data/dampfkraft.json \n    ./bin/philtre \"not is:location #restaurants\" title \u003c data/dampfkraft.json \n    ./bin/philtre \"is:location not #restaurants\" title \u003c data/dampfkraft.json \n\n### Supported Keywords\n\nNote that except for values before a colon in keywords using them (which must match the regex `[A-z]*`), anything may be quoted to preserve whitespace or otherwise special characters.\n\n| keyword | effect |\n| --- | --- |\n| (default) | non-special words check for a string match on every field of the object. |\n| `:has:[something]` | true if the object has a field named `something` |\n| `:is:[something]` | same as `:has:` |\n| `[key]:[value]` | true if `value` equals the `key` property |\n| `AND` | does nothing (it's the default) |\n| `OR` | logical OR of the conditions on either side |\n| `NOT` | negates the next keyword |\n| `-[something]` | negates the next keyword; unlike `not` doesn't need a space |\n| `(` and `)` | allows grouping of terms |\n| `#[xxx]` | true if the `.tags` property contains `xxx` |\n| `:before:[xxx]` | true if the `.date` property is less than `xxx` |\n| `:after:[xxx]` | true if the `.date` property is greater than `xxx` |\n| `:sort:[field]` | sorts on `field` | \n| `:sortr:[field]` | sorts on `field` in the order opposite `:sort:` | \n| `:limit:[count]` | only shows up to `count` results | \n\nFor keyword queries like `[key]:[value]`, by quoting the value you can also use comparisons such as `[key]:\"\u003c[value]\"`, `[key]:\"\u003e=[value]\"`; you can also use ranges with the syntax `[key]:\"low .. high\"` (including spaces around the dots). This syntax is borrowed from [Github's search syntax](https://help.github.com/articles/search-syntax/).\n\nNot `:sort:` and `:limit:` only work in the top-level of queries; they will do nothing if contained in parentheses. \n\nYou may have some questions:\n\n**Why are `is` and `has` the same?**\n\nIn looking at sample data it seemed that either relationship could be expressed by having an object property. I might revisit this.\n\n**How does the tag feature work?**\n\nIf it's used, it assumes that each object has a property called `tags` that's a list of strings. It checks if the string after the `#` is in that list. This seems to be a pretty common convention for tagged data.\n\n### TODO\n\nSee [issues](https://github.com/polm/philtre/issues). \n\n### Similar Work\n\n[Ghost Query Language](https://github.com/TryGhost/GQL) has basically the same goal but is intended for use via an HTTP API. \n\n### License\n\nWTFPL, do as you please. \n\n-POLM\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolm%2Fphiltre","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolm%2Fphiltre","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolm%2Fphiltre/lists"}