11-12-2023, 01:40 AM | #16 |
Fanatic
Posts: 538
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
|
Indeed... Is there any place where I could find more detailed information about the crash?
|
11-12-2023, 09:42 AM | #17 | |
Grand Sorcerer
Posts: 6,678
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
My only suggestion is to try using an earlier version of the Kindle Previewer, such as 3.60 released November 2021. That was reported to work under Linux/Wine. But even that might not succeed since it was done using specific Linux and Wine releases. You can search the KFX Output plugin thread and see multiple reports of success and failure under Linux using different software versions. Unfortunately Amazon does not make older versions of their software available. You may be able to find them somewhere on the web with the risk of obtaining a copy containing malware. |
|
11-12-2023, 10:14 AM | #18 | |
Fanatic
Posts: 538
Karma: 1000000
Join Date: Dec 2011
Location: Rome, Italy
Device: Kindle PW5, Kindle PW4, Kindle 4 NT
|
Quote:
Thanks! |
|
11-14-2023, 06:00 AM | #19 |
Evangelist
Posts: 428
Karma: 2666666
Join Date: Nov 2020
Device: none
|
Is it doable to write a program to replace the kindle previewer cli that just have some basic features?
|
11-14-2023, 09:49 AM | #20 | |
Grand Sorcerer
Posts: 6,678
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
Perhaps someone with a greater knowledge of Linux and Wine might be able to figure out why the Previewer CLI is failing and come up with a work around, such as using an earlier version of it. |
|
11-14-2023, 10:24 AM | #21 |
Evangelist
Posts: 428
Karma: 2666666
Join Date: Nov 2020
Device: none
|
Wine probably need some configurations to work correctly, maybe dependencies are missing? This document might be helpful if someone want to fix the wine error: https://wiki.archlinux.org/title/Wine
I'd like to create a simple implementation of the preview cli. I want to find the KFX file format in your KFX Input plugin code, but don't know where to look at, could you please give some hints? |
11-14-2023, 12:41 PM | #22 |
the rook, bossing Never.
Posts: 12,249
Karma: 89531599
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Look at Winetricks and Playonlinux on your Linux. Both (and other WINE) stuff are on Mint's Software Manager GUI.
I used to always setup WINE, but I've lost interest in it. It's most use for 32 bit Windows programs that don't work on 64 bit Win7 or Win10, but you need to set an env variable to get that otherwise there is only 64 bit support. I do have an old LT Spice, Word & Excel 2003, Orbitron, VB6 based uTracer and an old Eagle CAD I had on XP (all 32 bit) and a few other 32 bit XP programs that are orphaned or developer is dead. I have also XP. Win7 and Win1o VMs on Vbox. My Weather station GUI on the XP VM, though there is a Linux (web) server program for it. I gave up on Amazon's Windows software on WINE years ago when the PC reader app stopped logging in. I think I tried Kindle Creator or Previewer years ago and they didn't work on WINE. Since we use Calibre for years now rather than Mobipocket Creator (over 12 years ago?) and test ebooks on real ereaders and switched from docx to epub for upload to Amazon Publishing, I can't see the point of the Amazon Windows SW. The Previewer isn't accurate. Also if I want electronic to match paper I use PDF. Otherwise I prefer epub to kepub and azw3 to kfx. AFAIK the only real way to test KFX is to publish and buy the ebook via Whispernet on a suitable real Kindle. Amazon is an increasingly messed up "walled garden". So now I only read epubs on epub compatible (usually Kobo Sage, but also a 5″ Sony and 4.7″ Chinese thing) and only use Kindles to test new layout/format designs in an ebook. Last edited by Quoth; 11-14-2023 at 12:51 PM. |
11-14-2023, 01:24 PM | #23 |
Grand Sorcerer
Posts: 5,430
Karma: 100361384
Join Date: Apr 2011
Device: pb360
|
I would like to point out that xxyzz is the creator of the WordDumb calibre plugin to generate xray and wordwise files and in my opinion has excellent programming skills including designing and implementing applications that are easy (for him) to add new features in a very localized way with very few lines of code. I am amazed by the speed of his response to requests.
When he asks a question, it does not need to be second guessed or deflected. I suspect that if he receives the information he is requesting, something wonderful will result. His code is on github if what I wrote above needs to be verified. |
11-14-2023, 05:22 PM | #24 | |
Grand Sorcerer
Posts: 6,678
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
Notes: KFX and KPF store data structures using Amazon Ion format. That is the only documented aspect of KFX as far as I know. The data structures that make up a book are called fragments. My code contains Ion symbols in their numeric form, such as $123. I did not include a copy of the YJ_symbols symbol table to avoid copying anything significant from Amazon. You can obtain the actual symbol table by decompiling EpubToKFXConverter-4.0.jar from Kindle Previewer and looking for the enumeration that begins with "kProperty_Invalid". The KFX Output plugin converts KPF from Kindle Previewer to KFX. However this is mostly just a repackaging of Ion fragments. The hard work is done by the Kindle Previewer. My code wasn't written to be especially readable. There are no comments. |
|
01-01-2024, 10:12 AM | #25 |
Evangelist
Posts: 428
Karma: 2666666
Join Date: Nov 2020
Device: none
|
I tried to use Amazon's Ion Python library but can't figure out how to read or write the container info data with a shared symbol table(SymbolTableCatalog). If I read the data I get `out of range sid` error, and dump the binary data has some extra symbol table name data.
I'm not sure if it's their code can't be used with KFX data, is this the reason you write your own ion implementation? |
01-01-2024, 03:44 PM | #26 | |
Grand Sorcerer
Posts: 6,678
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
I wrote my own implementation of Ion because at that time I was unaware of Amazon's public version. Once I became aware of it I refined my implementation based on their documentation of the format rather than switching to using their version, largely as a learning experience. |
|
02-14-2024, 10:18 AM | #27 |
Evangelist
Posts: 428
Karma: 2666666
Join Date: Nov 2020
Device: none
|
I think I have figured out how to use the ion library and I'm investigating the kdf sqlite file now. And I have 4 questions so far:
- How fragment ids are created? Only section rows start from "c0", others start from a random id like the first anchor id is "a1B9". - How eidbucket_* rows are created? - The section rows always have an non-exists kfx_id field, for example here is the text ion data of the "c0" row in the fragments table: Code:
$ion_1_0 section::{ section_name: kfx_id::"c0", page_templates: [ structure::{ kfx_id: kfx_id::"i3", story_name: kfx_id::"l4", fixed_width: 1400, fixed_height: 2100, layout: scale_fit, float: center, type: container } ] } - The meaning of the numbers in section_position_id_map, for example, the "c117-spm" row: Code:
$ion_1_0 section_position_id_map::{ section_name: kfx_id::"c117", contains: [ [ 1, kfx_id::"i11A" ], [ 2, kfx_id::"i11E" ], [ 3, kfx_id::"i11C" ], I have attached the epub and the kdf files, I added a text ion table "text_fragments" to the db file. The book is downloaded from https://standardebooks.org. |
02-14-2024, 01:26 PM | #28 | |||
Grand Sorcerer
Posts: 6,678
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
Conventions used in the past that can still be seen in older Amazon books include base64 values and uuids for uniqueness with varying prefixes and suffixes. The current convention is to use a lower case letter indicating the purpose of the symbol followed by a unique value. The letter prefixes I have seen are: a=anchor, b=ruby_content, c=section, d=auxiliary_data, e=resource, f=font, i=structure, l=storyline, n=nav_container, p=path_bundle, s=style, t=kfx_id/eid, z=copy/pasted content. The suffix value increments as new symbols are created and is expressed in base-32 (0-9,A-Z excluding ILOQ). They appear in yj.eidhash_eid_section_map fragments, present in KPF but not KFX format. The data contained is redundant with the section_position_id_map. I have not looked into why they exist or how they are created. Quote:
The symbol "kfx_id" is used for two different purposes. "kfx_id::" is an annotation that identifies what follows as a label. "kfx_id:" is the key that identifies the label that applies to a "structure" data structure. Quote:
There are variations in how the section_position_id_map can be organized. See process_spim() within yj_position_location.py. |
|||
02-15-2024, 06:10 AM | #29 |
Evangelist
Posts: 428
Karma: 2666666
Join Date: Nov 2020
Device: none
|
Thanks! Are there any other table, row or field not used in KFX file?
|
02-15-2024, 10:29 AM | #30 | |
Grand Sorcerer
Posts: 6,678
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Quote:
Nothing else comes to mind. |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Conversion Output] KFX Output | jhowell | Plugins | 1568 | Yesterday 08:55 AM |
[Conversion Output] KePub Output Plugin | jgoguen | Plugins | 566 | 08-07-2024 09:12 AM |
KFX to KFX to remove DRM | Tomifonication | Conversion | 12 | 08-09-2018 01:32 PM |
KFX Soon? | CRussel | Calibre | 16 | 03-06-2016 11:56 AM |
catalogue builder output columns are not in the same order in the output | KWhytte | Library Management | 5 | 12-04-2012 02:03 AM |