11-15-2013, 12:02 AM | #1 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Plugboards equaling null
I need a plugboard that will clear all the tags from any books which I send/save.
All my tags are meant only for sorting using calibre, and I don't need them clogging up the content.opf and getting reimported by other people which will just confuse them. I prefer a minimalist tag style. I suspect it will be somewhere in the functions list, but I don't clearly understand most of the template language. |
11-15-2013, 03:40 AM | #2 |
Grand Sorcerer
Posts: 11,733
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
A plugboard cannot set tags to null (empty). I suggest that you set the tags to some innocuous value, such as the word "None".
|
11-15-2013, 02:44 PM | #3 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Well, in the meantime, experimentation has yielded me this:
Code:
{tags:format_number()} I guess I could do the same with boolean testing for random garbage, or days_between() a non-date. |
11-15-2013, 05:05 PM | #4 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
My suggestion would be this:
- Install "Modify EPUB" plugin. - Create a "Workspace" library. - Copy the books you want to export for other people to the Workspace library. - Remove all tags and other stuff you don't want. - Use "Polish Books" to update metadata, and "Modify EPUB" to strip all non-DC metadata from the OPF. (Maybe you could check both "Update Metadata and "Remove non-DC metadata" in "Modify EPUB", but I have not tried this yet.) |
11-16-2013, 03:33 AM | #5 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Maybe you aren't talking about the plugboard? |
|
11-16-2013, 08:29 PM | #6 | |
Ex-Helpdesk Junkie
Posts: 19,422
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:
I just managed to trick the plugboard into writing a blob of nothingness instead of the tags metadata. Nothingness doesn't actually exist (outside of a few BookWorlds) so it de facto prevents the metadata being written. |
|
11-16-2013, 08:33 PM | #7 | |
Ex-Helpdesk Junkie
Posts: 19,422
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:
I like my way better, since with a simple plugboard I have made sure calibre removes all tags from all books, but keps them in the database, and I don't have any tags except keywords I use for search/virtual libraries/notes on library maintenance I am doing. |
|
11-16-2013, 08:40 PM | #8 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
So which plugboards are you using?
|
11-16-2013, 08:42 PM | #9 | |
Ex-Helpdesk Junkie
Posts: 19,422
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:
|
|
11-16-2013, 08:49 PM | #10 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
Oh, OK; I thought you used that as an experiment and now found a "real" plugboard to do this. I wouldn't be comfortable to trust on a failure to achieve something. Kovid may plug this hole in the plugboard, after which this won't work anymore.
|
11-16-2013, 08:53 PM | #11 | |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
http://manual.calibre-ebook.com/temp...-function-mode
Quote:
It sounds quite deliberate, how safe do you think it will be? |
|
11-16-2013, 09:11 PM | #12 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
It is safe now, but still I wouldn't use a failure to achieve something. This could always be changed to return something else. It would be better if a function would be created that deliberately and *always* returns and empty string. empty_string() maybe?
|
11-16-2013, 09:29 PM | #13 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
What about this? Experimenting on a spare custom column...
A very simple custom function (I'm not quite up to the big stuff yet) Last edited by eschwartz; 11-16-2013 at 09:35 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Other Fiction Stockton, Frank Richard: The Late Mrs. Null. v1. 10 Jul 2013 | crutledge | Kindle Books | 0 | 07-10-2013 07:33 AM |
ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL by | nimblebooks | Conversion | 5 | 11-04-2011 12:38 PM |
searhc:null? | cypherslock | Kobo Tablets | 0 | 11-03-2011 12:28 PM |
Template error value:unknown field null | sfuller | Calibre | 4 | 06-13-2011 03:02 PM |
Bargain Kindle (or Free Kobo) Book: Null Pointer | Loosheesh | Deals and Resources (No Self-Promotion or Affiliate Links) | 8 | 05-08-2011 09:22 AM |