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

Epubs with references do not convert properly #69

Open
estrellagus opened this issue Jun 17, 2024 · 2 comments
Open

Epubs with references do not convert properly #69

estrellagus opened this issue Jun 17, 2024 · 2 comments

Comments

@estrellagus
Copy link

Checking a few books that have references and citation links (to other parts of the book) do not process properly. The citation links are each read first, and then none of the text on the chapter is converted.

I have included a sample open source pub that shows the issue.
georgia-pls-ssml.epub.zip

Suspect this is an issue with the public library OR how being called but beyond my programming abilities.

@estrellagus
Copy link
Author

Did some more digging running with debug mode and text output, and noted that the spoken text is preceded by the code '@brk#'. So, just as a test added a global replace for this phrase and now the file is properly processed.

So on file pub_book_parser.py, added the code below on line 68 -

        # replace break characters with a newline. 
        cleaned_text = re.sub(r'@BRK#' , '\n' , cleaned_text)

So far all the testing is working for me across many files.

@p0n1
Copy link
Owner

p0n1 commented Jun 21, 2024

Nice. Will try your fix. Thanks!

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

No branches or pull requests

2 participants