Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 10-18-2010, 11: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: 26,329
Karma: 5382313
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, 03:04 AM   #2
Terisa de morgan
Wizard
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: 2,350
Karma: 1996742
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Aura, Kobo Mini, iPhone, iPad, Galaxy Tab3 8
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
 
Advertisement
Old 10-19-2010, 05: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: 6,258
Karma: 4801165
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, 05: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: 923
Karma: 1040670
Join Date: Sep 2010
Location: North Queensland, Australia
Device: Kindle 3 Wifi
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, 11: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,188
Karma: 727236
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
Old 10-19-2010, 12:09 PM   #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: 6,258
Karma: 4801165
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, 01: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: 26,329
Karma: 5382313
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, 10: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, 08: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, 05: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, 01: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: 26,329
Karma: 5382313
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, 10: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, 11: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: 597
Karma: 1281565
Join Date: Dec 2011
Location: Padova, Italy
Device: Kindle3, Odyssey, eDGe, A60, PRS-T1, iPad3, KoboGlo
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, 01: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: 26,329
Karma: 5382313
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, 03: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: 597
Karma: 1281565
Join Date: Dec 2011
Location: Padova, Italy
Device: Kindle3, Odyssey, eDGe, A60, PRS-T1, iPad3, KoboGlo
Thank you for letting me know.
AlPe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


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


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