Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: switch from edi-energy.de and scraping to bdew-mako.de and a real API; drop support for Python 3.9 #261

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

hf-kklein
Copy link
Contributor

@hf-kklein hf-kklein commented Jan 8, 2025

bitte einmal die mwe.py ausführen und überzeugen, dass es gut ist :)

bitte insbesondere auf die dateinamen achten, ob da aus eurer sicht alles wesentliche drin ist, zB. dass @hf-krechan @DeltaDaniel und @OLILHR daraus ableiten können, welches das richtige dokument für kohlrahbi, ahlbatross etc. ist.

@@ -2,7 +2,7 @@
__pycache__/
*.py[cod]
*$py.class

foo
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see the mwe.py

@hf-kklein hf-kklein self-assigned this Jan 8, 2025
@hf-kklein hf-kklein changed the title feat: switch from edi-energy.de and scraping to bdew-mako.de and a real API feat: switch from edi-energy.de and scraping to bdew-mako.de and a real API; drop support for Python 3.9 Jan 8, 2025
Comment on lines +160 to +170
placeholder_values = {
"publication_date": (self.publicationDate or self.gueltig_ab).strftime("%Y%m%d"),
"from_date": self.gueltig_ab.strftime("%Y%m%d"),
"to_date": self.gueltig_bis.strftime("%Y%m%d"),
"extension": self.file_extension,
"id": str(self.fileId),
"kind": self.file_kind or self.alternative_file_kind,
"edifact_format": (self.edifact_format + "_" if self.edifact_format else ""),
"version": self.document_version or "NV",
}
return "{kind}_{edifact_format}{version}_{to_date}_{from_date}_{publication_date}_{id}.{extension}".format(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hier könnt ihr frei definieren, was wir alles in den dateinamen reinstecken.
mein innerer konflikt ist:

  • entweder wir überladen den dateinamen mit allem was wir so brauchen
  • oder wir legen die (aufbereiteten) metadaten in einer extra datei neben den PDFs und DOCx ab und lassen die "clients" diese metadaten dann separat einlesen.

"edifact_format": (self.edifact_format + "_" if self.edifact_format else ""),
"version": self.document_version or "NV",
}
return "{kind}_{edifact_format}{version}_{to_date}_{from_date}_{publication_date}_{id}.{extension}".format(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant