Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-12-2016, 10:38 AM   #1
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,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Template Language

I was reading several post about the powerful template language, so I thought I'd try some of the features. Works well for the basic stuff I was experimenting with to add custom columns


1. Would it be possible to validate a template prior to saving it and restarting Calibre? I made a deliberate mistake ( as opposed to my normal ones) and left off a closing brace to see what would happen. It wasn't until it restarted that the error was caught. If it had been validated when I tried to exit, it would have been handier so I could fix it right away

2. Would it be possible to show a preview of the results of the template on the selected book in the template dialog while building it so the user could get a feel for the results? Might be helpful for the new or occasional template creator.

3. After Calibre restarts, the Virtual Library I had open before restarting, is no longer open, and it defaults to All. If I had a VL open when I closed, could (option maybe) the same VL be selected when I come back?
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	466
Size:	194.4 KB
ID:	145454  

Last edited by phossler; 01-12-2016 at 10:43 AM.
phossler is offline   Reply With Quote
Old 01-12-2016, 11:01 AM   #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: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Double-click a custom column, the normal column editing paradigm.

If it is a column built from other columns (template column) it will pop up the template editing dialog. Which has a live preview of the results for the current book record.
It doesn't require a restart.

No need to go digging in the Preferences for the column creation dialog.
Which does require a restart, since it is much more powerful and is meant to modify the column itself, not just the default template.
eschwartz is offline   Reply With Quote
Advert
Old 01-12-2016, 11:58 AM   #3
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,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Actually I tried that with my custom 'MyTitle' (testing) column and all it did was reverse the sort direction when DC the header, and open Edit Metadata when DC a book. No dialog.

Ran out of places to DC.

(Dell XPS 8700, Win10)
phossler is offline   Reply With Quote
Old 01-12-2016, 01:01 PM   #4
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: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)


Tweak: Control behavior of the book list
Quote:
ID: doubleclick_on_library_view

You can control the behavior of doubleclicks on the books list.
Choices: open_viewer, do_nothing,
edit_cell, edit_metadata. Selecting anything other than open_viewer has the
side effect of disabling editing a field using a single click.
Default: open_viewer.
Example: doubleclick_on_library_view = 'do_nothing'
You can also control whether the book list scrolls horizontal per column or
per pixel. Default is per column.
Guess which one I have active, and always forget is actually a personal choice?

Anyway, the F2 key allows you to edit in cell view no matter who you are. And thus to edit the custom column template.
eschwartz is offline   Reply With Quote
Old 01-12-2016, 02:51 PM   #5
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,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
My tweak is set to edit metadata on DC since I find I use that a lot more that the internal viewer or other choices

doubleclick_on_library_view = 'edit_metadata'


Quote:
Anyway, the F2 key allows you to edit in cell view no matter who you are. And thus to edit the custom column template.
Ahhh - to old F2 super secret trick

Just to further embarrass myself, was that in the manual?

I like the instant error messages and the preview ... very nice


But if I was using it to make a plugboard or something other than a custom column, is there an 'instant error' and preview capability? Say, something like the XPath wizard maybe?

Last edited by phossler; 01-12-2016 at 03:01 PM. Reason: Accidently deleted some text
phossler is offline   Reply With Quote
Advert
Old 01-12-2016, 03:10 PM   #6
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: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Yes the F2 trick is in the manual: http://manual.calibre-ebook.com/gui....oard-shortcuts
Quote:
F2 (Enter in OS X): Edit the metadata of the currently selected field in the book list.
No it isn't editable, so it won't appear in Preferences ==> Keyboard


Testing templates elsewhere... sure. You can generally right-click an input box and use "Open Template Editor".

You can also use the Template Tester by clicking a row in the main spreadsheet view, and using the shortcut key CTRL+T (or adding the appropriate toolbar icon wherever you want).

Last edited by eschwartz; 01-12-2016 at 06:44 PM.
eschwartz is offline   Reply With Quote
Old 01-12-2016, 03:50 PM   #7
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,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Thanks again

BTW, I see the user manual was updated to v2.48 on Jan 10
phossler is offline   Reply With Quote
Old 01-12-2016, 04:19 PM   #8
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: 12,014
Karma: 7257321
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
The other possibility is to use the built-in "template tester". It lets you run arbitrary templates on a book of your choice, immediately seeing the results without changing anything in your library.

For convenience I added it to the context menu of the library.

EDIT: ninja'ed by eschwartz because I didn't read beyond the question.
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	439
Size:	153.9 KB
ID:	145460   Click image for larger version

Name:	Clipboard03.jpg
Views:	413
Size:	43.4 KB
ID:	145461  
chaley is offline   Reply With Quote
Old 01-12-2016, 04:37 PM   #9
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,085
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
EDIT: ninja'ed by eschwartz because I didn't read beyond the question
Never hurts to tell me something 2 or 3 times
phossler is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Template language uses title_sort instead of title eMole Calibre 2 03-11-2014 07:22 AM
Help needed with template language Mamaijee Devices 12 02-19-2013 01:52 AM
Help with template language Pepin33 Calibre 8 11-11-2012 08:32 AM
Template language question BookJunkieLI Library Management 7 02-02-2012 06:55 PM
Stupid question about calibre language template Cammagno Calibre 1 01-08-2011 08:00 AM


All times are GMT -4. The time now is 08:43 AM.


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