Skip to content

Commit

Permalink
rtf support added
Browse files Browse the repository at this point in the history
  • Loading branch information
codeperfectplus committed Apr 25, 2023
1 parent 72ee872 commit bed44ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions audiobook/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
speak_text,
txt_to_json,
write_json_file,
rtf_to_json
)

logger = logging.getLogger("PyPDF2")
Expand Down Expand Up @@ -86,6 +87,8 @@ def create_json_book(self, input_book_path, password=None, load_from_library=Fal
json_book, metadata = html_to_json(input_book_path)
elif input_book_path.endswith((".docx", ".doc")):
json_book, metadata = docs_to_json(input_book_path)
elif input_book_path.endswith(".rtf"):
json_book, metadata = rtf_to_json(input_book_path)
else:
raise NotImplementedError("Only PDF, TXT, EPUB, MOBI, ODT, HTTP, DOCX and DOC files are supported")

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

project = 'audiobook'
author = 'Deeapk Raj'
release = '3.0.2'
release = '3.0.3'

extensions = [
'sphinx.ext.autodoc',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setuptools.setup(
name="audiobook",
version="3.0.2",
version="3.0.3",
author="CodePerfectPlus",
author_email="[email protected]",
description="Listen to your favourite audiobook",
Expand Down

0 comments on commit bed44ca

Please sign in to comment.