Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files have a weird filename after convertion #438

Closed
it0na72 opened this issue Sep 29, 2022 · 3 comments
Closed

Files have a weird filename after convertion #438

it0na72 opened this issue Sep 29, 2022 · 3 comments

Comments

@it0na72
Copy link

it0na72 commented Sep 29, 2022

Using Pop_OS on the latest version 22.04.
My current KCC settings: https://i.imgur.com/ssxQJn6.png
What the output files look like: https://i.imgur.com/DQnHXAt.png

The files itself work when I change the name and remove the ".xdp" in the beginning, and remove the characters after "epub". However is this normal behaviour on linux? Is there anyway to change it?

On the other hand, is it possible to install the beta version on linux? Tried checking the assets but none of them work on linux. Converting to kepub would be a blessing.

Thanks in advance.

@hhtien1408
Copy link

hhtien1408 commented Oct 17, 2022

I wrote step-by-step instructions to install the lastest beta KCC-5.5.3-beta-darodi.6 based on @hiagpofranco idea

$ git clone https://github.com/ciromattia/kcc.git

If you would like to install the official KCC 5.5.2.

@@@ If you would to try KCC v5.5.3-beta-darodi.6 for more device profiles and mozJPEG compression feature to reduce output size, source code is needed to download.

$ wget https://GitHub.com/darodi/kcc/archive]/refs/tags/v5.5.3-beta-darodi.6.zip 
$ unzip v5.5.3-beta-darodi.6.zip

Rename folder 'kcc-5.5.3-beta-darodi.6' into 'kcc' for convenience.

Then I installed the necessary packages. You can do it by running the following command. The requirements.txt file is inside this repository, you will see it when you clone the repo.

$ pip3 install -r '/home/h2t/kcc/requirements.txt' 

This should install the required packages. You can check the version by running

$ pip3 freeze

If the packages are in the wrong version, you can try to upgrade them by running

$ pip3 install --upgrade name_of_the_package

@@@ In case of official or beta update release, you just clone repo or wget with new beta link and install & check requirequirements as above.

$ wget https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz
$ unzip kindlegen_linux_2.6_i386_v2_9.tar.gz
$ sudo cp -R '/home/h2t/Desktop/kindlegen' '/usr/local/bin'
$ sudo chmod +rwx '/usr/local/bin/kindlegen' 

Download and copy kindlegen into '/usr/local/bin' and grant execute permissions for MOBI conversion.

Now, it should be all done. You can go to the folder of this repo and run python file for KCC GUI

$ python3 kcc.py

If everything goes well, you now should be able to use it. However, if you are still seeing the same error, you can try to change the code mentioned in #406. Go to line 258 of kcc/kindlecomicconverter/image.py file and change it with the following line:

self.image = ImageOps.autocontrast(Image.eval(self.image, lambda a: int(255 * (a / 255.) ** gamma)))

Create destop file in '/home/h2t/.local/share/applications' with codes:

#!/usr/bin/env xdg-open

[Desktop Entry]
Type=Application
Name=Kindle Comic Converter
Icon=kcc
Exec=python3 '/home/h2t/kcc/kcc.py'
Terminal=false
StartupWMClass=kcc
Name[en_US]=Kindle Comic Converter

Copy icon file into '/home/h2t/.local/share/icons'

$ sudo cp -R '/home/h2t/Desktop/kcc.png' '/home/h2t/.local/share/icons'

Noted that change 'h2t' for your user name.

It worked flawlessly with KEPUB conversion for my Kobo Aura One and MOBI for KPW3 from CBZ (output with full metadata and TOC).

Hope it could help you!

Tested on Linux Mint 20.3

image

@darodi
Copy link
Collaborator

darodi commented Oct 17, 2022

@hhtien1408

Thanks for this.
I'll add those instructions on my fork homepage as it might help others.

@hhtien1408
Copy link

@hhtien1408

Thanks for this.

I'll add those instructions on my fork homepage as it might help others.

Yeah. Hope it could help other Linux users while KCC Flathub is impossible to use (except metadata editor lol).

This was referenced Oct 17, 2022
@it0na72 it0na72 closed this as completed Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants