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 12-18-2020, 03:16 PM   #1
vedri
Member
vedri began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Jul 2013
Device: Kindle PW3
How to change image location for html file converted from epub?

Hi,


when converting some epub books to html additional directory with images is extracted to /images subfolder.

pandoc -s --extract-media=ABC_files ABC.epub -o ABC.html

I would like to move all the images to root of ABC_files folder and change their location in html document to new location.

What is the easiest way to do that?
vedri is offline   Reply With Quote
Old 12-18-2020, 03:36 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,291
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by vedri View Post
Hi,


when converting some epub books to html additional directory with images is extracted to /images subfolder.

pandoc -s --extract-media=ABC_files ABC.epub -o ABC.html

I would like to move all the images to root of ABC_files folder and change their location in html document to new location.

What is the easiest way to do that?
Leave them where they are? Otherwise, you are going to have the edit the file location information in the html documents for every image.
DNSB is offline   Reply With Quote
Advert
Old 12-19-2020, 11:09 AM   #3
Quoth
the rook, bossing Never.
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 11,068
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
^^^^ What DNSB says about leave as is.

Or on Windows use Notepad++ or on Linux, an editor of choice and make a backup.
Do then a scary search and replace in *.html of images/ with nothing on ALL files in directory in bulk. Maybe look in an HTML file with text editor to see how path is described first. Perhaps include more of the HTML and have it in the replace in case images/ is in the body text.

But, I only ever go the other way, HTML to ePub. Even if you are putting the stuff on a web server keeping the subdirectory makes sense.
Quoth is offline   Reply With Quote
Reply

Tags
epub, html, pandoc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help converting file from HTML>EPub. File is divided in several pages I want to merge leito360 Conversion 6 02-19-2016 12:31 PM
Image issues with Kobo Mini (converted kindle book to epub) stoduk Conversion 2 09-05-2013 06:46 AM
JPG image lost when add HTML file to Calibre mshane Conversion 8 01-03-2013 06:08 PM
Epub Converted from HTML has messed up ordering seajewel Calibre 3 12-03-2010 04:47 PM
Setting first HTML file Image as Cover? phnord Calibre 2 01-09-2010 03:13 AM


All times are GMT -4. The time now is 04:11 PM.


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