Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 05-19-2021, 04:42 AM   #1
troubledMan
Connoisseur
troubledMan began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Jun 2016
Location: Best place in the World: my house.
Device: Kindle 3, Kindle Voyage
Metadata insertion in azw3

My usual procedure:

1st) ePub file (starting)
2nd) Kindle Previewer (or kindlegen)
3rd) mobi file (intermediate, disposable)
3rd) KindleUnpack
4th) azw3 (final)

Is there any way to edit or insert metadata like type of document (ebook, personal document) or an ASIN in a azw3 file originated through this conversion route?
I'm on a Mac (High Sierra) and I'd like to be as far as possible from Calibre.

Thanks in advance.
troubledMan is offline   Reply With Quote
Old 05-19-2021, 08:56 AM   #2
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by troubledMan View Post
Is there any way to edit or insert metadata like type of document (ebook, personal document) or an ASIN in a azw3 file originated through this conversion route?
I'm on a Mac (High Sierra) and I'd like to be as far as possible from Calibre.
Shameless plug: You might find my Sigil KindleGen plugin helpful.
Doitsu is offline   Reply With Quote
Advert
Old 05-19-2021, 09:02 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Doitsu View Post
Shameless plug: You might find my Sigil KindleGen plugin helpful.
There is a simpler solution. Insert the metdata in the ePub before conversion. That way, the conversion only needs to be done once.
JSWolf is offline   Reply With Quote
Old 05-19-2021, 11:21 AM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by JSWolf View Post
There is a simpler solution. Insert the metdata in the ePub before conversion. That way, the conversion only needs to be done once.
The OP specifically stated that s/he doesn't want to use Calibre:

Quote:
Originally Posted by troubledMan View Post
I'm on a Mac (High Sierra) and I'd like to be as far as possible from Calibre.
Doitsu is offline   Reply With Quote
Old 05-19-2021, 11:37 AM   #5
troubledMan
Connoisseur
troubledMan began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Jun 2016
Location: Best place in the World: my house.
Device: Kindle 3, Kindle Voyage
Quote:
Originally Posted by Doitsu View Post
Shameless plug: You might find my Sigil KindleGen plugin helpful.
I'll try it, although I coudn't do anything fruitful with Sigil the last time I installed it: problems with my python installation, I suppose.

To be very clear, my final goal is that the azw3 files from the conversion of ePubs can be recognized as BOOK and not as Personal Document. For me, the ideal solution would be something similar to the KFX Output plugin's CLI.

Thank you.
troubledMan is offline   Reply With Quote
Advert
Old 05-19-2021, 11:51 AM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by troubledMan View Post
I'll try it, although I coudn't do anything fruitful with Sigil the last time I installed it: problems with my python installation, I suppose.
Make sure to download the latest version.
(It comes with its own Python interpreter.)

The plugin should set the EBOK metadata entry in AZW3 mode.

Last edited by Doitsu; 05-19-2021 at 11:54 AM.
Doitsu is offline   Reply With Quote
Old 05-19-2021, 12:02 PM   #7
troubledMan
Connoisseur
troubledMan began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Jun 2016
Location: Best place in the World: my house.
Device: Kindle 3, Kindle Voyage
Quote:
Originally Posted by Doitsu View Post
BTW, my plugin won't set the BOOK metadata entry, but you can use it to run the KFX plugin in command line mode.
KFX Output plugin? If the answer is yes, I have to admit that I didn't try it on azw3. I'll have to look for that other plugin otherwise.

Maybe it's time to ask in the jhowell's KFX Output plugin subforum.

Thank you
troubledMan is offline   Reply With Quote
Old 05-19-2021, 12:36 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Doitsu View Post
The OP specifically stated that s/he doesn't want to use Calibre:
Sigil will work perfectly well to add the metadata to the ePub before the conversion.
JSWolf is offline   Reply With Quote
Old 05-19-2021, 12:47 PM   #9
troubledMan
Connoisseur
troubledMan began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Jun 2016
Location: Best place in the World: my house.
Device: Kindle 3, Kindle Voyage
Quote:
Originally Posted by JSWolf View Post
Sigil will work perfectly well to add the metadata to the ePub before the conversion.
If Sigil can set the type of document as BOOK, I’ll try that way only if I get Sigil & plug-ins function in my system, and will check if the set metadata in the ePub survive the process of conversion to azw3.

Thank you
troubledMan is offline   Reply With Quote
Old 05-19-2021, 12:49 PM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by troubledMan View Post
If Sigil can set the type of document as BOOK, I’ll try that way only if I get Sigil & plug-ins function in my system, and will check if the set metadata in the ePub survive the process of conversion to azw3.

Thank you
That means yet more steps to get to what you want. You have to convert the KF8 to ePub and then exit that and then convert back to KF8. Editing the ePub before you convert works better and less steps.
JSWolf is offline   Reply With Quote
Old 05-19-2021, 01:49 PM   #11
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by troubledMan View Post
If Sigil can set the type of document as BOOK [...]
You can add ASIN metadata entries in Sigil, but you can't add EBOK (=book type) metadata entries. However, since the Python library that the KindleGen plugin uses to add ASIN metadata entries also adds EBOK metadata entries by default, you won't have to add EBOK metadata entries for converting EPUBS to AZW3 books, if an ASIN metadata entry is present.

Quote:
Originally Posted by troubledMan View Post
Maybe it's time to ask in the jhowell's KFX Output plugin subforum.
jhowell kindly gave me permission to integrate his KFX Output plugin into my plugin. It'll also generate EBOK KFX files by default.
BTW, you could also easily change the KFX Ouput command line parameters by editing the plugin.py file.
Doitsu is offline   Reply With Quote
Old 05-19-2021, 02:11 PM   #12
troubledMan
Connoisseur
troubledMan began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Jun 2016
Location: Best place in the World: my house.
Device: Kindle 3, Kindle Voyage
Quote:
Originally Posted by Doitsu View Post
You can add ASIN metadata entries in Sigil, but you can't add EBOK (=book type) metadata entries. However, since the Python library that the KindleGen plugin uses to add ASIN metadata entries also adds EBOK metadata entries by default, you won't have to add EBOK metadata entries for converting EPUBS to AZW3 books, if an ASIN metadata entry is present.
I’ve learnt a lot with you this afternoon! Thank you very much! I hope to be successful following your indications, as my previous attempts on the subject editing the ePub’s opf file failed miserably.
troubledMan is offline   Reply With Quote
Old 05-20-2021, 10:45 AM   #13
troubledMan
Connoisseur
troubledMan began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Jun 2016
Location: Best place in the World: my house.
Device: Kindle 3, Kindle Voyage
Well, I installed Sigil & kindlegen plugin following Doitsu's kind advises and the result after run the plugin was:

Status: failed

Traceback (most recent call last):
File "/Applications/Sigil.app/Contents/plugin_launchers/python/launcher.py", line 141, in launch
target_script = __import__(script_module)
File "/Users/*****/Library/Application Support/sigil-ebook/sigil/plugins/KindleGen/plugin.py", line 25, in <module>
from tkinter import Tk, BOTH, StringVar, IntVar, BooleanVar, PhotoImage, messagebox, DISABLED
File "tkinter/__init__.py", line 36, in <module>
ImportError: dlopen(/Applications/Sigil.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_tkinter.cpython-38-darwin.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl
Referenced from: /Applications/Sigil.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_tkinter.cpython-38-darwin.so
Reason: image not found
Error: dlopen(/Applications/Sigil.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_tkinter.cpython-38-darwin.so, 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl
Referenced from: /Applications/Sigil.app/Contents/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_tkinter.cpython-38-darwin.so
Reason: image not found

What's more, I couldn't find how to customize the plugin. I do not know where to go in the Sigil interface to achieve that.
And I don't know where to go from this point. Any help is very welcome.
troubledMan is offline   Reply With Quote
Old 05-20-2021, 12:17 PM   #14
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by troubledMan View Post
Well, I installed Sigil & kindlegen plugin following Doitsu's kind advises and the result after run the plugin was:
macOS users will need to install the ActiveState TCL package. For more information, see this website.

Quote:
Originally Posted by troubledMan View Post
What's more, I couldn't find how to customize the plugin.
The plugin comes with its own GUI, which requires the macOS ActiveState TCL package.

Last edited by Doitsu; 05-20-2021 at 12:20 PM.
Doitsu is offline   Reply With Quote
Old 05-20-2021, 12:41 PM   #15
troubledMan
Connoisseur
troubledMan began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Jun 2016
Location: Best place in the World: my house.
Device: Kindle 3, Kindle Voyage
Thank you very much, Doitsu. I’ll try it as soon as I can.
troubledMan is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mass Insertion of <a></a> tags EClaire Conversion 13 01-02-2019 08:48 AM
Problem adding metadata (.opf, .mobi, .azw3) mobilemax Library Management 3 04-27-2016 11:29 AM
Are cover.jpg and metadata.opf files included with Book.azw3 important? omareg94 Amazon Kindle 13 02-11-2015 06:11 AM
disable insertion of page numbers Taantric Conversion 2 01-23-2012 05:42 PM
linux kernel module compilation + insertion gdkags Kindle Developer's Corner 3 09-21-2010 05:27 PM


All times are GMT -4. The time now is 12:14 AM.


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