Thread: Saving to disk
View Single Post
Old 08-04-2014, 03:28 PM   #2
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)
Code:
program:

# New value for title
title = field('title');
title = transliterate(title);
title = re(
	title,
	'[^a-zA-Z0-9]',
	''
);
title = substr(title, 0, 100);

# Calculate any other bits needed
# Stuff goes here
# Stuff goes here
# Stuff goes here

strcat(
# add up all parts of template, if there is more than just the modified title
	beginning_template_bits,
	title,
	end_template_bits
)
http://manual.calibre-ebook.com/temp...l-program-mode

Last edited by eschwartz; 08-04-2014 at 03:33 PM.
eschwartz is offline   Reply With Quote