Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 10-09-2022, 09:36 PM   #1
littlenellie
Member
littlenellie began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Jan 2019
Location: England
Device: KT4
Question import Word file properties as metadata?

Hi,

I use the Calibre CLI to convert Word *.docx files into epubs. It picks up the book title and author from the filename to add to the generated epub cover.

But I'd also like to be able to include other text that has been added to the Comments property of the *.docx file. Is it possible to import that information into Calibre via the command line as well?

Thanks!
littlenellie is offline   Reply With Quote
Old 10-09-2022, 10:38 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,380
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre reads metadata from docx files automatically. If the docx contains dc:description it will be used as comments. Use the ebook-meta tool to get and set metadata in docx files or indeed any file types that calibre supports.
kovidgoyal is online now   Reply With Quote
Advert
Old 10-10-2022, 05:12 AM   #3
littlenellie
Member
littlenellie began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Jan 2019
Location: England
Device: KT4
I've just realised that I'm looking at this the wrong way, and probably need to change the default cover settings, rather than the values that I'm passing in at the CLI.





How do I use reference that metadata from Calibre with the 'ebook-convert' command?

At the moment I'm passing in the parameters on the command line. Are there built-in Calibre variable names that I can use with ebook-convert?

so instead of:

ebook-convert filename.html filename.epub --title "title"

I'd want to use:

ebook-convert filename.html filename.epub --title whatever title is in Word properties that Calibre has read in as metadata

Hope that makes sense

Last edited by littlenellie; 10-10-2022 at 05:35 AM.
littlenellie is offline   Reply With Quote
Old 10-10-2022, 06:22 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,380
Karma: 23766374
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That will happen automatically, but if you want to set it manually, you use

ebook-meta file.docx

to get the title from the docx file and pass the result to ebook-convert
kovidgoyal is online now   Reply With Quote
Old 10-10-2022, 06:48 AM   #5
littlenellie
Member
littlenellie began at the beginning.
 
Posts: 24
Karma: 10
Join Date: Jan 2019
Location: England
Device: KT4
I've mostly achieved what I need to via the default template, except that when I try to use the Comments meta on the generated cover it includes HTML tags <div><p>Comments text </p></div>

Is there any way to use the Normal view text rather than the HTML view text?


Also, for some reason, the *.docx metadata is not getting read in when I use ebook-convert. It works fine when I open up the Calibre library and generate the cover from there. Is it supposed to work the same way from the CLI?

Last edited by littlenellie; 10-10-2022 at 12:31 PM.
littlenellie is offline   Reply With Quote
Advert
Reply

Tags
import metadata, metadata, word files


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import Author And Title From Filename & Import Other Tags And Cover From File DazJWood Library Management 25 10-06-2021 10:18 AM
Adding PDFs with custom metadata properties mcam Library Management 5 09-17-2020 10:01 AM
Inputting of metadata in file for itunes import MrArtifex Library Management 8 06-24-2012 05:25 PM
Import metadata from file Vinavil Library Management 2 01-28-2012 03:48 PM
Mass import of books metadata from an ASCII file: HELP NEEDED LARdT Calibre 4 07-08-2010 04:05 PM


All times are GMT -4. The time now is 04:13 AM.


MobileRead.com is a privately owned, operated and funded community.