Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 06-06-2018, 07:25 PM   #46
sitrucz
Connoisseur
sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.
 
sitrucz's Avatar
 
Posts: 52
Karma: 40919
Join Date: Sep 2012
Device: Kindle Paperwhite 3, Apple iPad Mini
I was able to import a kfx book, convert it to epub, and view it in Calibre's internal viewer. I make use of folder actions to copy a .mobi, .azw, and .azw3 from My Kindle Content to the auto-calibre folder. This folder tells Calibre to import the book automatically which then I have rules set up to convert to epub etc... My question is when it copies the main file to auto-calibre it doesn't import correctly. Is there a way to look at the name of the file and then go to the My Kindle Content folder and then look for that file there to import?
sitrucz is offline   Reply With Quote
Old 06-06-2018, 07:59 PM   #47
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 2,349
Karma: 24554618
Join Date: Nov 2011
Location: Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by sitrucz View Post
Is there a way to look at the name of the file and then go to the My Kindle Content folder and then look for that file there to import?
Trying to do that within this plugin would be messy. It isn't something that I would want to do.

You have a couple of alternatives.

When you find a book in KFX format in My Kindle Content you could zip the content of the book's folder, rename that to have a .kfx-zip extension and put that file in the auto add folder, instead of just the main book file.

Or you could write a new calibre File Type plugin that would be activated when you put something in the auto-add folder and would then perform the actions described above, searching My Kindle Content for a matching book folder, zipping it up, etc.
jhowell is online now   Reply With Quote
Advert
Old 06-07-2018, 07:28 AM   #48
sitrucz
Connoisseur
sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.sitrucz writes the songs that make the whole world sing.
 
sitrucz's Avatar
 
Posts: 52
Karma: 40919
Join Date: Sep 2012
Device: Kindle Paperwhite 3, Apple iPad Mini
Quote:
Originally Posted by jhowell View Post
Trying to do that within this plugin would be messy. It isn't something that I would want to do.

You have a couple of alternatives.

When you find a book in KFX format in My Kindle Content you could zip the content of the book's folder, rename that to have a .kfx-zip extension and put that file in the auto add folder, instead of just the main book file.

Or you could write a new calibre File Type plugin that would be activated when you put something in the auto-add folder and would then perform the actions described above, searching My Kindle Content for a matching book folder, zipping it up, etc.
I'll have to see if I can create an Automator script to zip up the files.

I've wanted to get into plugin writing. I have an infatuation with k2pdfopt and now this file type plugin idea. So, I may look around the forums on where to get started on plugin development. I know Python but definitely not an expert.

Thanks.
sitrucz is offline   Reply With Quote
Old 06-11-2018, 02:00 PM   #49
nkirkis
Junior Member
nkirkis began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2018
Device: computer Mac and e-book Kobo
i'm using MacOS high Sierra 10.13.4 and have tried to download KFX Input.zip (119.9 KB, 3722 views) trough CALIBRE ''download a plugin from a file''.

No file to open was accessible.

Any idea what should be done to open the right file ?
nkirkis is offline   Reply With Quote
Old 06-11-2018, 03:06 PM   #50
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 2,349
Karma: 24554618
Join Date: Nov 2011
Location: Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by nkirkis View Post
Any idea what should be done to open the right file ?
I recommend downloading and installing via the calibre GUI following the instructions under "How do I install a plugin using Plugin Updater?" in the Introduction to plugins post.
jhowell is online now   Reply With Quote
Advert
Old 06-12-2018, 11:15 AM   #51
nkirkis
Junior Member
nkirkis began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jun 2018
Device: computer Mac and e-book Kobo
Quote:
Originally Posted by jhowell View Post
I recommend downloading and installing via the calibre GUI following the instructions under "How do I install a plugin using Plugin Updater?" in the Introduction to plugins post.

thanks i followed the instruction you gave and have progressed.

However i'm still blocked by DRM.

I need to deDRM the book i bought on Kindle to read it on my KOBO reader.

Is there any simple procedure to follow to solve this issue.

thanks
nkirkis is offline   Reply With Quote
Old 06-12-2018, 11:27 AM   #52
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 2,349
Karma: 24554618
Join Date: Nov 2011
Location: Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by nkirkis View Post
However i'm still blocked by DRM.
Instructions for DRM removal are not allowed on MobileRead. For help either raise an issue at Apprentice Harper’s Github or ask on Apprentice Alf’s blog.
jhowell is online now   Reply With Quote
Old 06-19-2018, 11:46 PM   #53
meghane_e
Member
meghane_e began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Sep 2016
Device: Kindle
Before I post to GitHub, I wanted to check on where in the process I'm having a problem. I'm sending a kindle book from my Amazon account to my PC. Then I upload the book into Calibre. However, there's no attached metadata- no title, no author, so it's just generic codes. The book is readable, so technically the import is working, right? Is there a Calibre -> Add Book setting I need to change? It currently converts imports to MOBI. Should it be ePub? Is there a way to make setup for one library and a different one for another library? Or is it a kindle conversion plugin setting I need to change? Thank you very much!

Last edited by meghane_e; 06-19-2018 at 11:50 PM. Reason: added detail
meghane_e is offline   Reply With Quote
Old 06-20-2018, 09:34 AM   #54
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 2,349
Karma: 24554618
Join Date: Nov 2011
Location: Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by meghane_e View Post
However, there's no attached metadata- no title, no author, so it's just generic codes. The book is readable, so technically the import is working, right?
If the book appears to import correctly, but the title is coming out something like "B123456789 EBOK" then you should look under Preferences -> Adding Books that the option "Read metadata from file contents rather than file name" is checked.

If that setting is already checked then the most likely reason for such a title is a failure to import correctly. But that doesn't seem to be the case since the book comes out readable.

If you mean something else by "generic codes" then give an example.

Quote:
Originally Posted by meghane_e View Post
It currently converts imports to MOBI. Should it be ePub?
A book in KFX format should import as KFX if successful. A failure to import should result in AZW or KFX-ZIP. If the book imports as MOBI then it is in MOBI format, not KFX and this plugin will have nothing to do with that book.

This is assuming that you have not set "Automatically convert added books to the current output format" in Preferences -> Adding Books -> Adding actions. If you are using that setting then uncheck it so that you can see what format is actually being imported.
jhowell is online now   Reply With Quote
Old 06-20-2018, 02:54 PM   #55
meghane_e
Member
meghane_e began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Sep 2016
Device: Kindle
Hi jhowell, thanks for the reply! I double checked those two settings, "Read Metadata from file contents" (check mark) and "Automatically convert added book to current output" (unchecked). It's still importing the books with the generic codes like B123456789 EBOK for the titles. Even though the books have those titles, they're all readable in the Calibre viewer. Also, they import as either MOBI or AZW, which seems expected behavior to me. Any other ideas?
meghane_e is offline   Reply With Quote
Old 06-20-2018, 03:38 PM   #56
meghane_e
Member
meghane_e began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Sep 2016
Device: Kindle
amazon book codes instead of titles

Here's a clip of the how they import. These were imported AFTER I checked the recommended settings. The newly imported books are readable in Calibre viewer. Thanks!
Attached Thumbnails
Click image for larger version

Name:	import-amazon-kindle-books.PNG
Views:	89
Size:	15.3 KB
ID:	164571  

Last edited by meghane_e; 06-20-2018 at 03:40 PM.
meghane_e is offline   Reply With Quote
Old 06-20-2018, 05:58 PM   #57
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 2,349
Karma: 24554618
Join Date: Nov 2011
Location: Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by meghane_e View Post
Also, they import as either MOBI or AZW, which seems expected behavior to me. Any other ideas?
Since they import as other formats it appears the books you are importing are not KFX. It is likely that this plugin is not related to the problem.

One other thing to check is in Preferences->Plugins->Metadata reader plugins, make sure the "Read MOBI metadata" plugin is not disabled.

It may be possible to find more about what is going wrong by running calibre in debug mode (right-click Preferences->Restart in debug mode) and then importing one of those books. After calibre is closed a log will pop up that you can post for analysis.
jhowell is online now   Reply With Quote
Old 06-21-2018, 02:03 PM   #58
meghane_e
Member
meghane_e began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Sep 2016
Device: Kindle
Quote:
Originally Posted by jhowell View Post
Since they import as other formats it appears the books you are importing are not KFX. It is likely that this plugin is not related to the problem.
Hmmm, I think you're right. Because when you download books to the Kindle reader they're KFX, and so when you copy the files from Kindle reader to PC on USB, they're still KFX. But if you download to the Kindle app on PC [NOTE ver. 1.17.1 for compatible output], it downloads them as AZW and MOBI (rarely HTML). So it is not a KFX plug-in issue! Sorry about spreading my confusion to this thread, lol. At least I'm a bit clearer on what's going on.

You're tips for debugging look helpful, so I'll do that and look for an appropriate thread from there. Thank you so very much for your time responding.

[RESOLUTION!]: It's fixed after my laptop crash, Calibre reinstalled itself, found "Read MOBI data" turned off which was weird. So not sure, but think maybe a plugin conflict somewhere. Thank you!

Last edited by meghane_e; 06-22-2018 at 11:40 AM.
meghane_e is offline   Reply With Quote
Old 06-23-2018, 10:11 AM   #59
daddyjones
Junior Member
daddyjones began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2018
Device: Kindle Paperwhite
I'm trying to import a kfx file from my local file system and it's failing - here's the error messages:

Quote:
calibre, version 3.26.1 (linux2, embedded-python: False)
Conversion error: Failed: Convert book 1 of 1 (The Last Coven B01N9VVE9D)

Convert book 1 of 1 (The Last Coven B01N9VVE9D)
Conversion options changed from defaults:
output_profile: 'kindle_pw3'
read_metadata_from_opf: u'/tmp/calibre_3.26.1_tmp_rs1JjL/w4XPCh.opf'
verbose: 2
Resolved conversion options
calibre version: 3.26.1
{'allow_conversion_with_errors': False,
'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_justification': u'original',
'chapter': u"//*[((name()='h1' or name()='h2') and re:test(., '\\s*((chapter|book|section|part)\\s+)|((prolog|pr ologue|epilogue)(\\s+|$))', 'i')) or @class = 'chapter']",
'chapter_mark': u'pagebreak',
'comments': None,
'cover': None,
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_compress': False,
'duplicate_links_in_toc': False,
'embed_all_fonts': False,
'embed_font_family': None,
'enable_heuristics': False,
'expand_css': False,
'extra_css': None,
'extract_to': None,
'filter_css': u'',
'fix_indents': True,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x7f503e8c3510>,
'insert_blank_line': False,
'insert_blank_line_size': 0.5,
'insert_metadata': False,
'isbn': None,
'italicize_common_cases': True,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'markup_chapter_headings': True,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'mobi_file_type': u'old',
'mobi_ignore_margins': False,
'mobi_keep_original_images': False,
'mobi_toc_at_start': False,
'no_chapters_in_toc': False,
'no_inline_navbars': True,
'no_inline_toc': False,
'output_profile': <calibre.customize.profiles.KindlePaperWhite3Outpu t object at 0x7f503e8c3d10>,
'page_breaks_before': u'/',
'personal_doc': u'[PDOC]',
'prefer_author_sort': False,
'prefer_metadata_cover': False,
'pretty_print': False,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': u'/tmp/calibre_3.26.1_tmp_rs1JjL/w4XPCh.opf',
'remove_fake_margins': True,
'remove_first_image': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'replace_scene_breaks': u'',
'search_replace': '[]',
'series': None,
'series_index': None,
'share_not_sync': False,
'smarten_punctuation': False,
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'start_reading_at': None,
'subset_embedded_fonts': False,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'transform_css_rules': '[]',
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: KFX Input running
on /tmp/calibre_3.26.1_tmp_rs1JjL/b9Kaxv.kfx
Traceback (most recent call last):
File "/usr/bin/calibre-parallel", line 20, in <module>
sys.exit(main())
File "/usr/lib/calibre/calibre/utils/ipc/worker.py", line 195, in main
result = func(*args, **kwargs)
File "/usr/lib/calibre/calibre/gui2/convert/gui_conversion.py", line 33, in gui_convert_override
override_input_metadata=True)
File "/usr/lib/calibre/calibre/gui2/convert/gui_conversion.py", line 26, in gui_convert
plumber.run()
File "/usr/lib/calibre/calibre/ebooks/conversion/plumber.py", line 1088, in run
accelerators, tdir)
File "/usr/lib/calibre/calibre/customize/conversion.py", line 244, in __call__
log, accelerators)
File "calibre_plugins.kfx_input.__init__", line 87, in convert
File "calibre_plugins.kfx_input.__init__", line 174, in report_version
File "/usr/lib/python2.7/platform.py", line 1571, in platform
distname,distversion,distid = dist('')
File "/usr/lib/python2.7/platform.py", line 365, in dist
full_distribution_name=0)
File "/usr/lib/python2.7/platform.py", line 334, in linux_distribution
f = open('/etc/'+file, 'r')
IOError: [Errno 20] Not a directory: '/etc/debian_version'
Any ideas as to why this is failing?
daddyjones is offline   Reply With Quote
Old 06-23-2018, 10:59 AM   #60
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 2,349
Karma: 24554618
Join Date: Nov 2011
Location: Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by daddyjones View Post
I'm trying to import a kfx file from my local file system and it's failing - here's the error messages: ...
The python function that returns information about the OS platform is failing for some reason on your system.

That information is only being displayed for debugging. In the next release of this plugin I will have it continue even when this error occurs.
jhowell is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Conversion Input] Microsoft Doc Input Plugin igi Plugins 67 08-31-2017 01:54 PM
KFX conversion, transfer back to library issue. shoelesshunter Conversion 2 08-22-2017 06:40 PM
[Conversion Input] LaTeX Formulas Input Conversion Plugin sevyls Plugins 0 03-23-2015 05:52 AM
[Input Plugin] DOCX Input SauliusP. Plugins 42 06-05-2013 04:01 AM
Looking For MHT Input Conversion Plugin FlooseMan Dave Plugins 4 03-30-2010 05:52 PM


All times are GMT -4. The time now is 10:52 AM.


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