Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-14-2015, 10:53 PM   #631
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 chaley View Post
I have a python "script" that puts the correct format for a series into a custom column. It looks at all books in the series, figures out whether it needs decimals and how many leading zeros (could be underscores) are required, and then writes the correct format for "format_number" to the custom column for each book in the series. The script is run from the command line with calibre-debug -e. I mention this mostly to agree that I was being dense, especially as I had already solved this problem in a different way, but if you are comfortable with this sort of thing you are welcome to use the script appropriately modified.

The script is:
Spoiler:
Code:
def init_cache(library_path):
	from calibre.db.backend import DB
	from calibre.db.cache import Cache
	backend = DB(library_path)
	cache = Cache(backend)
	cache.init()
	return cache

import math
from collections import defaultdict
	
cache = init_cache(library_path = 'path-to-your-library')
series_info = defaultdict(dict)

for id_ in cache.all_book_ids():
	series = cache.field_for('series', id_)
	if series:
		sidx = cache.field_for('series_index', id_)
		str_sidx = str(sidx)
		components = str_sidx.split('.')
		if components[1] == '0':
			fract_part = 0
		else:
			fract_part = len(components[1])
		val_part = len(components[0])
		series_info[series]['val_part'] = max(series_info[series].get('val_part', 0), val_part)
		series_info[series]['fract_part'] = max(series_info[series].get('fract_part', 0), fract_part)
		
for series,sinfo in series_info.iteritems():
	fract_part = sinfo['fract_part']
	format_str = '{0:0%d.%df}'%(sinfo['val_part'] + fract_part + (1 if fract_part > 0 else 0), fract_part)
	sids = cache.search('series:"=' + series + '"')
	dct = {book_id:format_str for book_id in sids}
	cache.set_field('#text', dct)
Applying one teeny update.
You can use the current library path from the preferences with a simple
Code:
from calibre.utils.config import prefs
library_path = prefs['library_path']
I referred this script to someone so it came up.

Enclosed is a downloadable add-series-to-custom-column.py.zip for convenience. It assumes the custom column is "#formatted_series".
Attached Files
File Type: zip add-series-to-custom-column.zip (642 Bytes, 223 views)
eschwartz is offline   Reply With Quote
Old 02-20-2015, 08:58 AM   #632
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
This thread might be a useful stickie
phossler is offline   Reply With Quote
Advert
Old 02-20-2015, 09:50 AM   #633
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,168
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Quote:
Originally Posted by phossler View Post
This thread might be a useful stickie
It is and has been for a LONG time!
PeterT is offline   Reply With Quote
Old 02-20-2015, 11:27 AM   #634
crissman
Connoisseur
crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.
 
Posts: 77
Karma: 3090
Join Date: Apr 2013
Location: California
Device: Kobo Aura One, Kobo Aura H20,Kindle PW1
Suggestions wanted for maanaging books that belong to multiple series

Not sure if this post is relevant for this thread or not, but I was wondering if I could pick some peoples brains on and ideas to manage a book that belongs several series.

Example:
Stuart Woods - Reckless Abandon
Series: Stone Barrington [10]
Series: Holly Barker [4]

or

R.A. Salvatore -The Crystal Shard
Series: Icewind Dale Trilogy [1]

but also can be read as part of a much larger reading order for those wishing to read about Drizzt

Series: Legends of Drizzt [4]

This would especially be useful for reading books with both publication orders, chronological orders, or chosen reading orders for several series that overlap for example, The Enderverse Saga that incorporates many series.

Currently I have been just entering in the secondary series into the title.
Author: R.A. Salvatore
Title: The Crystal Shard: Also Icewind Dale Book 1
Series: Legends of Drizzt [4]

Kinda of ugly in my opinion and not good if you want to sort by the different series.

Thanks crissman

Last edited by crissman; 02-20-2015 at 11:41 AM.
crissman is offline   Reply With Quote
Old 02-20-2015, 03:45 PM   #635
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,575
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@crissman - If you're not OCD about duplicate books then maybe something like this.

Click image for larger version

Name:	Capture.JPG
Views:	649
Size:	41.7 KB
ID:	135100

Notes is a long text (like Comments) custom column cloaked by an icon in the book list. The EPUB is Here link is created via the Link tool in the long text (Comments) editor.

BR
BetterRed is offline   Reply With Quote
Advert
Old 02-20-2015, 03:57 PM   #636
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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by crissman View Post
Not sure if this post is relevant for this thread or not, but I was wondering if I could pick some peoples brains on and ideas to manage a book that belongs several series.
The thread https://www.mobileread.com/forums/sho...d.php?t=252883 might be of help.
chaley is offline   Reply With Quote
Old 02-20-2015, 05:07 PM   #637
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 PeterT View Post
It is and has been for a LONG time!
In point of fact, it has not been a sticky for very long at all. This one was: https://www.mobileread.com/forums/sho...d.php?t=118563

P.S. Thanks chaley, I guess you stickied it?
Well, whoever did... perhaps the nearly-identical thread can be unstickied or merged and the OPs deduplicated?
eschwartz is offline   Reply With Quote
Old 02-20-2015, 05:16 PM   #638
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 12,168
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
I stand corrected. TheDucks did it.
PeterT is offline   Reply With Quote
Old 02-20-2015, 05:21 PM   #639
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,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
One issue here is that stickies seem not to be used for conversations. You can see that most of them are closed to new posts. This thread is certainly an outlier.
chaley is offline   Reply With Quote
Old 02-20-2015, 05:36 PM   #640
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)
Depends on the thread, see here for example: https://www.mobileread.com/forums/forumdisplay.php?f=150


Sometimes stickies are there to pin very-important-discussions where everyone can find them, which is what I believe the plugboards/templates thread is all about.
eschwartz is offline   Reply With Quote
Old 02-20-2015, 05:56 PM   #641
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,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Stickies can be open or closed. They are 2 distinct operations.
Some are closed to keep them lean (and hopefully read) for very important topics.

Others, like the "Plugin ideas" are open so as to generate ideas (and inspiration to develop)
theducks is offline   Reply With Quote
Old 02-20-2015, 10:38 PM   #642
crissman
Connoisseur
crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.
 
Posts: 77
Karma: 3090
Join Date: Apr 2013
Location: California
Device: Kobo Aura One, Kobo Aura H20,Kindle PW1
Quote:
Originally Posted by BetterRed View Post
@crissman - If you're not OCD about duplicate books then maybe something like this.

Attachment 135100

Notes is a long text (like Comments) custom column cloaked by an icon in the book list. The EPUB is Here link is created via the Link tool in the long text (Comments) editor.

BR
Actually I guess I can say I am a little OCD, I like things to looks a certain way, and having duplicate entries wouldn't really work for me, The Idea is sound but not quite what I was looking for. I was almost just considering just using a second series column.

Thanks
crissman
crissman is offline   Reply With Quote
Old 02-20-2015, 10:40 PM   #643
crissman
Connoisseur
crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.crissman could sell banana peel slippers to a Deveel.
 
Posts: 77
Karma: 3090
Join Date: Apr 2013
Location: California
Device: Kobo Aura One, Kobo Aura H20,Kindle PW1
Quote:
Originally Posted by chaley View Post
Thanks, I will look into reading this tomorrow and see what might help, a little to tired at the moment. and just wanted to express my thanks for the reply.


crissman
crissman is offline   Reply With Quote
Old 03-07-2015, 10:55 PM   #644
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,159
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Hi,

It appears that my plugboard settings have stopped working for my Sony PRS-T3. I created a column for my title, called "title_sony" and I've attached a screenshot of my plugboard settings.

The goal is that the information in my title_sony column should be what is in my title field on the device. I'm not sure what may have changed but my settings used to work and now they don't.

I'd appreciate any and all help.

Thanks,
Amalthia

p.s. I'm on Calibre: 2.20
Attached Thumbnails
Click image for larger version

Name:	metadata plugboard.PNG
Views:	351
Size:	25.0 KB
ID:	135700  
Amalthia is offline   Reply With Quote
Old 03-07-2015, 11:41 PM   #645
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)
Looks like it should work? (device_db is for changing the Sony onboard db on connect, right?)

Are these books you are transferring now?
eschwartz is offline   Reply With Quote
Reply

Tags
custom column, tag, tags


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 11:37 AM.


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