| 
			
			 | 
		#1 | 
| 
			
			
			
			 Member Retired 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61 
				Karma: 47166 
				Join Date: Sep 2018 
				
				
				
				Device: a lot 
				
				
				 | 
	
	
	
		
		
			
			 
				
				故事主要描述當伐木
			 
			
			
			故事主要描述當伐木
		 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Last edited by PenguinCEO; 05-03-2020 at 05:43 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,763 
				Karma: 24088559 
				Join Date: Dec 2010 
				
				
				
				Device: Kindle PW2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 frumious Bandersnatch 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,570 
				Karma: 20150435 
				Join Date: Jan 2008 
				Location: Spaniard in Sweden 
				
				
				Device: Cybook Orizon, Kobo Aura 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			My base script: 
		
	
		
		
		
		
		
		
		
		
		
		
	
	Code: 
	zip -X0 "${FILENAME}.epub" mimetype
zip -X9Dr "${FILENAME}.epub" META-INF OEBPS
advzip -z -4 "${FILENAME}.epub"
 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Sigil Developer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,072 
				Karma: 6361556 
				Join Date: Nov 2009 
				
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			FWIW, epub3 spec does not require an OEBPS folder or even any folder at all.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#5 | 
| 
			
			
			
			 Member Retired 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61 
				Karma: 47166 
				Join Date: Sep 2018 
				
				
				
				Device: a lot 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			故事主要描述當伐木
		 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Last edited by PenguinCEO; 05-03-2020 at 05:43 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#6 | |
| 
			
			
			
			 Bibliophagist 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,175 
				Karma: 174315444 
				Join Date: Jul 2010 
				Location: Vancouver 
				
				
				Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 To quote the epub 3.2 OCF ZIP Container specification: 4.3 OCF ZIP Container Media Type Identification The first file in the OCF ZIP Container MUST be the mimetype file, which meets the following requirements: The contents of the mimetype file MUST be the MIME media type [RFC2046] string application/epub+zip encoded in US-ASCII [US-ASCII]. The mimetype file MUST NOT contain any leading or trailing padding or white space. The mimetype file MUST NOT begin with the Unicode byte order mark U+FEFF. The mimetype file MUST NOT be compressed or encrypted, and there MUST NOT be an extra field in its ZIP header.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Klak 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 174 
				Karma: 150374 
				Join Date: Sep 2011 
				Location: Belgrade, Serbia 
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			i think that advzip does not recompress stored files and mimetype is stored.  
		
	
		
		
		
		
		
		
		
		
		
		
	
	for someone advzip could be finishing "touch" to epub before sending it to client or wahtever....  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 Member Retired 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61 
				Karma: 47166 
				Join Date: Sep 2018 
				
				
				
				Device: a lot 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			故事主要描述當伐木
		 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Last edited by PenguinCEO; 05-04-2020 at 06:28 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Klak 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 174 
				Karma: 150374 
				Join Date: Sep 2011 
				Location: Belgrade, Serbia 
				
				
				Device: many 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I tend not to read documentation. Have you tested it?
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 frumious Bandersnatch 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,570 
				Karma: 20150435 
				Join Date: Jan 2008 
				Location: Spaniard in Sweden 
				
				
				Device: Cybook Orizon, Kobo Aura 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			I think I probably missed the fact that advzip could be messing with the mimetype file. So far, I haven't had any problems, either in an actual reader (Kobo) or in calibre (including the "check book" option in the editor), so it could be that advzip is actually not touching the mimetype. 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Anyway, the file is so small that even adding it with -X9 results in it being stored without compression. Last edited by Jellby; 04-02-2020 at 11:51 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#11 | |
| 
			
			
			
			 Bibliophagist 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 48,175 
				Karma: 174315444 
				Join Date: Jul 2010 
				Location: Vancouver 
				
				
				Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#12 | ||
| 
			
			
			
			 frumious Bandersnatch 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,570 
				Karma: 20150435 
				Join Date: Jan 2008 
				Location: Spaniard in Sweden 
				
				
				Device: Cybook Orizon, Kobo Aura 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Quote: 
	
  | 
||
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#13 | |
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 https://www.mobileread.com/forums/sh...ad.php?t=84675  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#14 | 
| 
			
			
			
			 Member Retired 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 61 
				Karma: 47166 
				Join Date: Sep 2018 
				
				
				
				Device: a lot 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			故事主要描述當伐木
		 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Last edited by PenguinCEO; 05-04-2020 at 06:29 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#15 | |
| 
			
			
			
			 Resident Curmudgeon 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 80,782 
				Karma: 150249619 
				Join Date: Nov 2006 
				Location: Roslindale, Massachusetts 
				
				
				Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 And as I've said for a long time and will continue to say, Windows is the best OS for eBooks.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
| Tags | 
| bash, epub, standards, zip | 
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Help Zipping subfolders | Tanjamuse | Lounge | 1 | 09-01-2019 11:37 AM | 
| Question about metadata in epub files vs opf files | machstem | Calibre | 3 | 06-19-2017 01:43 PM | 
| epub files on kobo have all been changed into shortcut files? | emme278 | Kobo Reader | 6 | 11-01-2013 05:32 AM | 
| RE: Zipping/Mimetype/? | Hitch | Sigil | 31 | 08-02-2013 06:15 PM | 
| Txt files - Convert to Epub - Multiple files into one book - noob help | Cernan | Calibre | 6 | 05-18-2010 11:12 AM |