From fb0c0231f3012030f94352c8228f57cf487de97c Mon Sep 17 00:00:00 2001 From: darodi <4682830+darodi@users.noreply.github.com> Date: Sun, 22 Jan 2023 17:39:34 +0100 Subject: [PATCH] build pipeline : drop pypi --- .github/workflows/package-linux.yml | 6 - .github/workflows/python-package-test.yml | 50 ----- .github/workflows/python-package.yml | 44 ----- README.md | 219 +--------------------- 4 files changed, 8 insertions(+), 311 deletions(-) delete mode 100644 .github/workflows/python-package-test.yml delete mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/package-linux.yml b/.github/workflows/package-linux.yml index 9d02db0..1a774fa 100644 --- a/.github/workflows/package-linux.yml +++ b/.github/workflows/package-linux.yml @@ -41,11 +41,6 @@ jobs: run: | python setup.py build_binary chmod +x dist/kcc_linux* - - name: upload build - uses: actions/upload-artifact@v3 - with: - name: linux-build - path: dist/kcc_linux* # issue with this action, disabled and commented out # see https://github.com/AppImageCrafters/build-appimage/issues/5 # see https://appimage-builder.readthedocs.io/en/latest/intro/install.html#install-appimagetool @@ -78,5 +73,4 @@ jobs: files: | CHANGELOG.md LICENSE.txt - dist/kcc_linux* *.AppImage* diff --git a/.github/workflows/python-package-test.yml b/.github/workflows/python-package-test.yml deleted file mode 100644 index 4d0166c..0000000 --- a/.github/workflows/python-package-test.yml +++ /dev/null @@ -1,50 +0,0 @@ -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Publish Python distributions to TestPyPI - -on: - push: - tags: - - "v*.*.*" - - # Don't trigger if it's just a documentation update - paths-ignore: - - '**.md' - - '**.MD' - - '**.yml' - - '**.sh' - - 'docs/**' - - 'Dockerfile' - - 'LICENSE' - - '.gitattributes' - - '.gitignore' - - '.dockerignore' - -jobs: - release: - if: github.repository == 'darodi/kcc' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.11 - cache: 'pip' - - name: Install python dependencies - run: | - python -m pip install --upgrade pip setuptools wheel pyinstaller - pip install -r requirements.txt - - name: Build Dist - run: | - sed -i "s#NAME = 'KindleComicConverter'#NAME = 'KindleComicConverterDarodi'#" setup.py - python setup.py sdist - - name: Release On TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - skip_existing: true - verbose: true - print_hash: true diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml deleted file mode 100644 index 90c2a83..0000000 --- a/.github/workflows/python-package.yml +++ /dev/null @@ -1,44 +0,0 @@ -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Publish Python distributions to PyPI - -on: - push: - tags: - - "v*.*.*" - - # Don't trigger if it's just a documentation update - paths-ignore: - - '**.md' - - '**.MD' - - '**.yml' - - '**.sh' - - 'docs/**' - - 'Dockerfile' - - 'LICENSE' - - '.gitattributes' - - '.gitignore' - - '.dockerignore' - -jobs: - release: - if: github.repository == 'ciromattia/kcc' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: 3.11 - cache: 'pip' - - name: Install python dependencies - run: | - python -m pip install --upgrade pip setuptools wheel pyinstaller - pip install -r requirements.txt - - name: Build Dist - run: | - python setup.py sdist - - name: Publish a Python distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 380aa29..1fdb87a 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,10 @@ # KCC -[![GitHub release](https://img.shields.io/github/v/release/ciromattia/kcc?display_name=tag&include_prereleases&label=pre-release)](https://github.com/ciromattia/kcc/releases) -[![PyPI](https://img.shields.io/github/v/release/darodi/kcc?display_name=tag&include_prereleases&label=testPypi)](https://test.pypi.org/project/KindleComicConverterDarodi/) - -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ciromattia/kcc/docker-publish.yml?label=docker%20build)](https://github.com/ciromattia/kcc/pkgs/container/kcc) - -[//]: # ([![AUR](https://img.shields.io/aur/version/kcc-beta.svg?color=orange)](https://aur.archlinux.org/packages/kcc-beta)) [![GitHub release](https://img.shields.io/github/release/ciromattia/kcc.svg)](https://github.com/ciromattia/kcc/releases) -[![PyPI](https://img.shields.io/pypi/v/KindleComicConverter.svg)](https://pypi.python.org/pypi/KindleComicConverter) -[![AUR](https://img.shields.io/aur/version/kcc.svg)](https://aur.archlinux.org/packages/kcc/) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/ciromattia/kcc/docker-publish.yml?label=docker%20build)](https://github.com/ciromattia/kcc/pkgs/container/kcc) + **Kindle Comic Converter** is a Python app to convert comic/manga files or folders to EPUB, Panel View MOBI or E-Ink optimized CBZ. It was initially developed for Kindle but since version 4.6 it outputs valid EPUB 3.0 so _**despite its name, KCC is @@ -38,138 +32,18 @@ If you find **KCC** valuable you can consider donating to the authors: ## INSTALLATION - - ### BINARY RELEASES You can find the latest binary at the following link: - **https://github.com/ciromattia/kcc/releases** - +- flatpak : https://flathub.org/apps/details/io.github.ciromattia.kcc +- Docker: https://github.com/ciromattia/kcc/pkgs/container/kcc ~~- **[Windows](http://kcc.iosphe.re/Windows/) (64-bit only)**~~ ~~- **[macOS](http://kcc.iosphe.re/OSX/) (10.14+)**~~ -~~- **Linux:** Currently unavailable.~~ - - - -#### MacOS installation -##### x86_64 version -see: KindleComicConverter_osx_*.dmg in **https://github.com/ciromattia/kcc/releases** -If you can't open the last beta and the OS says it's damaged, fix it with: -``` -xattr -d com.apple.quarantine /Applications/Kindle\ Comic\ Converter.app -``` - -##### M1/M2 arm64 version - -Building is not available in github on M1 arch. -See this building method, to build it locally: -_Originally posted by @celogeek in https://github.com/darodi/kcc/issues/4#issuecomment-1364553511_ - - -If you can't open and the OS says it's damaged, fix it with: -``` -xattr -d com.apple.quarantine /Applications/Kindle\ Comic\ Converter.app -``` - -Or you could also have a look at this other project: -https://github.com/celogeek/go-comic-converter - -#### Linux installation - - make binary executable - ```bash - $ chmod a+x kcc_linux - ``` - - install 7zip - ```bash - $ sudo apt-get install -y p7zip-full - ``` - - Download kindlegen - ```bash - $ wget -qO- https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz | tar xvz kindlegen - ``` - - copy kindlegen into '/usr/local/bin' and grant execute permissions for MOBI conversion. - ```bash - $ sudo cp -R kindlegen /usr/local/bin && sudo chmod a+x /usr/local/bin/kindlegen - ``` - - run with backend x11 or it might not work with fedora - ```bash - $ GDK_BACKEND=x11 ./kcc_linux - ``` - - - - - - -### PYPI -**KCC** is also available on PyPI. -On Debian based distributions these two commands should install all needed dependencies: -```bash -$ sudo apt-get install python3 python3-dev python3-pip libpng-dev libjpeg-dev p7zip-full python3-pyqt5 -$ pip3 install --user --upgrade pillow python-slugify psutil pyqt5 raven -``` -last version -```bash -$ pip install --index-url https://test.pypi.org/simple/ KindleComicConverterDarodi -``` - -older version (v5.5.2) -```bash -$ pip install --user KindleComicConverter -``` - - - - -### APPIMAGE -- install 7zip - ```bash - $ sudo apt-get install -y p7zip-full - ``` -- Download kindlegen - ```bash - $ wget -qO- https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz | tar xvz kindlegen - ``` -- copy kindlegen into '/usr/local/bin' and grant execute permissions for MOBI conversion. - ```bash - $ sudo cp -R kindlegen /usr/local/bin && sudo chmod a+x /usr/local/bin/kindlegen - ``` -- make appImage executable - ```bash - $ chmod a+x kindleComicConverter-latest-x86_64.AppImage - ``` -- run with backend x11 or it might not work with fedora - ```bash - $ GDK_BACKEND=x11 ./kindleComicConverter-latest-x86_64.AppImage - ``` - - -### DOCKER - -install kindlegen in your working directory and get last docker image -```bash -$ wget -qO- https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz | tar xvz kindlegen -``` -```bash -$ docker pull ghcr.io/ciromattia/kcc:latest -``` - -execute kcc-c2e -```bash -$ docker run --rm -v "$(pwd):/app" ghcr.io/ciromattia/kcc:latest -``` - -example -```bash -$ docker run --rm -v "$(pwd):/app" ghcr.io/ciromattia/kcc:latest -p KPW5 ./1.cbz -``` - -execute kcc-c2p -```bash -$ docker run --entrypoint /opt/kcc/kcc-c2p.py --rm -v "$(pwd):/app" ghcr.io/ciromattia/kcc:latest -``` +~~- **Linux:** Currently unavailable.~~ +more information on [installation](https://github.com/ciromattia/kcc/wiki/Installation) ### DEPENDENCIES Following software is required to run Linux version of **KCC** and/or bare sources: @@ -187,15 +61,9 @@ On Debian based distributions these two commands should install all needed depen ```bash $ sudo apt-get install -y python3 python3-dev libpng-dev libjpeg-dev p7zip-full unrar-free libgl1 python3-pyqt5 && \ python -m pip install --upgrade pip && \ + python -m pip install --upgrade -r requirements.txt ``` -then -```bash -$ python -m pip install --upgrade -r requirements.txt -``` -or -```bash -$ pip3 install --user --upgrade pillow python-slugify psutil pyqt5 raven -``` + #### Optional dependencies - Qt platform integration plugin for Deepin Desktop Environment @@ -207,77 +75,6 @@ $ sudo apt-get install qt5dxcb-plugin – which offers a command line interface and supports [Linux](https://archive.org/details/kindlegen2.9) [(mirror1)](https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz), [Mac OSX](https://web.archive.org/web/20190905040839/https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765211) and [Windows](https://archive.org/details/kindlegen_win32_v2_9) – has been deprecated, but binaries can still be found on the internet. - [7z](http://www.7-zip.org/download.html) *(For CBZ/ZIP, CBR/RAR, 7z/CB7 support)* -### INSTALL FROM SOURCES - -_Originally posted by @hhtien1408 in https://github.com/ciromattia/kcc/issues/438#issuecomment-1281159452_ - -```bash -$ git clone https://github.com/ciromattia/kcc.git -``` -On Debian based distributions these two commands should install all needed dependencies: -```bash -$ sudo apt-get install python3 python3-dev python3-pip libpng-dev libjpeg-dev p7zip-full python3-pyqt5 -``` -Then install 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. - -```bash -$ pip3 install -r 'requirements.txt' -``` - -This should install the required packages. You can check the version by running - -```bash -$ pip3 freeze -``` - -If the packages are in the wrong version, you can try to upgrade them by running - -```bash -$ pip3 install --upgrade name_of_the_package -``` - -Download kindlegen. - -```bash -$ wget https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz | tar xvzf kindlegen -``` -Copy kindlegen into '/usr/local/bin' and grant execute permissions for MOBI conversion. - -```bash -$ sudo cp -R '/home/user/Desktop/kindlegen' '/usr/local/bin' - -$ sudo chmod +rwx '/usr/local/bin/kindlegen' -``` - - -Run python file for KCC GUI -```bash -$ python3 kcc.py -``` - -If everything goes well, you now should be able to use it. - -Create destop file in '~/.local/share/applications' with codes: - -``` -#!/usr/bin/env xdg-open - -[Desktop Entry] -Type=Application -Name=Kindle Comic Converter -Icon=kcc -Exec=python3 '/home/user/kcc/kcc.py' -Terminal=false -StartupWMClass=kcc -Name[en_US]=Kindle Comic Converter -``` - -Copy icon file into '/home/user/.local/share/icons' - -```bash -$ sudo cp -R 'icons/comic2ebook.png' '/home/user/.local/share/icons' -``` - ## INPUT FORMATS