mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Allow direct conversion of .azw books without having to rename them to .prc
This commit is contained in:
parent
dd97daee8e
commit
20516bdaa1
@ -124,6 +124,7 @@ MAP = {
|
|||||||
'lit' : lit2opf,
|
'lit' : lit2opf,
|
||||||
'mobi' : mobi2opf,
|
'mobi' : mobi2opf,
|
||||||
'prc' : mobi2opf,
|
'prc' : mobi2opf,
|
||||||
|
'azw' : mobi2opf,
|
||||||
'fb2' : fb22opf,
|
'fb2' : fb22opf,
|
||||||
'rtf' : rtf2opf,
|
'rtf' : rtf2opf,
|
||||||
'txt' : txt2opf,
|
'txt' : txt2opf,
|
||||||
@ -131,7 +132,8 @@ MAP = {
|
|||||||
'epub' : epub2opf,
|
'epub' : epub2opf,
|
||||||
'odt' : odt2epub,
|
'odt' : odt2epub,
|
||||||
}
|
}
|
||||||
SOURCE_FORMATS = ['lit', 'mobi', 'prc', 'fb2', 'odt', 'rtf', 'txt', 'pdf', 'rar', 'zip', 'oebzip', 'htm', 'html', 'epub']
|
SOURCE_FORMATS = ['lit', 'mobi', 'prc', 'azw', 'fb2', 'odt', 'rtf',
|
||||||
|
'txt', 'pdf', 'rar', 'zip', 'oebzip', 'htm', 'html', 'epub']
|
||||||
|
|
||||||
def unarchive(path, tdir):
|
def unarchive(path, tdir):
|
||||||
extract(path, tdir)
|
extract(path, tdir)
|
||||||
|
@ -29,6 +29,7 @@ preferred_source_formats = [
|
|||||||
'XHTM',
|
'XHTM',
|
||||||
'XHTML',
|
'XHTML',
|
||||||
'PRC',
|
'PRC',
|
||||||
|
'AZW',
|
||||||
'RTF',
|
'RTF',
|
||||||
'PDF',
|
'PDF',
|
||||||
'TXT',
|
'TXT',
|
||||||
|
@ -154,7 +154,7 @@ def process_file(path, options, logger=None):
|
|||||||
convertor = txt2lrf
|
convertor = txt2lrf
|
||||||
elif 'epub' == ext:
|
elif 'epub' == ext:
|
||||||
convertor = epub2lrf
|
convertor = epub2lrf
|
||||||
elif ext in ['mobi', 'prc']:
|
elif ext in ['mobi', 'prc', 'azw']:
|
||||||
convertor = mobi2lrf
|
convertor = mobi2lrf
|
||||||
elif ext == 'fb2':
|
elif ext == 'fb2':
|
||||||
convertor = fb22lrf
|
convertor = fb22lrf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user