View Single Post
Old 02-28-2014, 02:08 PM   #18
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)
Quote:
Originally Posted by svda View Post
Yes, no date => blank
Right, so what's the problem? It's already doing that. If pubdate is undefined, it will be left out. Although I did discover that the space between the author and the title, if there is no series or pubdate, is missing, so I migrated it out of the ifempty test. Fixed version:

Code:
program:
    strcat(
        template("{author_sort}/{title}/{author_sort} - {series:|[|}"),' ',
        ifempty(
            finish_formatting(
                field("series_index"),
                '0>3',
                '',
                '] '
            ),
            finish_formatting(
                format_date(
                    field('pubdate'),
                    'yyyy'),
                '',
                '(',
                ') '
            )
        ),
        field('title')
)
eschwartz is offline   Reply With Quote