Fix #35: Add hhmmss-based unique filename for structured.md send-to-repo #38
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Tasch/whisper-transcribe!38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "batch/35"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix #35: New naming conventions for *.md file
When sending to a repository, we now include the hhmmss timestamp in the filename to prevent overwrites when the same book title appears in multiple audio sessions.
Changes
extract_headings_for_filename(): Extract H1/H2/H3 respecting start-of-document rules (H1 only at doc start, H2 only at doc start or after H1, H3 only at doc start or after H2)build_filename_from_headings(): Build filename ashhmmss-h1[-h2[-h3]].md_build_structured_filename(): Combines folder_name time component (hhmmss from yyyymmdd_hhmmss) with headingssend_structured_to_repo(): Now uses_build_structured_filename()instead of simpleextract_title_from_markdown()Example
Folder:
20260418_162032MD content starts with:
Old filename:
Praxiseinstieg Machine Learning.md(would overwrite)New filename:
162032-Praxiseinstieg Machine Learning-Kapitel 3 Klassifikation-Absatz Klassifikatoren mit mehreren Kategorien.mdCloses #35
Reviewer: @SaschaFuksa
@ -31,2 +31,4 @@llm_config = app_config.get("llm", {})git_notes_config = app_config.get("git_notes", {})chunk_transcription_config = app_config.get("chunk_transcription", {})chunk_transcription_enabled_default = chunk_transcription_config.get("enabled", False)THIS IS NOT PART OF THIS PR!? REMOVE IT!
@ -58,6 +61,7 @@ class StartRecordingResponse(BaseModel):session_id: strmessage: strchunk_duration_sec: intchunk_transcription_enabled: bool = FalseNOT PART OF THIS PR, REMOVE!
@ -65,6 +69,7 @@ class StopRecordingResponse(BaseModel):status: strchunks_count: inttranscription: Optional[str] = Nonechunk_transcription_mode: bool = FalseNOT PART OF THIS PR, REMOVE!
@ -299,0 +338,4 @@h3: str | None = Noneline_idx = 0for line in lines:Very bad method design! Too long, very bad! Don't do bad code! And for line in lies: WILL go through the whole document! Requirement is, only to take a look at the START of the document (First ~7 lines)