-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File based filter configuration #606
base: develop
Are you sure you want to change the base?
Conversation
Great ideas. Would be nice to have a file dedicated for multiple filters (filters.json) which could support rules for each filter.
So we could have hundreds of different predefined filters in a single file. channels.json could work as you described, defining which filter contained in filters.json would be used for each channel and a new option: specific template
idk if possible but will be nice if accept uses Just to be clear to future participants in this conversation: a lot of my ideas I saw in PA. |
Thanks - that is very close to what I'm trying to do. Rather than have one big file though, I prefer the idea of individual filter files which can be shared. I had thought of the 'based_on' capability to change - eg templates or other details but perhaps template optionally being specified somewhere else, eg in the channels file means that the 'based_on' isn't so important. Your examples above are all possible; only thing that I hadn't considered is pokemon excludes rather than positive inclusion. Underlying all this the filters are translated to poracle tracking (which is inclusive only). I'm not sure if hiding this is useful as if the pokemon in monsters.json expands for whatever reason without a resync they would be missed. Thoughts about whether exclusions are helpful very welcome! It already accepts %multiplechannels, specific-channels and channel-ids so sounds like I'm quite close. |
Question: the filters are still being set in the database and the files only have to create these records in the db or will they be filtered directly in the json files? |
Yes, absolutely the intention is that the file based configuration feeds into existing tracking database, so there are no changes to the alerting part of Poracle. |
- Adds wildcard support for Pokemon, Raids, Eggs, Gyms, and Invasions - Fixes generating scripts to work with Windows again - Fixes key issue when in Mobile mode in the adv menu - Fixes default with_ar issue for MAD - Fixes removing location when leaving the webhook menu Requires KartulUdus/PoracleJS#606
# Conflicts: # src/controllers/gym.js
- Gyms - Raids - Eggs - Code borrowed from #606, to merge in faster Co-Authored-By: James Berry <[email protected]> Co-authored-by: James Berry <[email protected]>
Have you ever wished you could configure Poracle channels more easily?
This is an experiment that might change quite a bit before finally committed. But there is no database migration so let's keep playing until we get to the right solution.
!copy
command. You can!copy to <id> <id>
to copy the current channel config to another channel(s). You can use names, hook names, or ids. Probably should do #channel mentions but I haven't done that yet. You can!copy from <id>
to overwrite this channel with another channel's config.!addfilter name
.!channelsync
Filter configuration
The filters folder contains filters. It'd be nice to have a few in the defaults folder.
Here is my hundos.json test filter:
I'll document more fully how to use it later (and will make some things easier) - for now it's mostly database fields - you can see src\lib\filters.js - only pokemon currently supported.
One thing you an do is have a filter based on another and override values:
channels.json
This file, in the config folder, defines a whole set of channel configs. Clones work like copy to - the source id is first and must be a proper id (?perhaps it should be able to be a webhook name too?). The array of destinations can use the % wildcards like apply and the copy to command.
The filters are the matching channels and then filters that will be applied directly. There is no way to override the areas in here or a template file, I figure those would be preset when you create the channel? Comments please