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

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 06-08-2012, 07:25 AM   #301
StreakyG
Junior Member
StreakyG began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2012
Device: Kindle Touch & Sony PR300
Is it possible to create a custom column to show booksize in eg Bytes? When comparing for possible duplicates in my library, MB is too coarse to assume the duplication.

I've had a look around for pointers, with no luck. If this has been covered already then a gentle nudge to look in the right direction would be much appreciated.
StreakyG is offline   Reply With Quote
Old 06-08-2012, 07:41 AM   #302
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by StreakyG View Post
Is it possible to create a custom column to show booksize in eg Bytes? When comparing for possible duplicates in my library, MB is too coarse to assume the duplication.
I'm unsure of your request, but if you install the Find Duplicates plugin there is a binary compare feature that will take the guess work out of comparing books for exact matches.
DoctorOhh is offline   Reply With Quote
Old 06-08-2012, 08:42 AM   #303
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,691
Karma: 6240117
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by StreakyG View Post
Is it possible to create a custom column to show booksize in eg Bytes? When comparing for possible duplicates in my library, MB is too coarse to assume the duplication.
I agree with dwanthy that you probably don't want to use the size data to check for duplicates. The find duplicates plugin does a more thorough job. But putting that aside ...

The template for a "column built from other columns" that shows the size information in bytes is
Code:
program: booksize()
This value is the sum of all the formats associated with a book, which might not be what you want. The template to show the sizes of the individual formats is
Code:
program: formats_sizes()
See the Using General Program Mode documentation for more information on templates that begin with "program:" The documentation for the two functions is available here.

Note that the second template (formats_sizes) can cause performance problems when used in large libraries, especially if the column is sorted. The first template will slow things down a bit, but not as much as the second.
chaley is offline   Reply With Quote
Old 06-08-2012, 08:50 AM   #304
StreakyG
Junior Member
StreakyG began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2012
Device: Kindle Touch & Sony PR300
dwanthny , chaley.

Very many thanks. c answered my question as phrased and I'll be able to go and 'play' a bit now. d answered the 'what I was trying to achieve' so between you I well happy.

As I said, vmt.
StreakyG is offline   Reply With Quote
Old 06-08-2012, 10:20 AM   #305
capnm
Groupie
capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'capnm knows the difference between 'who' and 'whom'
 
Posts: 156
Karma: 10001
Join Date: Feb 2011
Device: sony
StreakyG -

You might also look into the Count Pages plugin.
Find Duplicates binary compare won't flag as duplicates otherwise identical books that have, for example, an internal timestamp difference.
But for myself, I'm willing to work with the assumption that two versions of a book with identical word counts are duplicates ...
capnm is offline   Reply With Quote
Old 07-01-2012, 10:25 AM   #306
DriverJC
Junior Member
DriverJC began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2012
Device: iPad
I'm having a hard time with this. I have a few thousand books that have their title set to "Star Wars: Fate of the Jedi #05: Allies" and the Series is set to "Star Wars: Fate of the Jedi [5]".

I would like to remove the "{series} #{series_index}: " from the title.

Can someone please point me in the right direction on the regular Expression I should be using to do this in Bulk.

Thank you
Joel
DriverJC is offline   Reply With Quote
Old 07-01-2012, 11:23 AM   #307
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,659
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DriverJC View Post
I'm having a hard time with this. I have a few thousand books that have their title set to "Star Wars: Fate of the Jedi #05: Allies" and the Series is set to "Star Wars: Fate of the Jedi [5]".

I would like to remove the "{series} #{series_index}: " from the title.

Can someone please point me in the right direction on the regular Expression I should be using to do this in Bulk.

Thank you
Joel
Use Bulk Metadata Edit

Field to search: title
Search for:
Code:
(Star Wars: Fate of the Jedi \#\d+\: )
Your Test (optional): Star Wars: Fate of the Jedi #05: Allies

Anything inside paren will be gobbled. escape the # (or any special to REGEX characters). \d+ gets any numbers following. \: gets the colon.
Spaces MUST be exactly placed as exists to make the match work.

BTW :welcome" to MR
theducks is offline   Reply With Quote
Old 07-01-2012, 01:15 PM   #308
DriverJC
Junior Member
DriverJC began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2012
Device: iPad
Quote:
Use Bulk Metadata Edit

Field to search: title
Search for:
Code:
Code:
(Star Wars: Fate of the Jedi \#\d+\: )
Your Test (optional): Star Wars: Fate of the Jedi #05: Allies

Anything inside paren will be gobbled. escape the # (or any special to REGEX characters). \d+ gets any numbers following. \: gets the colon.
Spaces MUST be exactly placed as exists to make the match work.

BTW :welcome" to MR
Thank you for the Quick Response and your welcome to the forum.

The Code you gave me worked great on any Star Wars: Fate of the Jedi Books. Is there any way it can be modified to take the information in the Series field and remove it from the title field. I have somewhere north of 1834 Books that have various series listed. in the Title and Series field.

Thank you
Joel
DriverJC is offline   Reply With Quote
Old 07-01-2012, 01:53 PM   #309
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,659
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by DriverJC View Post
Thank you for the Quick Response and your welcome to the forum.

The Code you gave me worked great on any Star Wars: Fate of the Jedi Books. Is there any way it can be modified to take the information in the Series field and remove it from the title field. I have somewhere north of 1834 Books that have various series listed. in the Title and Series field.

Thank you
Joel
Someone might have a different idea on how to use templates and REGEX in the search term
In the meantime:
if your format is solidly consistent...

Code:
(.+ \#\d+\: )
This change will gobble everything up to the <space>#

The nice thing about the bulk editor S&R is you can CANCEL if you can't create a satisfactory find or replace term .
Warning: One you hit apply or OK it is a done deal Backup or try on a test lib
theducks is offline   Reply With Quote
Old 07-01-2012, 06:14 PM   #310
DriverJC
Junior Member
DriverJC began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2012
Device: iPad
That worked FLAWLESSLY.

Thank you so much for the help.

Joel
DriverJC is offline   Reply With Quote
Old 09-22-2012, 07:36 AM   #311
remus.grrrl
Member
remus.grrrl began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2011
Device: none
Metadata Plugboard not working right

Quote:
Originally Posted by chaley View Post
[Edited on 23/Jan/2011]

Several people are doing interesting and useful things with templates, plugboards, and composite fields. This thread is both a request that they share what they have done and a place to put the information.

Suggestions/recipes are summarized below. Don't hesitate to post corrections and useful variants.

General Metadata

Metadata: Put series into the title, using either initials or a shortened form. Strip leading articles from the series name (any) (inspired by Gary_M_Mugford)
The solution requires creating three composite columns. The first column is used to remove the leading articles. The second is used to compute the 'shorten' form. The third is to compute the 'initials' form. Once you have these columns, the plugboard selects between them. You can hide any or all of the three columns on the library view.

First column:
Code:
Name: #stripped_series. Template: {series:re(^(A|The|An)\s+,)||}
Second column (the shortened form):
Code:
Name: #shortened. Template: {#stripped_series:shorten(4,-,4)}
Third column (the initials form):
Code:
Name: #initials. Template: {#stripped_series:re(([^\s])[^\s]+(\s|$),\1)}
Plugboard expression:
Code:
Template:{#stripped_series:lookup(.\s,#initials,.,#shortened,series)}{series_index:0>2s| [|] }{title}
Destination field: title
This set of fields and plugboard produces:
Series: The Lord of the Rings
Series index: 2
Title: The Two Towers
Output: LotR [02] The Two Towers

Series: Dahak
Series index: 1
Title: Mutineers Moon
Output: Dahak [01] Mutineers Moon

Series: Berserkers
Series Index: 4
Title: Berserker Throne
Output: Bers-kers [04] Berserker Throne

Series: Meg Langslow Mysteries
Series Index: 3
Title: Revenge of the Wrought-Iron Flamingos
Output: MLM [03] Revenge of the Wrought-Iron Flamingos

Trying to use this, however, no matter what the series is, it always uses the initials for it. I have a lot of series that are one word that keep showing up as one letter which is making it hard to figure out which series the books belong to.

ie: Both series name Bite, and Berserk....will both show

B [1] {title}......do I need to tweak the metadata plugboard so it will recognize that it is to use the series alone if it is only 1 word?

Help is greatly appreciated.
remus.grrrl is offline   Reply With Quote
Old 09-22-2012, 08:05 AM   #312
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by remus.grrrl View Post
Trying to use this, however, no matter what the series is, it always uses the initials for it. I have a lot of series that are one word that keep showing up as one letter which is making it hard to figure out which series the books belong to.
I don't currently use this setup, but have in the past. Have you double checked each of the three custom columns you created to verify the template and look up names are correct?

stripped_series
shortened
initials

Good Luck.
DoctorOhh is offline   Reply With Quote
Old 09-22-2012, 05:29 PM   #313
remus.grrrl
Member
remus.grrrl began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2011
Device: none
Here is all my information in screen shots....

Spoiler:
BOOKS IN LIBRARY


COLUMN HEADINGS




METADATA PLUGIN


SAVED TO FILE OUTPUT IN DIRECTORY
remus.grrrl is offline   Reply With Quote
Old 09-22-2012, 06:15 PM   #314
remus.grrrl
Member
remus.grrrl began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2011
Device: none
Okay.....now the whole thing isn't working at all.....is there a specific save to disk template I need to use??

Problem found and fixed....see next post.

Last edited by remus.grrrl; 09-22-2012 at 06:26 PM.
remus.grrrl is offline   Reply With Quote
Old 09-22-2012, 06:24 PM   #315
remus.grrrl
Member
remus.grrrl began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2011
Device: none
A HA HA HA......finally got the dang thing to work.......at least with the newer calibre (0.8.70) You do NOT put the plugboard expression in the Metadata Plugboard like I thought.....You put it in the save to disk, template area. As below....now it works perfectly.....

remus.grrrl is offline   Reply With Quote
Reply

Tags
custom column, tag, tags

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
custom column i need a little help shinken Calibre 3 09-15-2010 03:41 AM
Using Custom Metadata in Save Template EJvdH Calibre 1 07-02-2010 06:06 AM
Accessories Decalgirl Kindle 2 custom skin template srmalloy Amazon Kindle 6 04-09-2010 09:55 PM
Donations for Custom Recipes ddavtian Calibre 5 01-23-2010 04:54 PM
Help understanding custom recipes andersent Calibre 0 12-17-2009 02:37 PM


All times are GMT -4. The time now is 01:02 AM.


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