Closed mwoolweaver closed 3 years ago
@mwoolweaver @mmotti I'm still a learner so my python code isn't great :smile:
@anudeepND me too! With your 2.0 update you triggered my want to learn when I saw python and sql I couldn't resist giving it a go. Hopefully you don't mind the P/R's and hopefully I leave enough comments in my code that everyone can understand what is happening.
Also don't rush to merge this as I'd say it's still a WIP for it to accomplish it's title but I'm working towards the goal now. Almost have all logic worked out
let me know if I missed a case
@mwoolweaver so far everything looks good to me. I will keep this PR open for a while if someone wants to add anything
So I think I have all the logic worked out.
Here is my initial attempt at making it work https://github.com/mwoolweaver/whitelist/commit/20beea94455e85d12841822d585e01aaf064198f (it will say it is adding/deleting but it's not I want to make sure the logic works first)
worth noting is I haven't tried running this yet but my visual inspection thinks it should work, that could be wrong tho. . .
Please also note the changes I made to domains.sql --> https://github.com/mwoolweaver/whitelist/commit/1aef09682bda96746ebb6c8bc62e0a60995d4b3c so I could hopefully handle single INSERT
statements dynamically
ok so ~8 hours later i have a working version.
should do everything your current master does just selectively
https://github.com/mwoolweaver/whitelist/commit/5cc11338c676e501fb379fd0fa7ea36b90faa7c3
Again
please also note the changes I made to domains.sql --> https://github.com/mwoolweaver/whitelist/commit/1aef09682bda96746ebb6c8bc62e0a60995d4b3c so I could hopefully handle single
INSERT
statements dynamically
I modified whitelist.py
on this branch to use the mentioned domains.sql (see here mwoolweaver/whitelist branch sql-testing whitelist.py Line 7)
dynamically adding missing entries does work!!
closed in favor of #172
caveat