12-30-2013, 02:13 PM | #406 | |
Ex-Helpdesk Junkie
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)
|
Quote:
4 & 5 I really think the best way to deal with it is to change the actual series name, you can do this really fast in the tag editor to the left. Right-click on any series name and choose "rename", it will change for all books with that metadata field. 6 can be done easily, no problem: In the calibre manual for advanced formatting is all kinds of cool stuff, which you may want to take a look at for lots of cool new tricks, but this particular bit is what you are looking for right now: Spoiler:
using ":" after the field name says lets go advanced formatting. "0" says lets add zeros. ">" says lets add them to the beginning ("<" would put them at the end) and "3s" says let there always be at least 3 characters in the string. So "{series_index:0>3s}" will add enough leading zeros to make sure there are always at least 3 characters. If you wish to take into account decimal-notated short stories, use "5.2f" instead, which adds the "0" to beginning and end to format the number as "5" digits, with ".2" or two digits AFTER the decimal. The value is calculated as a "f" that takes decimals and is very strict that there will always be "5" digits. So: Use {series_index:0>3s} for series' into the hundreds, and {series_index:0>5.2f} for series' into the tens with short stories in between. If you wish to do both, use {series_index:0>6.2f} which will make all series' show as 001.00 and onward. |
|
12-30-2013, 02:29 PM | #407 | ||
Enthusiast
Posts: 41
Karma: 10
Join Date: Nov 2013
Device: Kindle PW
|
Quote:
Quote:
<snip> So: Use {series_index:0>3s} for series' into the hundreds, and {series_index:0>5.2f} for series' into the tens with short stories in between. If you wish to do both, use {series_index:0>6.2f} which will make all series' show as 001.00 and onward.[/QUOTE] I can't imagine where I would need a situation where 001.00 would be necessary. To use different templates for different series, would the best way to go about this be to store the different series (say, the one with 190 titles) in a separate virtual library, and apply {series_index:0>3s} to that library, and then use {series_index:0>5.2f} in a different virtual library for all the others? |
||
12-30-2013, 03:03 PM | #408 | |
Ex-Helpdesk Junkie
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)
|
Quote:
|
|
12-30-2013, 03:13 PM | #409 |
Enthusiast
Posts: 41
Karma: 10
Join Date: Nov 2013
Device: Kindle PW
|
Okay, thank you. The clumsier possibility is that I could have two plugboards (one saved in a text doc and cut/pasted to replace the other when necessary) and switch between them depending on which library I am sending to the device.
|
12-30-2013, 04:03 PM | #410 | |
Ex-Helpdesk Junkie
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)
|
Quote:
Different databases have different plugboards. Virtual libraries share the same database, so they use the same plugboards; They are just glorified searches, really. |
|
12-30-2013, 08:38 PM | #411 | |
Enthusiast
Posts: 41
Karma: 10
Join Date: Nov 2013
Device: Kindle PW
|
Quote:
ETA: Okay, now that I have had a chance to plug them it, it looks like they are working, so yay! I didn't screw it up! Question: with {series_index:0>5.2f}, what would I change to have only one decimal place instead of two? I've never had a series numbered 1.11, 1.12, 1.13 and so forth. If I ever do, clearly now I have the code for it, but since I don't... according to your explanation about how the code works above, would I change it to {series_index:0>4.1f}? Okay, yep! That worked. And having experimented with a bunch of other configurations, it looks like that is as close as we can get to suppressing leading or trailing zeroes when they're unnecessary without compromising on the sequential ordering. Last edited by ACGAuthor; 12-30-2013 at 09:45 PM. |
|
12-31-2013, 12:11 PM | #412 | |
Ex-Helpdesk Junkie
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)
|
Quote:
And no need to apologize for less obvious features not being more obvious, it takes us all a little experience (and perhaps a lot of help) to get used to all the things you can do! I mean, there are so many of them, where do you start learning? (Or so I thought in the beginning. Now I'm a pro. I think. ) Last edited by eschwartz; 12-31-2013 at 12:14 PM. |
|
12-31-2013, 12:44 PM | #413 | |
Enthusiast
Posts: 41
Karma: 10
Join Date: Nov 2013
Device: Kindle PW
|
Quote:
Regarding things like templates and plugboards I sort of have a mental block where this kind of stuff is concerned. I can't seem to teach myself just by reading about it--it just all seems like so much gibberish--but if someone breaks it down and explains it to me, with examples, I can usually figure out how to monkey-see-monkey-do the simpler stuff. So your little explanation about what the numbers and symbols meant helped a lot. If you ever do figure out a more streamlined way to add a specific tag based on the array of various tags each different book might have, (like one overall tag for SFF/UF/PNR when the tags the books might come with are scifi, sci-fi, science fiction, fantasy, urban, urban fantasy, vampires, werewolves, magic, paranormal, etc etc etc) I would be very interested in that. It won't help categorize books that come with no tags or only very vague and general ones, but it would help. Thanks again for everything. This was fun! |
|
12-31-2013, 02:02 PM | #414 | |||
Ex-Helpdesk Junkie
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)
|
Quote:
Quote:
Quote:
|
|||
12-31-2013, 02:29 PM | #415 | ||
Enthusiast
Posts: 41
Karma: 10
Join Date: Nov 2013
Device: Kindle PW
|
Quote:
Quote:
|
||
01-06-2014, 12:20 AM | #416 | ||
Ex-Helpdesk Junkie
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)
|
Quote:
Would you like to try this now? If I remember correctly, you want to generate a #collections field, which will be used by Kindle Collections to create collections, right? So what you will want is something along the lines of Code:
{tags:switch(Sci-Fi,SFF/UF/PNR,(Urban )?Fantasy,SFF/UF/PNR,none)} So we can expand that to match all your tags, and add any other stuff you need into the collection naming. Problem from before: Quote:
Stupid me, I know what the problem is here. I created a new capture group at the beginning to remove leading spaces, but left the replace code replacing the nonexistent capture group. Properly, it should've been this (fix in red): Code:
Name: #initials. Template: {#stripped_series:re(([\s])?([^\s])[^\s]+(\s|$),\2)}
Code:
Name: #initials. Template: {#stripped_series:re([\s]?([^\s])[^\s]+(\s|$),\1)} And without the formatting error, it seems to work perfectly. Try this again? EDIT: @chaley, perhaps this should be updated in the first post? This is derived from what Kovid used in his general program mode guide. I used [^\s] instead of [\w], following your lead, but added the inverse at the beginning, like Kovid's example. EDIT by chaley: done. Last edited by chaley; 01-06-2014 at 03:10 AM. |
||
01-06-2014, 12:28 AM | #417 | |
Ex-Helpdesk Junkie
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)
|
Quote:
We will edit the #stripped_series field, which is already removing the leading (A|The|An) and the full scan will look like this: Code:
(^(A|The|An)\s+|\s+(Files|Series|Trilogy)$) Code:
Name: #stripped_series. Template: {series:re(^(A|The|An)\s+,)||} Code:
Name: #stripped_series. Template: {series:re((^(A|The|An)\s+|\s+(Files|Series|Trilogy)$),)||} |
|
01-06-2014, 12:44 AM | #418 | ||||
Enthusiast
Posts: 41
Karma: 10
Join Date: Nov 2013
Device: Kindle PW
|
Welcome back! Hope you had a great holiday!
Quote:
Quote:
It would be easy enough to tell it to generate a collection based on X, Y, and Z tags, but the tags you might get when downloading metadata (or using the metadata in the file) are all over the place. So yeah, the idea would be to search for a set of tags like "Sci-Fi, Science Fiction, Fantasy, Urban Fantasy, Paranormal, vampires, shifters, etc etc, etc" and have it generate either a another tag, or a value for a "Genre" column, that would just be "SFF/UF/PNR". Same principle for all the variations of tags you might find on M/M Romance books, only with that I want to go a step further. Because this is the genre I publish in, I read a lot of it, naturally. Enough so that it's not going to do me much good making a collection for each author because there are hundreds. So except for the ones I would like to have in their own author/series collections, I would like them to go into a collection that would be (for example) "M/M misc authors A-B" (C-D, E-G, H-L, M-R, S-Z). So if the book had Genre=M/M Romance (based upon the tags) AND has "Author Grouping A-B" (based on the code you gave me a couple weeks ago." It would get sorted into the collection "M/M misc authors A-B" Of course, then there's the question of how to distinguish the "misc" authors from the special authors who get their own folders, which I'm sure is an entirely different headache, lol. Quote:
Quote:
And I see you posted something else while I was writing this. Back in a moment with answers for that! |
||||
01-06-2014, 12:49 AM | #419 | |
Enthusiast
Posts: 41
Karma: 10
Join Date: Nov 2013
Device: Kindle PW
|
Quote:
|
|
01-06-2014, 01:02 AM | #420 |
Ex-Helpdesk Junkie
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)
|
As far as "Science Fiction", "Sci-Fi", "scifi" goes, you may just want to edit those tags directly, since they are the same thing, but not conforming to standards across metadata sources. I would think it's better to have these changes available directly in the tag browser, and of course it will shorten what may become quite the list.
Any tag can be edited in the tag browser and the change will propagate across all books with that tag, merging with a pre-existing tag if necessary. |
Tags |
custom column, tag, tags |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
custom column i need a little help | shinken | Calibre | 3 | 09-15-2010 03:41 AM |
Using Custom Metadata in Save Template | EJvdH | Calibre | 1 | 07-02-2010 06:06 AM |
Accessories Decalgirl Kindle 2 custom skin template | srmalloy | Amazon Kindle | 6 | 04-09-2010 09:55 PM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |