xd
This commit is contained in:
@@ -10,8 +10,7 @@ requires-python = ">=3.12"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"pillow==12.1.1",
|
"pillow==12.1.1",
|
||||||
"pydantic==2.12.5",
|
"pydantic==2.12.5",
|
||||||
# "pandas==3.0.1",
|
"openpyxl>=3.1.0",
|
||||||
# "openpyxl>=3.1.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ import argparse
|
|||||||
from pydantic import ValidationError
|
from pydantic import ValidationError
|
||||||
|
|
||||||
from beaky.config import Config
|
from beaky.config import Config
|
||||||
from beaky.scanner.scanner import Scanner
|
from beaky.scanner.scanner import Links
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
@@ -20,7 +19,10 @@ def main() -> None:
|
|||||||
print(e)
|
print(e)
|
||||||
return
|
return
|
||||||
|
|
||||||
Scanner(config)
|
data = Links(config.path)
|
||||||
|
data.ret_links()
|
||||||
|
for link in data:
|
||||||
|
print(link)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -5,24 +5,6 @@ from openpyxl import load_workbook
|
|||||||
from pydantic.dataclasses import dataclass
|
from pydantic.dataclasses import dataclass
|
||||||
|
|
||||||
from beaky.config import Config
|
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
|
@dataclass
|
||||||
@@ -79,7 +61,7 @@ class Links:
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
# Try common formats
|
# 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:
|
try:
|
||||||
return datetime.strptime(s, fmt)
|
return datetime.strptime(s, fmt)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user