Changed folder structure

This commit is contained in:
slashtechno 2023-08-01 00:55:57 -05:00
parent 8d2d481de1
commit ca35c09c4d
Signed by: slashtechno
GPG Key ID: 8EC1D9D9286C2B17
8 changed files with 9 additions and 5 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ blocklists/*
!blocklists/.gitkeep !blocklists/.gitkeep
tmp.py tmp.py
.venv .venv
testtmp

View File

@ -112,10 +112,10 @@ def upload_to_cloudflare(args):
def delete_from_cloudflare(args): def delete_from_cloudflare(args):
logger.info("Deleting from Cloudflare") logger.info("Deleting from Cloudflare")
rules = utils.utils.get_gateway_rules(ACCOUNT_ID, TOKEN) rules = utils.utils.get_gateway_rules(ACCOUNT_ID, TOKEN)
utils.delete.delete_adblock_policy(rules, ACCOUNT_ID, TOKEN) utils.delete_adblock_zerotrust.delete_adblock_policy(rules, ACCOUNT_ID, TOKEN)
lists = utils.utils.get_lists(ACCOUNT_ID, TOKEN) lists = utils.utils.get_lists(ACCOUNT_ID, TOKEN)
lists = utils.utils.filter_adblock_lists(lists) lists = utils.utils.filter_adblock_lists(lists)
utils.delete.delete_adblock_list(lists, ACCOUNT_ID, TOKEN) utils.delete_adblock_zerotrust.delete_adblock_list(lists, ACCOUNT_ID, TOKEN)
if __name__ == "__main__": if __name__ == "__main__":
cli() cli()

View File

@ -1,3 +1,3 @@
from .utils import * from .utils import *
from .upload import * from .upload import *
from .delete import * from .delete_adblock_zerotrust import *

View File

@ -5,7 +5,10 @@ description = "Serverless adblocking via Cloudflare Zero Trust Gateway"
authors = ["slastechno <77907286+slashtechno@users.noreply.github.com>"] authors = ["slastechno <77907286+slashtechno@users.noreply.github.com>"]
license = "MIT" license = "MIT"
readme = "README.md" readme = "README.md"
packages = [{include = "src"}] packages = [{include = "cloudflare_gateway_adblocking"}]
[tool.poetry.scripts]
cloudflare-gateway-adblocking = "cloudflare_gateway_adblocking.__main__:cli"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.10" python = "^3.10"