![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Sep 2015
Device: none
|
How to View CSS Stylesheets of Kindle Books
I want to study the CSS stylesheets of the books in my Kindle library.
(In this forum post I'm skipping discussion of AZW vs AZW3, EPUB, converting to AZW3 and EPUB, DeDRM (6.3.4), and KindleUnpack. I think I've explored those issues and experimented enough to think that they are not the problem I'm experiencing.) I'm bringing my Kindle books into Calibre, right clicking their titles, and selecting 'Edit Book'. It seems that the stylesheets are being transformed in some way (creating endless 'p' and 'calibre' classes) which makes it difficult to interpret the CSS author's styling intent. In my research, I came across mention of Calibre "Flattening CSS Hierarchy" that might be applicable, but never did locate detailed discussion about that. At this point, I've exhausted what I can find to search on this subject. Question: How I can view the CSS stylesheets of Kindle books in their original form (without having been transformed or "flattened"(?) )? Thank you. |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
AFAK, you cannot. If I understand correctly, the stylesheet is made inline for the html documents. So, effectively there is no stylesheet anymore.
Without a doubt if I am mistaken, someone will correct me. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,887
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Kindle unpack (the plugin) This all assumes the book has not been converted by Calibre |
|
![]() |
![]() |
![]() |
#4 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,986
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
if the publisher uses Calibre to make the eBooks (like Baen) then you will see Calibre classes. If you see Calibre classes on eBooks where the publisher does not use Calibre, then stop downloading eBooks that you did not pay for. If these are legally obtained retail eBooks, no matter how the publisher makes the eBooks, you will see the classes and CSS as it was released. If you have a Mobi (AZW) eBook, don't bother to look at it as there is no CSS stylesheet because it's all inline andrather a mess to try to examine it. KF8 (AZW3) and ePub are fine as they do have CSS.
|
![]() |
![]() |
![]() |
#5 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
If Edit Book is showing calibre* classes, it means that that AZW3 was already converted at some point using calibre. The information you want is long gone. You will need to find an earlier source of the book, possibly a backup copy. ![]() "Flatten CSS" is part of calibre's conversion pipeline. It happens after the book is exploded (AZW3 Input plugin), during the actual *conversion* phase. Edit Book only makes use of the Input stage, in order to present the book resources for editing. Same reason why importing a DOCX in the Editor provides much cleaner output than converting to EPUB. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Sep 2015
Device: none
|
Thanks all, for your comments. I learned from each of them.
Goal: I want to study stylesheets of recently published ebooks to use them as a guide for creating my own stylesheets. I studied the ones from EPUB Zen Garden, but those are five years old (it seems). The reason I was wanting to view 'Kindle' stylesheets is because that's where the widest selection is located. I could only find 1 out of 10 of the ebooks I was hoping to review on Kobo (and therefore in EPUB format). Given your above comments, any further ideas on how to best achieve this goal (study stylesheets of recently published ebooks)? If I wanted to study print book formats, I would walk into a bookstore and knock myself out. What's the closest analog when it comes to studying CSS of ebooks? |
![]() |
![]() |
![]() |
#7 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Keep looking around at more samples? Make sure you have the original AZW3 directly from Amazon.
You can also ask for tips in our Workshop subforum. Many knowledgeable ebook formatters hang out there. |
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() Posts: 40
Karma: 10
Join Date: Jul 2015
Device: none
|
interesting question, would like to see their unmodified stylesheets too, but get the sense alotof them will have been automatically generated from scanned OCR layers of the print book equivalents, then piped thru a second automated conversion to azw3/mobi, and then only given minimal (if any) manual editing before publication
@ eschwartz, so are you saying get a hold of a non drm copy of azw3/mobi, then use kindleunpack to see the unmodified file? |
![]() |
![]() |
![]() |
#9 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
No need for KindleUnpack, calibre Editor will do just as well.
Scanned OCR of print books is going to be noticeable enough on first reading that no one will be inspired to see how they did it. ![]() Editing happens before kindlegen, and kindlegen doesn't flatten CSS anyway. Amazon don't accept calibre-converted dual-MOBIs anyway. |
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Sep 2015
Device: none
|
Thank you. I'll check out that Workshop forum.
|
![]() |
![]() |
![]() |
#11 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Sep 2015
Device: none
|
@ eschwartz,
When you suggest to "Make sure you have the original AZW3 directly from Amazon", is that something that can be verified at the time of purchase? Or do you mean that once the files are downloaded to a local machine, to make sure I'm working with the AZW3 version of the file? I ask because upon checking the sample of Kindle books I already downloaded, none of the files are AZW3. I see only these file types: azw, phl, apx, mbpV2. Also, the book titles save as text strings that are difficult to work with. I checked the Kindle for PC settings but didn't see a way to override that. Do you know how to download from the Kindle app and have the file names be the title names? Thank you. |
![]() |
![]() |
![]() |
#12 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
The original AZW3 would be the one Amazon provided rather than a converted copy of the original.
As for the AZW vs. AZW3, Kindle for PC doesn't have very friendly filenames ![]() There is no such thing as AZW. It is just a renamed MOBI (mobi7) or AZW3 (mobi8). If the original, from-Kindle-for-PC file has calibre* classes, then that particular book was created by the author/publisher using calibre. Most likely not by a Big Publishing House. ![]() |
![]() |
![]() |
![]() |
#13 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Sep 2015
Device: none
|
Thank you.
|
![]() |
![]() |
![]() |
#14 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,986
Karma: 144284074
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Not necessarily. Some publishers such as Baen use Calibre to make their eBooks. So yes, you would expect to see Calibre classes in Baen eBooks.
|
![]() |
![]() |
![]() |
#15 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,887
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Not all EPUB books from Baen have calibres fingerprints. That changed when Arnold retired. (I just spot checked. Some that do, have an ugly <div nest that gains 1 layer every chapter (file). I de-div a thousand of these from every order I get )
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom CSS Stylesheets for Calibre's Viewer | Ralob | Viewer | 389 | 11-24-2024 11:10 AM |
Which one to apply: HTML tagging or CSS stylesheets? | neyet | ePub | 12 | 01-03-2015 06:25 PM |
Can you customise the order of books in list view on the Kindle Paperwhite? | binkyd | Amazon Kindle | 17 | 03-11-2014 04:27 PM |
How do I View My Own Test E-Books via Kindle for Android? | jdanniel | Android Devices | 13 | 09-12-2012 03:15 PM |
eReader apps that do use embedded CSS 'stylesheets' | jttraverse | Android Devices | 7 | 05-20-2011 12:28 AM |