Shitload of new overlays

E621 search with blacklist
This commit is contained in:
Michał Gdula 2023-09-11 19:38:11 +01:00
parent cc87c3e0ba
commit 960f452e4a
12 changed files with 179 additions and 14 deletions

View file

@ -55,7 +55,7 @@ IMAGE_EXTENSIONS = ["png", "jpg", "jpeg", "webp"]
IMAGE_OVERLAYS = {
"bubble": {
"path": os.path.join(ASSETS_PATH, "bubble.png"),
"path": os.path.join(ASSETS_PATH, "overlays", "bubble.png"),
"options": [
"default", # Positioned at top
"bottom", # Positioned at bottom
@ -64,23 +64,37 @@ IMAGE_OVERLAYS = {
],
},
"gang": {
"path": os.path.join(ASSETS_PATH, "gang.png"),
"path": os.path.join(ASSETS_PATH, "overlays", "gang.png"),
"options": ["default"],
},
"bandicam": {
"path": os.path.join(ASSETS_PATH, "bandicam.png"),
"path": os.path.join(ASSETS_PATH, "overlays", "bandicam.png"),
"options": ["default"],
},
"jerma": {
"path": os.path.join(ASSETS_PATH, "jerma.png"),
"path": os.path.join(ASSETS_PATH, "overlays", "jerma.png"),
"options": ["default"],
},
"jerm-a": {
"path": os.path.join(ASSETS_PATH, "jerm-a.png"),
"path": os.path.join(ASSETS_PATH, "overlays", "jerm-a.png"),
"options": ["default"],
},
"liveleak": {
"path": os.path.join(ASSETS_PATH, "liveleak.png"),
"path": os.path.join(ASSETS_PATH, "overlays", "liveleak.png"),
"options": ["default"],
},
}
E621_API_KEY = (
dotenv.dotenv_values(".env").get("E621_API_KEY")
or os.environ.get("E621_API_KEY")
or None
)
E621_USERNAME = (
dotenv.dotenv_values(".env").get("E621_USERNAME")
or os.environ.get("E621_USERNAME")
or None
)
E621_BLACKLIST = set()
with open(os.path.join(ASSETS_PATH, "e621_blacklist.txt"), "r") as f:
[E621_BLACKLIST.add(line.strip()) for line in f.readlines() if line.strip()]