2012-05-19 10:59:38 +00:00
|
|
|
-- List of acceptable extentions
|
|
|
|
|
|
|
|
ext = {
|
|
|
|
djvuRead = ";djvu;",
|
|
|
|
pdfRead = ";pdf;xps;cbz;",
|
2012-08-27 12:14:22 +00:00
|
|
|
--creRead = ";epub;txt;rtf;htm;html;mobi;prc;azw;fb2;chm;pdb;doc;tcr;zip;"
|
2012-05-19 10:59:38 +00:00
|
|
|
-- seems to accept pdb-files for PalmDoc only
|
|
|
|
}
|
|
|
|
|
|
|
|
function ext:getReader(ftype)
|
|
|
|
local s = ";"
|
|
|
|
if ftype == "" then
|
|
|
|
return nil
|
|
|
|
elseif string.find(self.djvuRead,s..ftype..s) then
|
|
|
|
return DJVUReader
|
|
|
|
elseif string.find(self.pdfRead,s..ftype..s) then
|
|
|
|
return PDFReader
|
|
|
|
else
|
2012-08-27 12:14:22 +00:00
|
|
|
return CREReader
|
2012-05-19 10:59:38 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|