Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-18-2010, 10:14 PM   #1
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: 45,160
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
ePub and vim

I just discovered that vim can open and edit files inside a zip file automatically, which of course means it can do the same for epub. Which is awesome

Add the following to your .vimrc:

Code:
au BufReadCmd   *.epub      call zip#Browse(expand("<amatch>"))
kovidgoyal is offline   Reply With Quote
Old 10-19-2010, 02:04 AM   #2
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,582
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Thank you very much. vim is my text editor at PC, so it's very useful for me.
Terisa de morgan is offline   Reply With Quote
Advert
Old 10-19-2010, 04:36 AM   #3
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,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Great tip, thank you!
Jellby is offline   Reply With Quote
Old 10-19-2010, 04:37 AM   #4
MrPLD
Author's pet-geek
MrPLD ought to be getting tired of karma fortunes by now.MrPLD ought to be getting tired of karma fortunes by now.MrPLD ought to be getting tired of karma fortunes by now.MrPLD ought to be getting tired of karma fortunes by now.MrPLD ought to be getting tired of karma fortunes by now.MrPLD ought to be getting tired of karma fortunes by now.MrPLD ought to be getting tired of karma fortunes by now.MrPLD ought to be getting tired of karma fortunes by now.MrPLD ought to be getting tired of karma fortunes by now.MrPLD ought to be getting tired of karma fortunes by now.MrPLD ought to be getting tired of karma fortunes by now.
 
MrPLD's Avatar
 
Posts: 933
Karma: 1040670
Join Date: Sep 2010
Location: North Queensland, Australia
Device: Kindle 3 Wifi, Onyx Boox M96
Got to love the vim... I use gtk-vim a lot here, very nice spreading it all over large panels
MrPLD is offline   Reply With Quote
Old 10-19-2010, 10:53 AM   #5
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Does it rezip correctly so the epub validates? I know 7zip doesn't.
charleski is offline   Reply With Quote
Advert
Old 10-19-2010, 11:09 AM   #6
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,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by charleski View Post
Does it rezip correctly so the epub validates? I know 7zip doesn't.
I just tried editing a valid ePUB (deleted some content from XHTML and CSS files), and it remains valid. I don't know which "options" it uses to rezip the files, though.
Jellby is offline   Reply With Quote
Old 10-19-2010, 12:47 PM   #7
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: 45,160
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
On Unix it uses

zip -u

which will only affect the changed files.
kovidgoyal is offline   Reply With Quote
Old 10-25-2010, 09:57 AM   #8
cuthbert19
Enthusiast
cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.cuthbert19 once ate a cherry pie in a record 7 seconds.
 
Posts: 48
Karma: 1916
Join Date: Sep 2010
Device: Cybook Opus
Great tip, thanks Kovid!
cuthbert19 is offline   Reply With Quote
Old 10-27-2010, 07:02 AM   #9
opitzs
Avid Reader
opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.opitzs can successfully navigate the Paris bus system.
 
opitzs's Avatar
 
Posts: 161
Karma: 36472
Join Date: Sep 2008
Location: Look for rain, hail and snow...
Device: PRS-505, PRS-600, PRS T1, Kobo Glo
Thank you very much, this really is handy!
opitzs is offline   Reply With Quote
Old 07-06-2012, 04:49 PM   #10
mrjoeyman
Junior Member
mrjoeyman began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2012
Device: Kindle Fire
vim and epub

Quote:
Originally Posted by kovidgoyal View Post
I just discovered that vim can open and edit files inside a zip file automatically, which of course means it can do the same for epub. Which is awesome

Add the following to your .vimrc:

Code:
au BufReadCmd   *.epub      call zip#Browse(expand("<amatch>"))
I get the message: "***error*** (zip#browse) unzip not available on your system" when I try to open an epub file.

I used note pad to insert: "au BufReadCmd *.epub call zip#Browse(expand("<amatch>"))" into my .vimrc file.

Any help? Thanks.
mrjoeyman is offline   Reply With Quote
Old 07-07-2012, 12:00 AM   #11
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: 45,160
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
vim can't find unzip on your system, you need to setup it up so that it can open zip files first, only then will this command work for .epub.
kovidgoyal is offline   Reply With Quote
Old 07-07-2012, 09:44 AM   #12
mrjoeyman
Junior Member
mrjoeyman began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2012
Device: Kindle Fire
umm....ok thanks. I thought that was what the amendment was for. Have a good day.
mrjoeyman is offline   Reply With Quote
Old 07-07-2012, 10:17 AM   #13
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Thank you, Kovid.

Being a relative novice to Vim, I wrote a script to decompress an EPUB file, edit it with Vim and recompress it, but your way is much more convenient!
AlPe is offline   Reply With Quote
Old 07-07-2012, 12:41 PM   #14
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: 45,160
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
FYI: calibre has such a script (which works for EPUB, HTMLZ and AZW3 files)

calibre-debug --tweak-book filename.epub

(Essentially it is the command line version of the calibre GUI Tweak Book feature)
kovidgoyal is offline   Reply With Quote
Old 07-07-2012, 02:06 PM   #15
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Thank you for letting me know.
AlPe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub, ePub, EPUB, warum blos ePub? flowoeB Lounge 5 11-27-2009 09:37 AM


All times are GMT -4. The time now is 10:17 PM.


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