-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[enh] add examples and fix postprocessor
[mod] remove not needed functions [enh] about project
- Loading branch information
Showing
15 changed files
with
770 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
httpx | ||
# apprise is options - used for notifications | ||
apprise | ||
# apprise is optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/usr/bin/python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright 2023-2024 Allen Dema | ||
from __future__ import annotations | ||
|
||
import os | ||
import sys | ||
import logging | ||
from pathlib import Path | ||
from datetime import datetime | ||
|
||
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) | ||
PROJECT_ROOT = os.path.dirname(PROJECT_DIR) | ||
DATA_FOLDER = os.path.join(os.path.dirname(PROJECT_ROOT), "data") | ||
|
||
sys.path.append(PROJECT_ROOT) | ||
|
||
from rewe import STORE | ||
from parser import Parser | ||
from postprocessor.metadata import MetadataPP | ||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
def main(): | ||
my_store = STORE(store_id="8534540") | ||
query = "ja" | ||
|
||
todays_date = datetime.today().strftime("%Y-%m-%d") | ||
this_file = Path(__file__).stem | ||
|
||
paginated = list(my_store.search(query, max_page=1)) | ||
|
||
for page, response in enumerate(paginated, 1): | ||
options = { | ||
"directory": DATA_FOLDER, | ||
"filename": f"{this_file}-{query}-{page:02}-{todays_date}.json", | ||
"mode": "json", | ||
"ident": 4, | ||
} | ||
|
||
MetadataPP(response, options=options).run() | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters