11-25-2010, 10:25 AM | #1 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: Andoid
|
"Add new format" to text file without extension
I have a collection of files on my Linux and Mac computers that do not include the ".txt" extension. On Linux and Mac they're not needed.
I've added one such file to my Calibre library, but Calibre does not recognize the contents as plain text. AFAICT Calibre requires that the extension be present, otherwise the contents are treated as an unknown format and the file will contain no data. If I edit the metadata, I can "add new format," but that does not add formatting information about the current Calibre book. What "add new format" does is let me select a file on my computer that's in some format, and add that file to the Calibre book as an additional format. I will guess that the reason for "add new format" is to allow me as a user to select a nicely-formatted version of a particular format if one is available." But it does not tell Calibre that my current file is in text format, and I can't find any way to do this. The obvious solution is to change all my text files to have the extension .txt, but that's inelegant. I've read the user manuals and forums but I can't find any other solution. So... if I have a text file and I want to import it, can I do so without adding a ".txt?" |
11-25-2010, 11:01 AM | #2 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
I think you stumbled across an unhandled special case there. Tried to reproduce by adding a non-extension text file as a new book. The book got added, and the file copied to the library (checked in file manager), but no format entry was created for the book. Conversion and viewing thus wouldn't work, since there was no format entry. Interestingly enough, the file got deleted okay when I deleted the book, although it may be that calibre just wiped the entire directory.
Practically speaking, I don't think there's anything you can do about it other than appending the extension to the files. This calls, in my eyes, for one of the developers to step in- I think something in the order of a dialog box stating that the file is of unknown format and asking the user to manually specify the format would be an elegant solution. |
Advert | |
|
11-25-2010, 11:51 AM | #3 |
creator of calibre
Posts: 44,653
Karma: 24966646
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, you have to specify an extension. I have no desire to implement support for non-extensioned files. Patches welcome.
|
11-25-2010, 11:55 AM | #4 |
reader
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
Calibre creates its own copy of the file, so I suggest you also create your own copy with .txt added, import it to Calibre and then delete it.
|
11-25-2010, 03:00 PM | #5 |
Enthusiast
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: Andoid
|
Thanks everyone for your help. I'll find a way to import this correctly, and maybe even supply a patch one day.
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre extension - "print driver"? | guiyoforward | Calibre | 5 | 09-06-2010 11:10 AM |
File names with "(" and ")" can cause screen freezes | greenapple | Ectaco jetBook | 5 | 02-04-2010 09:25 PM |
"PK": Only text when I open in Sigil an ePub file generated with Calibre | Terisa de morgan | Sigil | 3 | 12-14-2009 12:24 PM |
Error message : "Invalid Format" " Do you want to format your internal memory" | narbeauchamp | Sony Reader | 11 | 07-22-2009 01:39 PM |
Help! the "Make Sony Reader File" under "Options" is different | Dr. Drib | Sony Reader | 6 | 04-23-2007 03:56 AM |