Skip to content

✨ Extract Kapitelnummern from .docx#38

Merged
hf-kklein merged 3 commits intomainfrom
kapitel
Mar 16, 2023
Merged

✨ Extract Kapitelnummern from .docx#38
hf-kklein merged 3 commits intomainfrom
kapitel

Conversation

@hf-kklein
Copy link
Copy Markdown
Contributor

No description provided.

Comment on lines +150 to +158
case "berschrift1":
chapter = next(chapter_counter)
section_counter = itertools.count(start=1)
subsection_counter = itertools.count(start=1)
case "berschrift2":
section = next(section_counter)
subsection_counter = itertools.count(start=1)
case "berschrift3":
subsection = next(subsection_counter)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

check the tests: the german "ü" is actually discarded

Comment on lines +41 to +46
("Kündigung Stromliefervertrag prüfen", EbdChapterInformation(chapter=6, section=1, subsection=1)),
("MaBiS-ZP Aktivierung prüfen", EbdChapterInformation(chapter=7, section=2, subsection=1)),
(
"Datenstatus nach Eingang einer AAÜZ vergeben",
EbdChapterInformation(chapter=7, section=61, subsection=2),
),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

diese drei einträge einfach mit der docx aus den unittests vergleichen

Copy link
Copy Markdown

@hf-krechan hf-krechan left a comment

Choose a reason for hiding this comment

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

Habe nur eine kleine Frage.
Sonst passt es für mich

Comment thread main.py
all_ebd_keys = get_all_ebd_keys(input_path)
for ebd_key in all_ebd_keys:
click.secho(f"Processing EBD '{ebd_key}'")
for ebd_key, (ebd_title, ebd_kapitel) in all_ebd_keys.items():
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Braucht es die Klammern um ebd_title, ebd_kapitel ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sonst hätte pycharm oder black sie entfernt. ich denke s liegt daran, dass ein item aus dem dctionary ein Tuple[Key, Value] ist und Value seinerseits ein Tuple[titel, kapitel].

@hf-kklein hf-kklein merged commit a67b3fa into main Mar 16, 2023
@hf-kklein hf-kklein deleted the kapitel branch March 16, 2023 15:06
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.

2 participants