Bibliophagist
Posts: 36,021
Karma: 145735366
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
Originally Posted by geek1011
Can I see an example of the OPF meta tag for that? Based on skimming the Calibre source code, I think I'll need to parse calibre:user_metadata:#subtitle as JSON, then get the string #value#, but I want to confirm that.
|
Here's some samples, the first two are from epub2 files, the next two are from an epub3. It could have been harder to read if someone had really tried.
Spoiler:
Code:
<meta content="{"rec_index": 29, "name": "Subtitle", "colnum": 8, "is_multiple2": {}, "kind": "field", "label": "subtitle", "column": "value", "category_sort": "value", "search_terms": ["#subtitle"], "is_category": true, "is_editable": true, "is_csp": false, "is_multiple": null, "display": {"description": "", "use_decorations": 0}, "#extra#": null, "#value#": "Under the Ocean for Sunken Treasure", "table": "custom_column_8", "link_column": "value", "is_custom": true, "datatype": "text"}" name="calibre:user_metadata:#subtitle" />
Code:
<meta name="calibre:user_metadata:#subtitle" content="{"table": "custom_column_8", "display": {"description": "", "use_decorations": 0}, "label": "subtitle", "column": "value", "colnum": 8, "#value#": "A Sector General Omnibus", "category_sort": "value", "datatype": "text", "is_editable": true, "rec_index": 29, "search_terms": ["#subtitle"], "is_multiple2": {}, "link_column": "value", "#extra#": null, "is_category": true, "is_multiple": null, "kind": "field", "name": "Subtitle", "is_custom": true, "is_csp": false}" />
Code:
"#subtitle": {
"#extra#": null,
"#value#": "An Oral History of the Zombie War",
"category_sort": "value",
"colnum": 10,
"column": "value",
"datatype": "text",
"display": {
"description": "",
"use_decorations": 0
},
"is_category": true,
"is_csp": false,
"is_custom": true,
"is_editable": true,
"is_multiple": null,
"is_multiple2": {},
"kind": "field",
"label": "subtitle",
"link_column": "value",
"name": "Subtitle",
"rec_index": 29,
"search_terms": [
"#subtitle"
],
"table": "custom_column_10"
}
Code:
<dc:title id="subtitle">An Oral History of the Zombie War</dc:title>
Last edited by DNSB; 07-22-2020 at 11:51 AM.
Reason: Added extra sample for epub3 file
|