@oren64: I found and (hopefully) fixed the problem with outputting to a relative path, I pushed a new version on GitHub and PyPI, v3.1.0. You can upgrade penelope with:
> pip install penelope --upgrade
@Simpetus: using k=2 prefix length on your dictionary produced more than 64k prefixes, and that caused an error producing the ZIP file: only the first 64k prefix .html files were actually put in the ZIP file, and that should explain why the dictionary did not work on your Kobo.
As discussed above, in Penelope v3.1.0 I added the flag:
--group-by-prefix-length
This allows you to set the length of the prefix to be used when grouping headwords into the .html files. The default value is 2 (equivalent to the behavior of Penelope v3.0.1 and earlier).
In your case, setting it to 1 ( --group-by-prefix-length=1 ), it will produce ~24k prefixes; the resulting ZIP is valid, but yet I do not know if the Kobo is able to handle it.
=== === ===
As I discussed above, one workaround consists in merging the "raw" groups (but I do not know if the Kobo software can handle it). To do so, you can use the following flags:
--group-by-prefix-merge-min-size
Sets the minimum number of headwords that each .html file must contain. Setting it to, say, 1000, will merge prefix .html until at least 1000 headwords are included. Then it starts a new .html, and so on. (a, b, c, ... z => a (a+b+c), d (d+e+f+g), etc...)
--group-by-prefix-merge-across-first
When specified, this flag instructs Penelope to merge groups even if the first character is different. In your case, specify it. (The flag is also used when outputting EPUB or MOBI, and in that case user might want to PREVENT merging headwords with different initial letter. That's why the default value for the setting is False, and you need to explicitly specify the above flag to set it to True.)
To recap, you might want to try generating a dictionary with Penelope v3.1.0 with:
1. --group-by-prefix-length=1
If the resulting dictionary works on your Kobo, you are good. Otherwise, try:
2. --group-by-prefix-length=1 --group-by-prefix-merge-min-size=1000 --group-by-prefix-merge-across-first
And again see if that works on your Kobo.
|