Skip to content

Conversation

@brianxiadong
Copy link
Contributor

Summary

  • Added comprehensive support for Markdown (.md/.markdown) files in the audiobook generation workflow
  • Implemented automatic chapter parsing based on markdown headers with hierarchical structure support
  • Added YAML frontmatter metadata extraction for title, author, description, and publication date
  • Updated UI components to include markdown files in file dialogs and drag-drop functionality

Features Added

  • File Type Detection: Automatic recognition of .md and .markdown file extensions
  • Header-based Chapter Parsing: Converts markdown headers (# ## ### etc.) into navigable chapters
  • Hierarchical Structure: Maintains proper parent-child relationships based on header levels
  • Metadata Extraction: Parses YAML frontmatter for book metadata (title, author, description, date)
  • Smart Content Selection: Auto-selects chapters with significant content (>500 characters)
  • UI Integration: Updated file dialogs, drag-drop areas, and error messages to include markdown support

Technical Implementation

  • Extended HandlerDialog class to handle markdown file type
  • Added _preprocess_markdown_content() method for parsing markdown structure
  • Implemented _build_markdown_tree() for creating hierarchical chapter tree view
  • Added _get_markdown_selected_text() for text extraction with chapter markers
  • Updated file type detection logic across GUI components

examples:

image image image

@denizsafak
Copy link
Owner

This is looking very good, thank you so much! I will definitely merge this into the project after some testing 😋

@denizsafak denizsafak merged commit 196cd93 into denizsafak:main Sep 17, 2025
3 checks passed
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