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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-20-2012, 11:36 AM   #196
MSWallack
Right, Except When Wrong
MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.
 
MSWallack's Avatar
 
Posts: 189
Karma: 1001490
Join Date: Aug 2007
Location: Indianapolis
Device: iPad Mini (but I have numerous other devices buried here & there...)
Awesome! Thanks!
MSWallack is offline   Reply With Quote
Old 04-20-2012, 05:42 PM   #197
MSWallack
Right, Except When Wrong
MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.MSWallack ought to be getting tired of karma fortunes by now.
 
MSWallack's Avatar
 
Posts: 189
Karma: 1001490
Join Date: Aug 2007
Location: Indianapolis
Device: iPad Mini (but I have numerous other devices buried here & there...)
After I posted the other day (and before I got the updated version of the plugin) I played around with severeal ways of approaching this and finally came up with a possible solution. Attached is a bookshelf divider tab that can be added to iBooks like any other book. So far, I've only made this "A" tab, but now that I know what I'm doing, I can finish the alphabet. Thoughts? Suggestions? Am I the only one interested in something likes this?
Attached Files
File Type: epub A.epub (30.6 KB, 65 views)

Last edited by MSWallack; 04-20-2012 at 05:42 PM. Reason: Missing attachment.
MSWallack is offline   Reply With Quote
 
Enthusiast
Old 04-20-2012, 05:51 PM   #198
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Looks like you got the font big enough now

I don't use iBooks enough to comment on the idea itself sorry (don't use my iPads for fiction, only for pdfs/magazines). I can see where you are going with it though. Perhaps people with that many books revert to the list view rather than cover view or something...
kiwidude is offline   Reply With Quote
Old 04-23-2012, 07:46 AM   #199
DASTRAL
Junior Member
DASTRAL began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2010
Device: None
Hello

I'm looking to recreate all covers for 7000 books, since well... i messed up and don't like the current results
I am stuck using regular expressions to "tweak" the output and i am having trouble with them.

How would you write a RE telling it to "pick the title, but when you see a minus sign, delete it and skip one line" ?

So that a book with Author "John Doe" and Title "The Ever War - First Years 1 - Alex Smith"

Shows up as the second image (and not the first).


Q : Kiwidude do you plan to add a "Right Margin" on your next release ?
As text is already "auto-centered" getting a right margin would help getting it "where we want".


PS : I have given up using Calibre series metadata because the field doesn't seem to be supported with Aldiko (my main reader).
PS2 : Thx again for the amazing plugin
Attached Thumbnails
Click image for larger version

Name:	Current.JPG
Views:	37
Size:	6.0 KB
ID:	85628   Click image for larger version

Name:	Desired.JPG
Views:	41
Size:	6.1 KB
ID:	85629  
DASTRAL is offline   Reply With Quote
Old 04-23-2012, 08:04 AM   #200
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Dastral - firstly, don't ever give up on using series metadata . You can use Metadata plugboards to manipulate the metadata when you export books out of calibre (I know nothing about an Aldiko reader, but I am sure you could either use a filename template or a metadata plugboard to insert series into your title). The Kindle doesn't support series info either, but metadata plugboards are how we get the titles to display with series info in them. See the library subforum for the stickies. If you need help setting it up just post in that Library Management forum.

Once you do that, you should find producing the covers you want much easier. And you will not have issues with other plugins or features in calibre which expect series information to be in the series column, not in the title.

So I think that just leaves your question about right margins - I'll add your request for it to the list for the next release.
kiwidude is offline   Reply With Quote
Old 04-25-2012, 04:30 AM   #201
DASTRAL
Junior Member
DASTRAL began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2010
Device: None
Yes, i'll probably end up using Author/Series/Title in calibre and exporting files merging Series/Title metadata in the epub and filename.
I've managed to setup a mobile Calibre so i'm almost "good for life" managing my library.

PS : Aldiko is probably the most popular reader software for Android Phones/Tablets

Last edited by DASTRAL; 04-25-2012 at 04:34 AM.
DASTRAL is offline   Reply With Quote
Old 04-25-2012, 07:52 AM   #202
joys
Junior Member
joys began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2011
Device: Sony PRS-T1
COVERS stay the old ones in IPAD

I have a few books where the covers were wrong/missing. I used Calibre to update the covers. Very nice. They show up in Calibre with the new covers. But when I move the books to IPad, the new covers are neglected. They are not part of the epub file. IPad seeemingly takes the first page of the epub as cover... Any help ???

Last edited by joys; 04-25-2012 at 07:55 AM.
joys is offline   Reply With Quote
Old 04-25-2012, 08:20 AM   #203
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Generating a cover only simply replaces the cover file stored within calibre's file system, it doesn't touch the ebook itself. When you send a book to a device like an ePub, calibre will attempt to replace the internal cover with that latest cover image. However in some circumstances the epub does not internally identify which is the existing cover that is in there, so calibre can't do that replacement. Hence you see a different cover in the epub on the device versus that you see in the calibre library.

So you need to do an epub -> epub conversion in calibre before you send to the device, during which calibre will "force" the cover into the epub. From that point on the cover is identifiable by calibre so it is able to further replace it in future if required.
kiwidude is offline   Reply With Quote
Old 04-25-2012, 09:13 AM   #204
joys
Junior Member
joys began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2011
Device: Sony PRS-T1
great help, I will try it, MANY thanks !!!
joys is offline   Reply With Quote
Old 04-26-2012, 10:34 AM   #205
DASTRAL
Junior Member
DASTRAL began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2010
Device: None
Well as Kiwi recommended, started toying around with plugboards and they are very convenient.
However i don't think even with plugboards i'll find a way to reconcile Metadata/Filename/GenerateCover.

I'm going to keep trying to make a RE for GenerateCover saying ""pick the title, but when you see a minus sign, delete it and skip one line".

Spoiler:


My regular expression tries to add series index (an extra problem to deal with) and i'm still stuck with the "minus sign" in the covers for extra long series...

Using the best RE i could come up with :
(?P<author>((?!\s-\s).)*)\s-(?:\s(?P<series>((?!\s-s).)*)\s-)?\s(?P<title>.*)

With < John Doe - End Of Time 1 - The Start.epub > I get
Authors : John Doe (Perfect)
Series : End Of Time 1 [1] (great now i have a [1] to get rid of)
Title : The Start (Perfect)

With < John Doe - The Ever War - First Years 1 - Alex Smith.epub > i get
Authors : John Doe (Perfect)
Series : The Ever War - First Years 1 [1] (damn that [1] is here )
Title : Alex Smith (Perfect)

Assuming i could find a way to remove the index (tried but failed) i would end up with :
Authors : John Doe (Perfect)
Series : The Ever War - First Years 1 (no index, just pure text values)
Title : Alex Smith (Perfect)

So far so good, but when you get to the Cover Generation the problem i had with the minus is still present.

I'll still end up getting :
The Ever War -
First Years 1 - Alex
Smith

Instead of
The Ever War

First Years 1

Alex Smith
DASTRAL is offline   Reply With Quote
Old 04-26-2012, 11:01 AM   #206
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Dastral.

It seems to me you have multiple issues here you are rolling into one - I suggest you break them down into their parts.

For a start - you want a regex for adding books to calibre when their name looks like:
John Doe - End Of Time 1 - The Start.epub
John Doe - The Ever War - First Years 1 - Alex Smith.epub

This is the regex I use for this (from the Quick preferences plugin):
Code:
^(?P<author>((?!\s-\s).)+)\s-\s(?:(?:\[\s*)?(?P<series>.+)\s(?P<series_index>[\d\.]+)(?:\s*\])?\s-\s)?(?P<title>[^(]+)(?:\(.*\))?
That gives me the following results:

Title: The Start
Author: John Doe
Series: End Of Time [1]

Title: Alex Smith
Author: John Doe
Series: The Ever War - First Years [1]

Which I believe is the correct metadata for the books that you wanted.

As for the second step, I don't know if there is an "easy" way for what you want to achieve. You can do something like this:
Code:
{series:re(-,)} {series_index}
Which will strip out the - signs. But I don't know if the calibre template language supports substituting back in carriage returns, certainly my attempts didn't work.
kiwidude is offline   Reply With Quote
Old 04-26-2012, 11:22 AM   #207
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Oooh - figured it out... of course it doesn't want newline characters, it wants a <br/>.
Code:
{series:re(-,<br/>)} {series_index}
Attached Thumbnails
Click image for larger version

Name:	Screenshot.png
Views:	71
Size:	38.7 KB
ID:	85722  

Last edited by kiwidude; 04-26-2012 at 11:27 AM. Reason: Attached screenshot
kiwidude is offline   Reply With Quote
Old 04-30-2012, 08:04 AM   #208
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Dastral,

Using your own image example you posted a while ago, the next version of this plugin will have a right margin capability as shown in the screenshot below. I've got some other changes I am going to look at making before I release - stuff I am considering:
  • allowing text elements to be left/right aligned rather than always centered
  • a way to import/export settings for sharing with other users as zip files
  • API support to allow calling from another plugin (for Jimm Xinu)
Not promising to deliver on all/any of those in this release but I'll take a look at least. If I've missed anything else that people are screaming for now is the time to remind me...
Attached Thumbnails
Click image for larger version

Name:	RightMargin.png
Views:	71
Size:	151.3 KB
ID:	85880  
kiwidude is offline   Reply With Quote
Old 04-30-2012, 09:03 AM   #209
DASTRAL
Junior Member
DASTRAL began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2010
Device: None
Finally did it !

This might interest people with hundreds of windows/dos OLD ebooks like me that need cover & metadata processing.

Spoiler:


SETUP :

Import Regular Expression :
Code:
^(?P<author>((?!\s-\s).)+)\s-\s(?:(?:\[\s*)?(?P<series>.+)\s(?P<series_index>[\d\.]+)(?:\s*\])?\s-\s)?(?P<title>[^(]+)(?:\(.*\))?
Save books to disk :
{authors} - {series} {series_index} - {title}

Metadata Plugboard :
any format / any device / {series} {series_index} - {title} / title

Tweaks for Author Sort name Algorithm : author_sort_copy_method = 'copy'
(this is to change between John Doe and Doe John)

Tweaks for control formating of title and series : save_template_title_series_sorting = 'strictly_alphabetic'
(this is to change between The Event and Event, The)

Custom Text for Generate Cover (type it as is hitting enter to change line) : {series:re(-,
)} {series_index}


What will this setup do ?

Take any book with this current setup :
John Doe - Alfred.rtf
John Doe - Bonie.rtf
John Doe - End Of Time 1 - The Start.pdf
John Doe - End Of Time 2 - The End.pdf
John Doe - The Ever War - First Years 1 - Alex Smith.epub
John Doe - The Ever War - First Years 2 - Bob Smith.epub
John Doe - The Ever War - Second Years 2 - Anna Smith.epub
Forgotten Realms - Drizzt Do'Urden III - Legacy of the Drow 02 - Starless Night.html
(yes even something as horribly complicated to sort as the last one)

And create in Calibre a reference with FirstEntry=Author LastEntry=Title EverythingBetween=Series with Index for LastSeries.

Author : Forgotten Realms
Series : Drizzt Do'Urden III - Legacy of the Drow 02(incremental counting of the Series Number)
Title : Starless Night

And generate an appropriate cover replacing every "minus" with an "enter/lineskip"

Also as most readers (like Aldiko for Android) do not accept Series metadata
when you save the file to disk you will get :
A file : Forgotten Realms - Drizzt Do'Urden III - Legacy of the Drow 02 - Starless Night.epud

With Metadata :
Author : Forgotten Realms
Series : Drizzt Do'Urden III - Legacy of the Drow 02- Starless Night


PS : Kiwi i love you
Attached Thumbnails
Click image for larger version

Name:	0Series.JPG
Views:	59
Size:	11.5 KB
ID:	85882   Click image for larger version

Name:	1Series.JPG
Views:	58
Size:	10.3 KB
ID:	85883   Click image for larger version

Name:	2Series.JPG
Views:	61
Size:	11.5 KB
ID:	85884   Click image for larger version

Name:	3Series.JPG
Views:	62
Size:	11.1 KB
ID:	85885  

Last edited by DASTRAL; 04-30-2012 at 12:28 PM.
DASTRAL is offline   Reply With Quote
Old 04-30-2012, 11:54 AM   #210
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
Posts: 1,716
Karma: 509671
Join Date: Dec 2011
Location: Midwest USA
Device: Nook STR w/Glowlight, Kindle 3g, Droid
I wouldn't say I'm screaming for it, but you did say you'd consider this next time you were working on GC.
Quote:
Originally Posted by JimmXinu View Post
@kiwidude - Would you have any interest in creating and exposing a few methods on Generate Cover for other plugins to call like you did for Reading Lists?

I'm thinking just a couple: something like get_saved_setting_names to get a list of the names of the different settings, and a modified generate_cover_for_book.

The generate_cover_for_book method would take the name of the setting to use and, an mi either with _path_to_cover set or a new path_to_cover parameter.

Returning the cover data like generate_cover_for_book does now seems best to me, rather than setting it from inside the new method. I might want to push it into the epub during creation.

My intention is to have the FanFictionDownLoader plugin (configurably) call GC to generate covers when creating/updating books, using different settings for different sites.

Jim
JimmXinu 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
[GUI Plugin] Open With kiwidude Plugins 232 10-09-2014 12:38 AM
[GUI Plugin] Goodreads Sync kiwidude Plugins 673 09-16-2014 06:38 PM
[GUI Plugin] Quick Preferences kiwidude Plugins 32 09-13-2014 10:34 PM
[GUI Plugin] Clipboard Search kiwidude Plugins 9 08-12-2014 03:36 AM
[GUI Plugin] User Category kiwidude Plugins 35 08-07-2014 04:04 AM


All times are GMT -4. The time now is 10:44 PM.


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