Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 12-22-2013, 10:41 PM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
How do I repace a Style Sheet?

I have an existing epub and I wanted to replace the 2 style sheets with updated files (i.e. epub6.css with epub8.css) Some font files also.

Using the epub editor I deleted the 2 CSS's, and added 2 replacements.

The links in the html files were not updated from epub6 to epub8, which I would not expect, but deleting a style sheet or image or other ref target should 'clean up' the out of date references.

So I did a F&R to update the linked references, epub6.css --> epub8.css

What was REALLY confusing was the debug error message saying that the linked resource doesn't exist but it is in the epub (see screen shot).


It seems that the OPF is not being updated when files are added and deleted????

Paul
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	525
Size:	132.2 KB
ID:	117098  
phossler is offline   Reply With Quote
Old 12-22-2013, 10:45 PM   #2
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: 43,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you wish to replace a file, right click on it and choose replace. All links will be updated automatically.

Your error message is most likely because when you added new files you neglected tospecify the directory they should be in, so they were placed in the root.
kovidgoyal is offline   Reply With Quote
Advert
Old 12-23-2013, 01:40 PM   #3
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
When I added a stylesheet, the editor is user friendly and knows to put it into the ../Styles folder (the screen shot in the first post) without my having to specify that.

The html file shows the link to epub8.css, and the folder shows that epub8.css is in the epub.

So I didn't know why debug was saying that file didn't exist when I could see it

Paul
phossler is offline   Reply With Quote
Old 12-23-2013, 02:15 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by phossler View Post
When I added a stylesheet, the editor is user friendly and knows to put it into the ../Styles folder (the screen shot in the first post) without my having to specify that.

The html file shows the link to epub8.css, and the folder shows that epub8.css is in the epub.

So I didn't know why debug was saying that file didn't exist when I could see it

Paul
It's not the styles folder it's the styles category. Hmm, it seems there is being much confusion here. Kovid, maybe this can be clarified somehow in the UI?
eschwartz is offline   Reply With Quote
Old 12-23-2013, 05:21 PM   #5
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
Your error message is most likely because when you added new files you neglected tospecify the directory they should be in, so they were placed in the root.
How do you specify the directory?

When I click Add Files, I can only [Import Resource File, ... etc] and browse to the file to import

Paul
phossler is offline   Reply With Quote
Advert
Old 12-23-2013, 05:29 PM   #6
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by eschwartz View Post
It's not the styles folder it's the styles category.
I'm pretty confused by this. So even though the added css shows apparently in the Styles folder, it's really not? I re-opened an epub as a zip, and the added css was (as Kovid said) in the root folder.

I didn't even know there was a 'Category'

Paul
phossler is offline   Reply With Quote
Old 12-23-2013, 05:46 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: 43,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Simply add styles/ before the file name in the import box. Or rename the file after importing it.

calibre, unlike sigil does not impose any folder structure on you. The files browser will display files by type, not folder. It does not care what folder you place your files in inside the book.
kovidgoyal is offline   Reply With Quote
Old 12-23-2013, 06:36 PM   #8
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
Simply add styles/ before the file name in the import box. Or rename the file after importing it.

calibre, unlike sigil does not impose any folder structure on you. The files browser will display files by type, not folder. It does not care what folder you place your files in inside the book.
Thanks for explaining, although it would seem more 'user friendly' (my opinion) to automatically store css files in \Styles and ttf files in \Fonts, etc.

Since it is already displayed in file browser window under Styles, it would seem that I cannot just drag it to the \Styles folder.

BTW, I do know that this is not Sigil and that things are done differently. No argument at all. Appreciate your efforts to provide this capability.

Paul
phossler is offline   Reply With Quote
Old 12-23-2013, 09:03 PM   #9
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by kovidgoyal View Post
Simply add styles/ before the file name in the import box. Or rename the file after importing it.

calibre, unlike sigil does not impose any folder structure on you. The files browser will display files by type, not folder. It does not care what folder you place your files in inside the book.
Since this is apparently confusing people, can you hint this to people in the UI somehow? Maybe you could show the full path in the main browser, not just on the bottom when you hover?
eschwartz is offline   Reply With Quote
Old 12-23-2013, 10:11 PM   #10
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: 43,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
File locations inside the ebook are utterly inconsequential. Indeed, in all ebook formats apart from epub, you cannot even control those locations. As such I do not want to waste UI space on showing them.

It is going to be confusing to people coming from Sigil, but that confusion will pass eventually. Hopefully people will eventually stop worrying about where the file is inside the book, and just put everything into the root. Let Edit Book manage displaying the files for you. And if organizing the files inside the book satisfies some OCD tendencies (which I can well imagine it might), you can always do that as I have indicated before.
kovidgoyal is offline   Reply With Quote
Old 12-23-2013, 10:16 PM   #11
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by kovidgoyal View Post
File locations inside the ebook are utterly inconsequential. Indeed, in all ebook formats apart from epub, you cannot even control those locations. As such I do not want to waste UI space on showing them.

It is going to be confusing to people coming from Sigil, but that confusion will pass eventually. Hopefully people will eventually stop worrying about where the file is inside the book, and just put everything into the root. Let Edit Book manage displaying the files for you. And if organizing the files inside the book satisfies some OCD tendencies (which I can well imagine it might), you can always do that as I have indicated before.
Fair enough.
eschwartz is offline   Reply With Quote
Old 12-24-2013, 08:02 AM   #12
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,071
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by kovidgoyal View Post
File locations inside the ebook are utterly inconsequential. Indeed, in all ebook formats apart from epub, you cannot even control those locations. As such I do not want to waste UI space on showing them.

It is going to be confusing to people coming from Sigil, but that confusion will pass eventually. Hopefully people will eventually stop worrying about where the file is inside the book, and just put everything into the root. Let Edit Book manage displaying the files for you. And if organizing the files inside the book satisfies some OCD tendencies (which I can well imagine it might), you can always do that as I have indicated before.
Once I removed the "..\Fonts\ ...." folder references in the styles sheets it worked better. I didn't realize that the epub structure did not require organization, although my OCD does like it that way.

Editing a Sigil epub with fonts and styles in subfolders and adding a style sheet to the Calibre editor root is something Ill get used to.

Paul
phossler is offline   Reply With Quote
Old 12-24-2013, 10:57 AM   #13
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by phossler View Post
Once I removed the "..\Fonts\ ...." folder references in the styles sheets it worked better. I didn't realize that the epub structure did not require organization, although my OCD does like it that way.

Editing a Sigil epub with fonts and styles in subfolders and adding a style sheet to the Calibre editor root is something Ill get used to.

Paul
ePub files are not windows specific. Folders should be referenced with forward slashes not backslashes inside a file. Organization of the file system inside an ePub is perfect acceptable but not a required element of the ePub standard. You can still have the CSS in a folder if you wish, just tell the program when you create it.

Dale
DaleDe is offline   Reply With Quote
Old 12-24-2013, 11:43 AM   #14
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,790
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
IMHO if you have a large quantity of Images or Stylesheets (fairly unusual to see more than 3), and even chapters, using folders can make management easier. But I agree, forcing it is not desirable.

Look at the mess that happens if you try and combine books with Sigil and the filename (not a DUPLICATE file) gets reused
theducks is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print style sheet ronaldl Sigil 2 10-29-2012 04:32 PM
How to link the style sheet in Sigil? JJ Joseph Sigil 6 06-15-2012 12:49 AM
Alphabetize and clean a style sheet roger64 Sigil 6 06-11-2012 11:47 AM
Style Sheet editor? GraciousMe Sigil 6 06-04-2012 03:06 PM
Missing style sheet mauvais Barnes & Noble NOOK 3 12-05-2011 06:29 PM


All times are GMT -4. The time now is 08:22 PM.


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