arauchfuss / Simple-Comic

OS X comic viewer
http://dancingtortoise.com/simplecomic/
MIT License
1.09k stars 224 forks source link

Should be able to open files irrespective of file extension #103

Open elmimmo opened 9 years ago

elmimmo commented 9 years ago

Simple Comic refuses to open files whose file extensions are not any that it recognizes.

Comics sold as EPUB files are plenty of times effectively a CBZ file, as they contain a sequence of image files that are enough to render all the content appropriately, the extra HTML, CSS and XML files being just an EPUB requirement that a CBZ reader can do without. Simple Comic will refuse to open them even when trying to force-open them (drag & drop on Simple Comic's icon in the Dock while pressing the option/alt key, or sending the file to Simple Comic with Alfred, LaunchBar, Terminal or others).

If the problem is that Simple Comic does not know what format they are in order to determine how to open them because it bases that assumption on file extension, Simple Comic could instead read the first bytes of such files in search of a header, which all ZIP files have irrespective of their filename.

arauchfuss commented 7 years ago

Having Simple Comic open any file format regardless of UTI or extension is not the best idea. I will look into how EPUB comics work though.

elmimmo commented 7 years ago

I am not that suggesting Simple Comic registers itself as being able to open any file, but that it attempts to if forced to open a certain file (like via drag & drop on Simple Comic's icon in the Dock while pressing the option/alt key, or sending the file to Simple Comic with Alfred, LaunchBar, Terminal or others). There are many kind of files that are ZIP files containing images that do not have .cbz or .zip in their file file name.

arauchfuss commented 7 years ago

I will look into it, but no promises.