Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-25-2010, 09:25 AM   #1
myudkowsky
Enthusiast
myudkowsky began at the beginning.
 
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?"
myudkowsky is offline   Reply With Quote
Old 11-25-2010, 10:01 AM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
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.
Manichean is offline   Reply With Quote
Advert
Old 11-25-2010, 10:51 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,844
Karma: 22666666
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.
kovidgoyal is online now   Reply With Quote
Old 11-25-2010, 10:55 AM   #4
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
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.
wallcraft is offline   Reply With Quote
Old 11-25-2010, 02:00 PM   #5
myudkowsky
Enthusiast
myudkowsky began at the beginning.
 
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.
myudkowsky is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre extension - "print driver"? guiyoforward Calibre 5 09-06-2010 10:10 AM
File names with "(" and ")" can cause screen freezes greenapple Ectaco jetBook 5 02-04-2010 08:25 PM
"PK": Only text when I open in Sigil an ePub file generated with Calibre Terisa de morgan Sigil 3 12-14-2009 11:24 AM
Error message : "Invalid Format" " Do you want to format your internal memory" narbeauchamp Sony Reader 11 07-22-2009 12:39 PM
Help! the "Make Sony Reader File" under "Options" is different Dr. Drib Sony Reader 6 04-23-2007 02:56 AM


All times are GMT -4. The time now is 07:30 PM.


MobileRead.com is a privately owned, operated and funded community.