![]() |
#1 |
Member
![]() Posts: 11
Karma: 10
Join Date: Jul 2015
Device: Android tablet
|
![]()
I created custom column "Comic Staff" from different custom columns "Comic Inker", "Comic Letterer", "Comic Editor" etc.
I use this template for creation of column: {#com_inker:|(inker) |, }{#com_letterer:|(letterer) |, }{#com_colorist:|(colorist) |, }{#com_editor:|(editor) |, }{#com_cover_artist:|(cover artist) |, } but in columns view it shows ", " at the beginning: , (colorist) name of Colorist, (cover artist) name of Cover Artist, (editor) name of Comic Editor, (inker) name of Inker, (letterer) name of Letterer how to get rid of that column+space at beginning? I know that it sorts alphabetically, and if i remove "," from Comic Colorist it will lose ", " on beginnings, but if next comic doesn't have colorist it will again show it at beginning for Cover artist. Its a small thing but it bugs me. Thanks in advance |
![]() |
![]() |
![]() |
#2 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
There are several ways to do the job, but I think this General Program Mode template is the easiest to understand. It first generates the same value as your template then uses the re() function to remove the trailing comma. Note that the re() searches for comma, not comma-space. This is required because leading and trailing spaces are removed by template(). Code:
program: v = template('{#com_inker:|(inker) |, }{#com_letterer:|(letterer) |, }{#com_colorist:|(colorist) |, }{#com_editor:|(editor) |, }{#com_cover_artist:|(cover artist) |, }'); re(v, ',$', '') |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
|
|
![]() |
![]() |
![]() |
#4 | |
Connoisseur
![]() Posts: 91
Karma: 10
Join Date: Jul 2022
Location: Greenland
Device: xiaomi
|
Quote:
|
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
See this section of the calibre template language manual.
|
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressing "Restore Defaults" under "Book Details" wipes all "Look & Feel" settings. | MarjaE | Library Management | 1 | 03-30-2021 11:46 AM |