This commit is contained in:
2026-03-21 15:50:41 +01:00
parent 5704329f04
commit 922d0499fc
3 changed files with 7 additions and 24 deletions

View File

@@ -10,8 +10,7 @@ requires-python = ">=3.12"
dependencies = [
"pillow==12.1.1",
"pydantic==2.12.5",
# "pandas==3.0.1",
# "openpyxl>=3.1.0",
"openpyxl>=3.1.0",
]
[project.optional-dependencies]

View File

@@ -3,8 +3,7 @@ import argparse
from pydantic import ValidationError
from beaky.config import Config
from beaky.scanner.scanner import Scanner
from beaky.scanner.scanner import Links
def main() -> None:
parser = argparse.ArgumentParser(
@@ -20,7 +19,10 @@ def main() -> None:
print(e)
return
Scanner(config)
data = Links(config.path)
data.ret_links()
for link in data:
print(link)
if __name__ == "__main__":
main()

View File

@@ -5,24 +5,6 @@ from openpyxl import load_workbook
from pydantic.dataclasses import dataclass
from beaky.config import Config
from beaky.datamodels.ticket import Scan
@dataclass
class Scanner:
def __init__(self, config: Config):
self._path = config.path
def scan(self) -> Scan:
"""
:param path: Path to screenshot of ticket
:return:
"""
pass
o = Scan(date=datetime.now(), event_name = "neco")
return o
@dataclass
@@ -79,7 +61,7 @@ class Links:
except Exception:
pass
# Try common formats
for fmt in ("%Y-%m-%d", "%d.%m.%Y", "%d/%m/%Y", "%m/%d/%Y", "%Y/%m/%d"):
for fmt in ("%Y-%m-%d", "%d.%m.%Y", "%d/%m/%Y", "%m/%d/%Y", "%Y/%m/%d", "%d.%m.%Y %H:%M"):
try:
return datetime.strptime(s, fmt)
except Exception: