Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 12-11-2010, 04:03 PM   #1
marcostt
Member
marcostt began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Aug 2009
Device: iphone
creating epub: updating file

Hi.
First at all, sorry about my english.

I create my epub with sigil. No problem until someone told me that the epubs lost the spanish tildes (accents, á, é...) in some ereaders like Sony Reader. I could not found why, but, anyway, I try to resolve it changing accentes by code. I work in iMac, and:

- Unzip the epub, and it is created a folder with the name of the epub.
- Open the folder, open the folder called OEBPS and then the folder Texts.
- I did open all the text files and changed the á, é... for á é...

But I have now problem, sure a stupid problem: I dont know how to update the epub, how to get create an epub file with theses text files modifieds.

Please, can someone explain me how to get it?

Thanks in advance,
Marcos
marcostt is offline   Reply With Quote
Old 12-11-2010, 07:47 PM   #2
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Rename the original epub file, just in case you need to go back to it.

Inside the folder you created when you unzipped the epub file, create a new zip file with the filename you want to use for the epub file, but with the file extension .zip.

First, add the "mimetype" file to the zip file.

Then add the rest of the contents of the folder, including the sub-folders, to the zip file.

Finally, change the file extension of the new zip file to .epub.

You should now have a revised version of your epub file, with the changes you made.
DMSmillie is offline   Reply With Quote
Advert
Old 12-11-2010, 10:24 PM   #3
Ankh
Guru
Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.
 
Ankh's Avatar
 
Posts: 714
Karma: 2003751
Join Date: Oct 2008
Location: Ottawa, ON
Device: Kobo Glo HD
Quote:
Originally Posted by DMSmillie View Post
First, add the "mimetype" file to the zip file.

Then add the rest of the contents of the folder, including the sub-folders, to the zip file.

That is not precise enough according to the standard. Although some of the reading platforms might read non-standard epub files.

The rules for the "mimetype" file are defined in Open Container Format, and the text of interest (bold text used for emphasis, my intervention):
Quote:
The first file in the ZIP Container MUST be a file by the ASCII name of ‘mimetype’ which holds the MIME type for the ZIP Container (i.e., “application/epub+zip” as an ASCII string; no padding, white-space or case change). The file MUST be neither compressed nor encrypted and there MUST NOT be an extra field in its ZIP header.
So, using command line zip utility, the proper command to add "mimetype" to the archive, while positioned to the directory/folder containing the file is:
zip -X0 <some other directory>\<name_of_the_target_file>.epub mimetype

Note that archive is created in some other directory, which simplifies the next step, adding the rest of the files to the same archive:
zip -Xur9D <some other directory>\<name_of_the_target_file>.epub *

Last edited by Ankh; 12-12-2010 at 01:43 PM.
Ankh is offline   Reply With Quote
Old 12-12-2010, 04:32 AM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Ankh View Post
Now, parameter 8 is the correct value based on this part of the standard:
Hmm... I was not aware of this requirement. I've been creating my ePUBs with 9 since the beginning, and neither epubcheck nor flightcrew have complained. Maybe they should be updated.
Jellby is offline   Reply With Quote
Old 12-12-2010, 12:29 PM   #5
Ankh
Guru
Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.
 
Ankh's Avatar
 
Posts: 714
Karma: 2003751
Join Date: Oct 2008
Location: Ottawa, ON
Device: Kobo Glo HD
I really don't know what to say, Jellby.

The discussion is entering the realm what is more important, a purist approach to follow the standard "to the letter", or creation of ePub file that works on real implementations of the said standard. I personally don't understand the technical reason why the standard is enforcing, and so strongly, the value of "8". I am also unaware of the implementation that does not accept value "9".

The question is, should the epubcheck and flightcrew be updated, or should we petition the IDPF to accept the experiences of the actual implementation relaxing the requirement in the process?

Last edited by Ankh; 12-12-2010 at 12:38 PM.
Ankh is offline   Reply With Quote
Advert
Old 12-12-2010, 01:42 PM   #6
Ankh
Guru
Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.Ankh ought to be getting tired of karma fortunes by now.
 
Ankh's Avatar
 
Posts: 714
Karma: 2003751
Join Date: Oct 2008
Location: Ottawa, ON
Device: Kobo Glo HD
Quote:
Originally Posted by Ankh View Post
The question is, should the epubcheck and flightcrew be updated, or should we petition the IDPF to accept the experiences of the actual implementation relaxing the requirement in the process?
What a mess... I decided to follow through on contacting IDPF. So before doing that, I went on to verify that command line zip parameter is really matching the value in local header, mentioned in the spec. It is not. The compression method field in the header, in the current zip source, can have values:
0-Store
8-Deflate
12-bzip2

So, the standard is prohibiting using bzip2 compression, or any new compression that might be added to the Zip utility at the later date. Which is sensible, as it enforces the known baseline that can be met today and in the future.

The numbered parameters in zip command line utility provide a trade-off between compression speed and compression efficacy. -0 will force "store" method, anything else will use "deflate". So, even if you use value "9", the local header (one for each compressed file) field, mentioned in the spec, will be assigned a value of 8, satisfying spec requirement. What will create a non-standard file and break this requirement is using parameter "-Z bzip2", which is not suggested by any internet epub creation guide.

I do apologize for the mess that I created. My original message will be modified to remove FUD that I created.
Ankh is offline   Reply With Quote
Old 12-12-2010, 03:54 PM   #7
marcostt
Member
marcostt began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Aug 2009
Device: iphone
Thanks

Thanks you very much; I'll try to do it as you said.

Bye
marcostt is offline   Reply With Quote
Old 12-13-2010, 11:05 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Thanks, Ankh. I was suspecting something along those lines, since I found that in the python module, zipfile.ZIP_STORED=0 and zipfile.ZIP_DEFLATED=8
Jellby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a mobi file with hyperlinks. jimbbq Amazon Kindle 11 09-29-2010 03:53 PM
epub to epub (updating book) Fith Calibre 4 04-02-2010 10:43 AM
Error creating a new database file Warriah iRex 0 06-22-2009 06:29 PM
Zipped HTML only creating file with one page Katelyn Calibre 3 08-27-2008 03:35 PM
Creating a TOC from an LRF file... fizzlepop Sony Reader Dev Corner 9 04-27-2008 02:42 PM


All times are GMT -4. The time now is 11:17 AM.


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