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 08-26-2015, 10:09 PM   #691
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)
Any interesting information would be outputted directly to the terminal. But as-is, the only logging would be exceptions.

You can try adding some simple print statements for what you expect to happen at each stage, and see if anything wonky gets printed.
eschwartz is offline   Reply With Quote
Old 08-30-2015, 08:36 PM   #692
Joy Phillip
Member
Joy Phillip began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2015
Device: Nokia 1020, Kindle Touch
Okay, I'm lost here.

Trying to find the current template recipe to put into the "Custom Column" creation interface that will show a Yes/No check for if the book has a cover or not. I've lost a bunch of covers, and I would hate to have to go through one at a time to find if there's a cover or not. I realize that the UI will show it if I just go to the thumbnails view, but I'd really like to sort on the "covers" column to just get all the ones that DON"T have a cover in one group.

I've been looking for over an hour here, and going through all the "cover" and "column" custom searches in this forum, and there's too many returns.
Joy Phillip is offline   Reply With Quote
Advert
Old 08-30-2015, 09:36 PM   #693
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,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Joy Phillip View Post
Okay, I'm lost here.

Trying to find the current template recipe to put into the "Custom Column" creation interface that will show a Yes/No check for if the book has a cover or not. I've lost a bunch of covers, and I would hate to have to go through one at a time to find if there's a cover or not. I realize that the UI will show it if I just go to the thumbnails view, but I'd really like to sort on the "covers" column to just get all the ones that DON"T have a cover in one group.

I've been looking for over an hour here, and going through all the "cover" and "column" custom searches in this forum, and there's too many returns.
@Joy Phillip - try this, add a custom column like this

Click image for larger version

Name:	Capture.JPG
Views:	543
Size:	40.3 KB
ID:	141528

Search for cover:False. Select all the books(Ctrl+A), then in Bulk Metadata edit change Has Cover to No.

BR

Last edited by BetterRed; 08-30-2015 at 09:43 PM.
BetterRed is offline   Reply With Quote
Old 08-30-2015, 09:51 PM   #694
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,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by BetterRed View Post
@Joy Phillip - try this, add a custom column like this

Attachment 141528

Search for cover:False. Select all the books(Ctrl+A), then in Bulk Metadata edit change Has Cover to No.

BR
Addition - you could automate via a column color/icon rule that uses the has_cover template function see The calibre template language

BR
BetterRed is offline   Reply With Quote
Old 08-30-2015, 10:40 PM   #695
Joy Phillip
Member
Joy Phillip began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2015
Device: Nokia 1020, Kindle Touch
Well, the cover:False was what I needed, so thank you.
Joy Phillip is offline   Reply With Quote
Advert
Old 09-25-2015, 02:42 PM   #696
SMNonMR
Member
SMNonMR began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2014
Device: Kindle Keyboard, Nook, and Android. Oh My!
Hello! I would love some help with an issue I'm trying to solve. In the past, I was reading books on my kindle3 and used this metadata template for the title:

{title}{series_index:0>2s| -|- }

It was simple and worked perfectly for my needs.

Now I'm reading a lot of fanfiction (don't laugh! it's relaxing) and developed a new template that I like.

{title} ({#chapters}ch, {#words}w) {#status} {#updated:format_date(M-d-yy)}

As you can see the new template has completely different info. Is there a way for me to combine the two? I've been manually changing the template in the plugboard (like a heathen) based on the content I'm uploading. Surely there must be some kind of if-then statement I can use.

Basically what I would like is that if the series is called "Fanfiction" to use the second template and if it's not to use the first one. Is that possible? I don't know any programming languages so please walk me through it if it's very complicated. I only got this far in my templating by using what I learned from all of you in this thread. Thank you!
SMNonMR is offline   Reply With Quote
Old 09-25-2015, 03:54 PM   #697
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)
Try this. It uses the General Program Mode, which is a bit more flexible:

Code:
program:

# Candidate template for non-fanfiction books
reg_title = strcat(
	field('title'),
	finish_formatting(
		field('series_index'),
		'0>2s',
		' -',
		'- '
	)
);

# Candidate template for fanfiction books
fanfic_title = strcat(
	field('title'),
	' (',
	field('#chapters'),
	'ch, ',
	field('#words'),
	') ',
	field('#status'),
	' ',
	format_date(
		field('#updated'),
		'M-d-yy'
	)
);

final_title = strcmp(
	field('series'),
	'Fanfiction',
	reg_title,
	fanfic_title,
	reg_title
);
Basically, calculate the two templates, and check the value of series to see if it matches (case-insensitive) "fanfction". Then return whichever template is appropriate.
The last function is the return function, so final_title is the return value of the template.


This looks a little bigger than it really is because I prefer whitespace for readability.

Last edited by eschwartz; 09-25-2015 at 03:57 PM.
eschwartz is offline   Reply With Quote
Old 09-27-2015, 02:59 PM   #698
SMNonMR
Member
SMNonMR began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Aug 2014
Device: Kindle Keyboard, Nook, and Android. Oh My!
It worked!! It worked!!!! That's the first time something ever worked for me on the first try. Thank you so much!

Also, the whitespace made it less intimidating. I was actually able to follow how it worked more or less. So I guess I learned something new today! Yes! Thanks again!
SMNonMR is offline   Reply With Quote
Old 09-27-2015, 03:55 PM   #699
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)
You're welcome.

Mission accomplished on both counts
(I like knowing I have helped someone see the beauty of GPM and how to use it. Half the fun is teaching the other person to recreate the results. Feel free to ask any questions you like.)
eschwartz is offline   Reply With Quote
Old 11-10-2015, 06:30 PM   #700
brainvision
Connoisseur
brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.
 
brainvision's Avatar
 
Posts: 55
Karma: 603120
Join Date: Aug 2012
Location: Monte Los Angeles (Califoggia)
Device: Android Tablet, Kindle Paperwhite
hi guys and girls..

I need help, please!
I would like to know how to reach my ideal configuration when sending files to my Android device..
This is the standard template I use for my Android device

Code:
{series}{publisher:| - (|)}/{series_index:0>3s|[|] - }{title}{authors:| - |}
but while this is perfect when the books has series, it became ugly when they don't!

I tried different way to reach my goal, but unfortunately I had not a complete success. That's why I'm asking you.
What I want to reach is:
Code:
Series - (Publisher)/[series_index] - Title - Author
if the book is in a series; but

Code:
Title - Author
if it is not

Last thing I did was to create two custom columns
Code:
{series} - {publisher}/{series_index} - {title} - {authors}
Code:
{title} - {author}
and then into the device configuration I put

Code:
{series:lookup(.,#BB,#AA)}
but it doesn't work for the series one.. it send books just as the ones without series!
can you help please?

Last edited by brainvision; 11-10-2015 at 06:34 PM.
brainvision is offline   Reply With Quote
Old 11-10-2015, 06:58 PM   #701
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)
Single template that does it all for you.

Code:
program:

prefix_if_series = strcat(
	field('series'),
	' - (',
	field('publisher'),
	')/[',
	field('series_index'),
	'] - '

);

final = strcat(
	test(
		field('series'),
		prefix_if_series,
		''
	),
	field('title'),
	' - ',
	field('authors')
);

Explanation: You want "title - authors", and IF there is a series, you want the series and publisher info in front.

So, first we calculate what all that extra information in front should be.
In the form:
Code:
series - (publisher)/[series #] -
Then, test to see if series has content.
If so, prepend the calculated extra information.
If not, prepend an empty string, i.e. nothing.

Finally, add the:
Code:
title - authors

Last edited by eschwartz; 11-10-2015 at 07:04 PM.
eschwartz is offline   Reply With Quote
Old 11-11-2015, 11:46 AM   #702
brainvision
Connoisseur
brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.
 
brainvision's Avatar
 
Posts: 55
Karma: 603120
Join Date: Aug 2012
Location: Monte Los Angeles (Califoggia)
Device: Android Tablet, Kindle Paperwhite
hi @eschwartz

thanks a lot for your precious help and your detailed explanation.. but it seems I lost a few steps.. I never wroted a program like that and I never used it, so I don't know where it should be placed!!
I tried to create a custom column and then used {#custom_column} in device configuration send to option; I also tried to create a template function from Calibre options (the very last button on the Options GUI, sorry don't know in English how it is called); I also tried to paste this code directly into Send to device field option.. nothing, all I have is a file called something like
Code:
prefix_if_series = strcat(	field('series'),' - (',    field('publisher'),  	')/[',	field('series_index'),	'] - '
So, where and how should I place this code, please?


Oh and BTW, it is possible to use
Code:
series_index:0>3s
instead of series_index into this same code you wrote for me?

Thanks a lot for your help once again!
brainvision is offline   Reply With Quote
Old 11-11-2015, 11:52 AM   #703
brainvision
Connoisseur
brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.
 
brainvision's Avatar
 
Posts: 55
Karma: 603120
Join Date: Aug 2012
Location: Monte Los Angeles (Califoggia)
Device: Android Tablet, Kindle Paperwhite
sorry double post


EDIT:

ok now I got it.. I create a new custom column and used the code you passed me (the error I did was to not write also the program: part); now files without series are saved just fine, but the one with series are saved into the root directory of the main path I selected from device configuration window; Calibre doesn't seem to use the Series - Publisher / part, so it does not create directories.-.

Last edited by brainvision; 11-11-2015 at 12:51 PM.
brainvision is offline   Reply With Quote
Old 11-11-2015, 01:50 PM   #704
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)
Ah, sorry, yes -- the "program:" bit tells the template parser to treat it as a General Program Mode template.

See the template documentation for the gory details: http://manual.calibre-ebook.com/temp...l-program-mode


The template works for me. Where are you saving it?
There are a couple different places to save it. You can save it in
Preferences ==> Sending books to devices
Preferences ==> Saving books to disk
Device dropdown ==> Configure this device

#3 allows you to change how it is saved from the general default in #1
#2 is what you want for saving to disk of course.


I assume the full path that you want is showing in the custom column, yes?
I usually paste it directly into the Preferences -- you can test it with the Template Editor button.
eschwartz is offline   Reply With Quote
Old 11-11-2015, 01:56 PM   #705
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)
Format the series_index, uses the finish_formatting command to duplicate the effects of {field:0>3s|prefix|suffix}

Code:
program:

prefix_if_series = strcat(
	field('series'),
	' - (',
	field('publisher'),
	')/[',
	finish_formatting(
		field('series_index'),
		'0>3s', '', ''
	),
	'] - '

);

final = strcat(
	test(
		field('series'),
		prefix_if_series,
		''
	),
	field('title'),
	' - ',
	field('authors')
);
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:38 PM.


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