View Single Post
Old 07-22-2020, 11:42 AM   #17
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
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 View Post
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="{&quot;rec_index&quot;: 29, &quot;name&quot;: &quot;Subtitle&quot;, &quot;colnum&quot;: 8, &quot;is_multiple2&quot;: {}, &quot;kind&quot;: &quot;field&quot;, &quot;label&quot;: &quot;subtitle&quot;, &quot;column&quot;: &quot;value&quot;, &quot;category_sort&quot;: &quot;value&quot;, &quot;search_terms&quot;: [&quot;#subtitle&quot;], &quot;is_category&quot;: true, &quot;is_editable&quot;: true, &quot;is_csp&quot;: false, &quot;is_multiple&quot;: null, &quot;display&quot;: {&quot;description&quot;: &quot;&quot;, &quot;use_decorations&quot;: 0}, &quot;#extra#&quot;: null, &quot;#value#&quot;: &quot;Under the Ocean for Sunken Treasure&quot;, &quot;table&quot;: &quot;custom_column_8&quot;, &quot;link_column&quot;: &quot;value&quot;, &quot;is_custom&quot;: true, &quot;datatype&quot;: &quot;text&quot;}" name="calibre:user_metadata:#subtitle" />
Code:
<meta name="calibre:user_metadata:#subtitle" content="{&quot;table&quot;: &quot;custom_column_8&quot;, &quot;display&quot;: {&quot;description&quot;: &quot;&quot;, &quot;use_decorations&quot;: 0}, &quot;label&quot;: &quot;subtitle&quot;, &quot;column&quot;: &quot;value&quot;, &quot;colnum&quot;: 8, &quot;#value#&quot;: &quot;A Sector General Omnibus&quot;, &quot;category_sort&quot;: &quot;value&quot;, &quot;datatype&quot;: &quot;text&quot;, &quot;is_editable&quot;: true, &quot;rec_index&quot;: 29, &quot;search_terms&quot;: [&quot;#subtitle&quot;], &quot;is_multiple2&quot;: {}, &quot;link_column&quot;: &quot;value&quot;, &quot;#extra#&quot;: null, &quot;is_category&quot;: true, &quot;is_multiple&quot;: null, &quot;kind&quot;: &quot;field&quot;, &quot;name&quot;: &quot;Subtitle&quot;, &quot;is_custom&quot;: true, &quot;is_csp&quot;: 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
DNSB is offline   Reply With Quote