File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 11import sys
22import asyncio
33import importlib .metadata
4+ import warnings
45
56import asyncclick as click
7+ from bs4 import XMLParsedAsHTMLWarning
68from ebooklib import epub
79
810from stas_ln_translator import config , translator , process
911
12+ warnings .filterwarnings ("ignore" , category = XMLParsedAsHTMLWarning )
13+
1014
1115# Call back for validating file need to have '.epub' file extension
1216def validate_epub_file (ctx , param , value ):
Original file line number Diff line number Diff line change 11import asyncio
2- import warnings
32
4- from bs4 import BeautifulSoup , XMLParsedAsHTMLWarning
3+ from bs4 import BeautifulSoup
54import httpx
65from tqdm .asyncio import tqdm_asyncio
76from ebooklib import epub
87
98from stas_ln_translator import config , process , connection
109
11- warnings .filterwarnings ("ignore" , category = XMLParsedAsHTMLWarning )
12-
1310
1411async def translate_epub (book : epub .EpubBook ) -> dict [str , BeautifulSoup ]:
1512 documents = process .get_all_documents_in_epub (book )
You can’t perform that action at this time.
0 commit comments