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 04-08-2012, 06:30 PM   #286
PepSnick
Enthusiast
PepSnick doesn't litterPepSnick doesn't litter
 
Posts: 31
Karma: 166
Join Date: Apr 2012
Device: Nook Color
Here's what I'm gonna do .. change the plugboard to alter the title instead of the author, and try it on a few of the books that are out of order and see if they at least go back where they are supposed to be, and see what happens with that.
PepSnick is offline   Reply With Quote
Old 04-08-2012, 07:15 PM   #287
PepSnick
Enthusiast
PepSnick doesn't litterPepSnick doesn't litter
 
Posts: 31
Karma: 166
Join Date: Apr 2012
Device: Nook Color
Oooooooookay, so this isn't good .. I reverted back to normal, and now .. they are still out of order. I feel like I broke the thing, lol, these books have been on my nook for a while and were never out of order before, so it shouldn't be the books themselves. ;\
PepSnick is offline   Reply With Quote
Old 04-09-2012, 02:57 AM   #288
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,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
It seems as if the NC is sorting incorrectly. I can imagine several classes of bugs that would make it do that, but I have no clue if the bugs really exist. One type of bug would cause it to fail once the number of books goes over some magic number. Another would cause failure when the amount of metadata goes over some value. A third could be caused by a corrupted internal DB (assuming the NC has such a thing).

The only way I can see to debug this sort of problem is to factory-reset the NC. The reason for the factory reset is to remove anything that the NC might be remembering. Next, set the plugboard the way you want, then start adding books. Add them in small quantities and check if the sort stays stable and correct. Don't change the plugboard in the middle of the experiment. It might be best to start with the books that are currently failing.

A factory reset will disconnect the NC from your B&N account. Be sure that you can reconnect it before you do the reset. I don't know what "rules" B&N imposes for device counts, or whether B&N will recognize that the same device is reconnecting.
chaley is offline   Reply With Quote
Old 04-09-2012, 11:10 AM   #289
PepSnick
Enthusiast
PepSnick doesn't litterPepSnick doesn't litter
 
Posts: 31
Karma: 166
Join Date: Apr 2012
Device: Nook Color
I was really, really hoping to avoid a factory reset because I have a lot of apps with saved data on it that I don't want to lose. A factory reset is my last resort only.

Last night I messed with it for hours, I even went through and uploaded them all to my nook one by one instead of in any kind of bulk and it was working for a while. But now it's all of my books pretty much that are out of order, and not just those 27. I took basically all of them off instead of the series i'm currently reading until I can figure out what the problem is. I don't think it has anything to do with the amount of books on it, because I've had way more books on there than what I have now.

My cord recently broke so i've been using a different micro cord to plug it into the computer, do you think that has anything at all to do with it? I sure do wish I had never messed with the plugboard to begin with and kept it how it was .. at least it was sorting correctly then.
PepSnick is offline   Reply With Quote
Old 04-09-2012, 04:33 PM   #290
PepSnick
Enthusiast
PepSnick doesn't litterPepSnick doesn't litter
 
Posts: 31
Karma: 166
Join Date: Apr 2012
Device: Nook Color
Okay, I reverted back to the original again and reuploaded them back onto my nook yet again, and finally it started sorting right .. it seems the plugboard just really confused my nook into how to sort, or what to sort. guess i'm just stuck. at least it's fixed!
PepSnick is offline   Reply With Quote
Old 04-09-2012, 09:34 PM   #291
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 PepSnick View Post
it seems the plugboard just really confused my nook into how to sort, or what to sort. guess i'm just stuck. at least it's fixed!
I'm just curious, you never did tell us exactly what you chose for Format and Device in your plugboard. This might have something to do with it. You say you have a Nook Color, did you use Nook_color under device? If so did you try to change that to any device to see if it sorted differently? Or the reverse if you chose any device.

Did you have just one plugboard configured? I had two plugboards at the same time once (to long ago to remember exact details) and they conflicted with each other.

Good Luck.
DoctorOhh is offline   Reply With Quote
Old 04-09-2012, 10:12 PM   #292
PepSnick
Enthusiast
PepSnick doesn't litterPepSnick doesn't litter
 
Posts: 31
Karma: 166
Join Date: Apr 2012
Device: Nook Color
For format I chose epub because that's all I use, for device I chose nook color. But, I'm dumb and realized what it was doing .. It was using the 01 as the last name, and using the first nbame as te first name because those were the first and last places on there.. I don't know why it only did it for some books at first or why it didn't fix until way later, but it does explain the sorting. Using that, I don't think there is a way I can put it in the author sectio without it messing up one way or another, it would have to be the title and I just can't take how unorganized that looks. So I will just try to use shelves more and hope they stay there.
PepSnick is offline   Reply With Quote
Old 04-09-2012, 10:14 PM   #293
PepSnick
Enthusiast
PepSnick doesn't litterPepSnick doesn't litter
 
Posts: 31
Karma: 166
Join Date: Apr 2012
Device: Nook Color
Oh and I only used one, though I tried two when it was recommended.

Sorry for the typos, I'm on my phone.
PepSnick is offline   Reply With Quote
Old 04-10-2012, 12:02 PM   #294
PepSnick
Enthusiast
PepSnick doesn't litterPepSnick doesn't litter
 
Posts: 31
Karma: 166
Join Date: Apr 2012
Device: Nook Color
I think I might just put the series index by the title, because that's little so it won't look terribly clunky. It won't tell me which series but it will take some of the guesswork out of it .. I really only need the series info at times when I don't have wifi, which is not often because otherwise I can just look it up on goodread. I wanted it to work but I can see now why it didn't, I liked the way it looked lol. I do have an idea for something, but I need to make sure its possible.
PepSnick is offline   Reply With Quote
Old 04-20-2012, 04:50 PM   #295
ChrisKaos
Enthusiast
ChrisKaos began at the beginning.
 
Posts: 36
Karma: 10
Join Date: Apr 2012
Device: Kindle Touch
Hi. I'm looking to do a rather complicated plugboard, and I honestly have no clue how to do it and was wondering if you could help.

Currently I'm using this: {series:re(([^\s])[^\s]+(\s|$),\1)}{series_index:0>2s| | - }{title}

But that's a bit wonky sometimes, and was hoping for something a bit cleaner. I'd like for a plugboard to use the first letter of each word in the series, but not use "T" when the series begins with "The," as well as not using any special characters like &. Also, if the author only has one book series, I'd like there to not be anything except 01, 02, 03 in front of the title name, since I don't need the extra information in that case.

I have no clue if any or all of that is possible, but I would appreciate any help anyone's willing to give!
ChrisKaos is offline   Reply With Quote
Old 05-05-2012, 03:13 AM   #296
pawcook
Junior Member
pawcook began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2012
Device: kindle
Quote:
Originally Posted by pchrist7 View Post
Hi All
The following HOWTO was developped in another thread.
Chaley suggested to put it here as well.
Do you have a Kindle ?
Did you ever want Calibre to show "Read Status" of your books in a column ?
Automagically ?
Then the following might for you as well.
You must be running Calibre 0.7.40 or newer to use this.
Also you must use "Fetch annotations" from you Kindle.
The following example is based on the following Kindler requirements:
"What I want is a custom column to show the "Last Opened" Date if Last location read > 95%.
If the book shows >0% but < 95%, I want the column to show "Reading"
And if the book is 0%, or unopened, the column should show "Not Read".
Howto "Fetch annotations" from you Kindle:
Start Calibre,
Connect your Kindle, wait a bit,
Click on the arrow just to the right of the "Send to Device" icon,
choose "Fetch Annotations"
and the Kindle "Book status" is added to the Calibre book details, in the comments.
You should Fetch fresh Annotations everytime you connect your Kindle to get updated information.
This is just an example of what I could get with my K3:
25-12-2010
Last Page Read: Location 7365 (68%)
Location 4603 • Bookmark
Location 4942 • Bookmark
Location 4980 • Bookmark
Location 5984 • Bookmark
Location 7363 • Bookmark
The best/fastest way, but hardest way, to get the needed information into a custom column, is to use Python Template functions.
Sounds scary, but don't worry. Copy/paste is your helper
Simply do as follows:
1) go to Preferences -> Advanced -> Template Functions.
2) in the Function box type: kindle_read_status
3) in the Arg count box type: 4
4) in the Documentation box, paste the following:
Code:
Check if the associated field contains a kindle annotation for percent read.
If not, return no_page_read_str.
If annotations are found, then compare that percent against is_read_pct.
If the val is larger, then return date,
if the val is >0 and < is_read_pct return is_reading_str.
Otherwise return is_not_read_str.
One usage: {comments:kindle_read_status(95,Not Read,Reading)}
( use the above when defining your custom column )
95 goes into variable is_read_pct
Not Read goes into variable no_page_read_str
Reading goes into variable is_reading_str
Feel free to change the %, the test strings to suit your needs.
Do this in the custom column definition.
5) In the Program Code box, paste the following:
Code:
def evaluate(self, formatter, kwargs, mi, locals, val, is_read_pct,	is_reading_str, no_page_read_str):	try:	test_val = int(is_read_pct)	except:	return 'is_read_pct is not a number'	import re	mg = re.match('.*\s(\d+[-/]\d+[-/]\d+).*?Last Page Read: Location \d+ \((\d+)%\)', val, re.I + re.DOTALL);	if mg is None:	return no_page_read_str	date = mg.group(1)	pct = mg.group(2)	try:	f = int(pct)	if f > test_val:	return date	elif f > 0:	return is_reading_str + ': ' + pct + '%'	except:	pass	return no_page_read_str
6) press the Create button, then the Apply button.
7) Still in Preferences, Choose Add your own columns
8) Choose Add custom column bar at the bottom
9) enter the following into your custom column:
Lookup name: read_status
Column Heading: Read Status
Column type: Column built from other columns
Template:
Code:
{comments:kindle_read_status(95,Reading,Not Read)}
10) Choose Apply
11) Click Ok to the Restart Warning
12) Shutdown Calibre
13) Start Calibre
If you followed instructions minutely, you should have a new column showing the "Read Status" for your books.
If you like this functionality, please remember to send some Karma to chaley
https://www.mobileread.com/forums/rep....php?p=1351864
He has been absolutely fantastic and helpfull with this.
If this fails, please try one more time before posting to this thread.
This has been tested by several Kindlers succesfully.
Enjoy
Note: If you want a text returned instead of a date when a book is read
have a look here:
https://www.mobileread.com/forums/sho...&postcount=172
I really want to get this working but keep getting an 'Exception while compiling function' error when clicking on Create, it seems to be a 'SyntaxError: invalid syntax
I have tried over and over copy and pasting the program code but no joy. I am using Calibre 0.8.34
Thanks in advance for any help
pawcook is offline   Reply With Quote
Old 05-06-2012, 12:34 AM   #297
pchrist7
Addict
pchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animals
 
pchrist7's Avatar
 
Posts: 385
Karma: 6514
Join Date: Aug 2010
Location: Denmark
Device: Kindle 3 3G+Wifi, Oasis
TABS ? Or ...

Quote:
Originally Posted by pawcook View Post
I really want to get this working but keep getting an 'Exception while compiling function' error when clicking on Create, it seems to be a 'SyntaxError: invalid syntax
I have tried over and over copy and pasting the program code but no joy. I am using Calibre 0.8.34
Thanks in advance for any help
Hi pawcook
Hmm, I wonder if all indents in the program code are <TABS> ?
Must be.
Your quote of original post step 5 looks weird ?
Looks like 1 line, should be 22 lines like this:
Code:
def evaluate(self, formatter, kwargs, mi, locals, val, is_read_pct,  
				is_reading_str, no_page_read_str):
	try:
		test_val = int(is_read_pct)
	except:
		return 'is_read_pct is not a number'

	import re
	mg = re.match('.*\s(\d+[-/]\d+[-/]\d+).*?Last Page Read: Location \d+ \((\d+)%\)', val, re.I + re.DOTALL);
	if mg is None:
		return no_page_read_str
	date = mg.group(1)
	pct = mg.group(2)
	try:
		f = int(pct)
		if f > test_val:
			return date
		elif f > 0:
			return is_reading_str + ': ' + pct + '%'
	except:
		pass
	return no_page_read_str
Please give it another try.

Cheers, Per
pchrist7 is offline   Reply With Quote
Old 05-15-2012, 02:26 AM   #298
Euclase
Junior Member
Euclase began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2012
Device: Kindle Touch
Quote:
Originally Posted by Gary_M_Mugford View Post
Euclase,

Check out the ifempty function. My own Kindle pegboard is a bit convoluted since it uses custom columns to reduce the series title to six characters or less (using initials where necessary). But the principal can probably help you.

[{#readrank:ifempty(9)}{#genre:ifempty(SF)}] {#stripped_series:lookup(.\s,#initials,.,#shortene d,series)}{series_index:|-|-}{title}

Note the use of ifempty in a couple of the columns. What I would do with yours is to try series:ifempty(--) in place of series:. That would create a -- at the start of any title without a series entry and those SHOULD sort to the front in title sort on the Kindle. Haven't tried it, but it 'should' work.

GM
Hi Gary,

My sincere apologies for not replying sooner with feedback to your advice. Life became a snowglobe that someone turned over, and things have only now settled, permitting me to tinker in Calibre again. The good news is the ifempty function works! My plugboard now looks like this (I repeated the plugboard for both my .mobi formats and my .azw formats to successfully cover all my bases):

{series:ifempty(--)}{series_index:0>2s|[|] - }{title}

The only (minor) bad news is, as my template stands now, it works 98% of the time. Standalone titles that start with a "The" article, e.g. The Call of The Wild, ended up mixed in with the series. Perhaps I'll uncover a solution for that in time (besides having Title, The in the original metadata field). Thank you very much for your help!

Last edited by Euclase; 05-15-2012 at 02:48 AM.
Euclase is offline   Reply With Quote
Old 05-18-2012, 02:15 PM   #299
pawcook
Junior Member
pawcook began at the beginning.
 
Posts: 2
Karma: 10
Join Date: May 2012
Device: kindle
Quote:
Originally Posted by pchrist7 View Post
Hi pawcook
Hmm, I wonder if all indents in the program code are <TABS> ?
Must be.
Your quote of original post step 5 looks weird ?
Looks like 1 line, should be 22 lines like this:
Code:
def evaluate(self, formatter, kwargs, mi, locals, val, is_read_pct,  
				is_reading_str, no_page_read_str):
	try:
		test_val = int(is_read_pct)
	except:
		return 'is_read_pct is not a number'

	import re
	mg = re.match('.*\s(\d+[-/]\d+[-/]\d+).*?Last Page Read: Location \d+ \((\d+)%\)', val, re.I + re.DOTALL);
	if mg is None:
		return no_page_read_str
	date = mg.group(1)
	pct = mg.group(2)
	try:
		f = int(pct)
		if f > test_val:
			return date
		elif f > 0:
			return is_reading_str + ': ' + pct + '%'
	except:
		pass
	return no_page_read_str
Please give it another try.

Cheers, Per
Per thank you so very much, that works a treat now.
pawcook is offline   Reply With Quote
Old 05-20-2012, 02:49 AM   #300
pchrist7
Addict
pchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animals
 
pchrist7's Avatar
 
Posts: 385
Karma: 6514
Join Date: Aug 2010
Location: Denmark
Device: Kindle 3 3G+Wifi, Oasis
Thumbs up Goody nice to hear

Quote:
Originally Posted by pawcook View Post
Per thank you so very much, that works a treat now.
Hi pawcook !
No problem. Nice to hear you solved it.
Welcome to the club

Cheers, Per
pchrist7 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:50 AM.


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