View Single Post
Old 11-29-2014, 09:04 PM   #618
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,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
You can also make it conditional on whether or not the series is there.
http://manual.calibre-ebook.com/temp...l-program-mode

But it is still dependent on having tags or series.

Code:
program:

series_formatted = strcat(
		finish_formatting(
			field('series'),
			'',
			'',
			''
		),
		finish_formatting(
			field('series_index'),
			'0>3s',
			' ',
			''
		)
	);

# Main
strcat(
	field('author_sort'),
	finish_formatting(
		ifempty(
			series_formatted,
			uppercase(field('tags'))
		),
		'',
		', - ',
		''
	)
)
Junger, Sebastian, - CONTEMPORARY, CREATIVE NONFICTION

Or, if the book was in a series:
Junger, Sebastian, - Andrea Gail 001

Or if there is no tags OR series:
Sebastian Junger

Last edited by eschwartz; 11-29-2014 at 09:25 PM.
eschwartz is offline   Reply With Quote