trufflehog
v0.0.5
Published
Search for new subreddit posts that match your criteria
Downloads
43
Readme
trufflehog
🐖 Search for new subreddit posts that match your criteria
Getting Started
Install:
npm i -g trufflehog
Run:
trufflehog
Respond to the prompts to configure trufflehog, or see the config file options below.
Config Properties
subredditName
- The subreddit name to search inuseBodySearch
- Whether to search the post body in addition to the titleuseRegex
- Whether to use regex or regular string for the searchuseCaseSensitive
- Whether the search will be case-sensitive or notsearchString
- The text or regex string to search forpollingFrequency
- How frequently to perform the search in seconds, between 1 and 86400useNotifications
- Whether to receive email notifications when a match is found (not yet implemented)
Config File Options
You can configure trufflehog by passing the filepath to the config file. Trufflehog accepts JSON and .env
config files. If your config file is missing a setting that is required, trufflehog will prompt you for the setting.
JSON
trufflehog -c path/to/config.json
or trufflehog --config path/to/config.json
{
"subredditName": "news",
"useBodySearch": true,
"useRegex": true,
"useCaseSensitive": true,
"searchString": "[a-zA-Z]{2,4}",
"pollingFrequency": 10,
"useNotifications": false
}
.env
trufflehog -c path/to/.env
or trufflehog --config path/to/.env
subredditName=news
useBodySearch=true
useRegex=true
useCaseSensitive=true
searchString=[a-zA-Z]{2,4}
pollingFrequency=10
useNotifications=false
To Do
- Add user notifications (Email, SMS, Push)
- Allow defining multiple search rules to match against
- Enable multiple search queries to run simultaneously
- Support searching other post types (not just new posts)