05-30-2011, 01:26 PM | #46 | |
Grand Sorcerer
Posts: 11,929
Karma: 7208979
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
|
|
05-30-2011, 01:32 PM | #47 |
creator of calibre
Posts: 44,306
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
To be robust I would suggest you create a time structure using time.localtime and then copy it changing the first six members and leaving the rest alone.
|
Advert | |
|
05-30-2011, 04:16 PM | #48 | |
Resident Curmudgeon
Posts: 75,810
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
05-30-2011, 04:19 PM | #49 |
Calibre Plugins Developer
Posts: 4,673
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
|
05-30-2011, 04:31 PM | #50 | |
Calibre Plugins Developer
Posts: 4,673
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
I am sure you are 100% correct in that css can do everything an xpgt file does, but if that css is not yet present then only removing the margins from the xpgt is the "safest" approach. Either way, it doesn't resolve the request from Jackie, who is effectively after an automation of applying a page setup to the xpgt file rather than removing it. Yes this "could" be done in css instead, but not easily automated. |
|
Advert | |
|
05-30-2011, 04:37 PM | #51 |
Resident Curmudgeon
Posts: 75,810
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Since I delete the page template file instead pf changing it, and I've not messed with it, can you achieve the same 0 margins you can via just CSS by making both the page template and CSS to 0 margins?
|
05-30-2011, 04:45 PM | #52 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
If it's too difficult (or contentious) put the idea aside for now. It's something I, personally, would use for some epubs because I don't like zero margins. However, I'm perfectly capable of hand-editing either the xpgt or css, or of doing the epub-epub conversion to fix the problem.
It's certainly not worth doing if I'd be the only person using it Last edited by jackie_w; 05-30-2011 at 04:47 PM. |
05-30-2011, 04:47 PM | #53 | |
Resident Curmudgeon
Posts: 75,810
Karma: 134321338
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
05-30-2011, 06:03 PM | #54 |
Addict
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
|
2 more files I can think of:
thumbs.db .DS_STORE (I will have to look for the right capitals) @artwork. I did had an epub where I removed the artwork causing me to loose my cover (I did remove it manually, did not check the manifest file or other files, so you're right, everybody could do dumb-ass thinks with epub ) |
05-30-2011, 06:13 PM | #55 |
Addict
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
|
Look at it in this way. If timezone is not supported, it can not be set, so there is no way to bother about it. 1:00pm is 1:00pm if I create it in Japan, repack it in England (with same time-stamp) and look at it in Japan again, I still get 1:00pm back so you do not even have to think about the fact that different timezones exist
|
05-30-2011, 06:27 PM | #56 | ||
Calibre Plugins Developer
Posts: 4,673
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
Quote:
In the 0.2.1 beta that I put up I added some code to remove from the manifest. So at least its removal will be clean. As for losing your "official" cover - that I am less concerned about. Particularly longer term when this plugin has the ability to replace covers in the ePub. |
||
05-30-2011, 06:37 PM | #57 | |||
Addict
Posts: 293
Karma: 21022
Join Date: Mar 2011
Location: NL
Device: Sony PRS-650
|
Quote:
Quote:
Quote:
So to safely remove this file (and any unmanifested file) you should not only check manifestation, but also check every txt-based file (htm, html, xhtml, xml, ...) to look for direct links to this file. |
|||
05-30-2011, 06:38 PM | #58 | |
Groupie
Posts: 156
Karma: 10001
Join Date: Feb 2011
Device: sony
|
Quote:
I can see that pretty soon I'm going to run out of excuses for not cleaning up my libraries Then it's going to be hours of OCD fussing and very little reading ..... |
|
05-30-2011, 06:46 PM | #59 |
Groupie
Posts: 156
Karma: 10001
Join Date: Feb 2011
Device: sony
|
I noticed those too, as ones I'd happily lose without a second glance, while most of the other unmanifested files I'd tread more carefully around.
Would it be reasonable to stash the filenames in a tag-style custom column? Then we could easily decide how to deal with various files as we discover them ... |
05-30-2011, 07:30 PM | #60 | ||
Calibre Plugins Developer
Posts: 4,673
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
Calibre bookmarks I think has to remain separately treated as there are users who do read their books in the calibre viewer and want to retain their last read position etc. So while many users would quite happily lose them, there are a number who would not. iTunesArtwork remains a question mark. Like I said in a query I ran across around 18000 ePubs I didn't have a single one where the iTunesArtwork was manifested. So my natural instinct is to nuke them but as drMerry has found one situation I remain open to hear anything more concrete on that. That leaves the iTunes plist files, .DS_Store and thumbs.db files which are all just "trash". As drMerry points out they may have been included in your manifest by a user running a tool incorrectly on them or through ignorance. So perhaps the "Remove iTunes plist files" option is renamed to something like "Remove unneeded junk files" or some better name. So that way a user can always leave it turned on if they so choose and not have to tick three checkboxes. Potentially iTunesArtwork goes into that category one day too, and Calibre bookmarks remains separate. Quote:
|
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any web-to-epub plugin for internet browser? | bthoven | ePub | 7 | 07-10-2011 05:14 AM |
[Old Thread] Reading epub on viewer inexplicably changes the time stamp of epub | greenapple | Library Management | 20 | 03-19-2011 10:18 PM |
Easy way to modify thread subscription emails in bulk? | snipenekkid | Feedback | 11 | 02-06-2011 03:47 AM |
Another plugin dev question | DiapDealer | Plugins | 2 | 12-11-2010 01:46 PM |
Epub plugin dev | DiapDealer | Plugins | 15 | 11-12-2010 09:36 AM |