Skip to content

feat: allow to export to epub - #281

Open
fseitun wants to merge 1 commit into
Ardour:masterfrom
fseitun:allow-export-to-epub
Open

feat: allow to export to epub#281
fseitun wants to merge 1 commit into
Ardour:masterfrom
fseitun:allow-export-to-epub

Conversation

@fseitun

@fseitun fseitun commented Mar 2, 2026

Copy link
Copy Markdown
  • Allow to export to epub
  • Handle missing images gracefully
image image

Comment thread build.py
Comment on lines +733 to +743

def drop_missing_images(html, site_dir):
def repl(m):
fpath = site_dir + 'images/' + m.group(1)
if os.path.isfile(fpath):
return m.group(0)
return '<span class="missing-image">[Image: ' + m.group(1) + ' not found]</span>'
return re.sub(r'<img[^>]*\ssrc="images/([^"]+)"[^>]*>', repl, html)

pdfpage = drop_missing_images(pdfpage, global_site_dir)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Image

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