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 01-29-2017, 02:00 PM   #1
Space Dracula
Junior Member
Space Dracula began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jan 2017
Device: Kindle 4
More elegant way of writing my plugboard

I'm using the series column with a series_index of zero to prefix books on my kindle, here's the behavior.

Series = 'Anthology', series_index = 0, title = "Robot Dreams"
-> Athology - Robot Dreams

Books with a non-zero series number come out like so

-> Foundation #02 - Some Spacey Book

And without a series just the title. Here's the code I use, broken over lines:

{series}
{series_index:'finish_formatting(strcmp($, 0, '', '', $), "02d", " #", "")'}
{series:'test($, " - ", "")'}
{title}

Is there a way of doing that more concisely? And I never got format_number to work ever. Windows portable and installed versions. It always output nothing even with numeric test values.

And is there a way to find the max number in a series for a particular author so you could do things like book X of Y. Doing it using inbuilt funcs without adding a custom column with the value.

Thanks.

Last edited by Space Dracula; 01-30-2017 at 08:34 PM.
Space Dracula is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using regex for more elegant hyphenation and word wrap Psymon Sigil 23 12-01-2014 07:27 PM
Literary fiction, the ‘worthy’ writing we dread to read-the genre of elegant despair avid01 Writers' Corner 5 11-12-2013 01:23 AM
Help with writing a plugboard gavinjb Library Management 2 11-06-2013 08:15 PM
Surely Not Elegant but -possibly- effective Napoleon iRex 2 12-09-2008 04:04 AM


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


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