Allow direct conversion of .azw books without having to rename them to .prc

This commit is contained in:
Kovid Goyal 2009-02-16 13:06:33 -08:00
parent dd97daee8e
commit 20516bdaa1
3 changed files with 5 additions and 2 deletions

View File

@ -124,6 +124,7 @@ MAP = {
'lit' : lit2opf,
'mobi' : mobi2opf,
'prc' : mobi2opf,
'azw' : mobi2opf,
'fb2' : fb22opf,
'rtf' : rtf2opf,
'txt' : txt2opf,
@ -131,7 +132,8 @@ MAP = {
'epub' : epub2opf,
'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):
extract(path, tdir)

View File

@ -29,6 +29,7 @@ preferred_source_formats = [
'XHTM',
'XHTML',
'PRC',
'AZW',
'RTF',
'PDF',
'TXT',

View File

@ -154,7 +154,7 @@ def process_file(path, options, logger=None):
convertor = txt2lrf
elif 'epub' == ext:
convertor = epub2lrf
elif ext in ['mobi', 'prc']:
elif ext in ['mobi', 'prc', 'azw']:
convertor = mobi2lrf
elif ext == 'fb2':
convertor = fb22lrf