mirror of
https://github.com/Leseratte10/acsm-calibre-plugin.git
synced 2024-09-30 12:46:09 +06:00
Compare commits
4 Commits
64aaca3fbe
...
27bd9531c4
Author | SHA1 | Date | |
---|---|---|---|
|
27bd9531c4 | ||
|
7f89a9c6d1 | ||
|
633768ed51 | ||
|
5a4d25e91d |
32
.github/workflows/main.yml
vendored
32
.github/workflows/main.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install compilers
|
- name: Install compilers
|
||||||
run: |
|
run: |
|
||||||
|
@ -33,11 +33,13 @@ jobs:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] # 3.13-dev currently broken due to lxml
|
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
|
||||||
|
# 3.5 is broken due to SSL issues? Todo.
|
||||||
|
# 3.13-dev currently broken due to lxml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install python requirements
|
- name: Install python requirements
|
||||||
|
@ -50,7 +52,7 @@ jobs:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: python:2.7
|
container: python:2.7
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install python requirements
|
- name: Install python requirements
|
||||||
run: pip install -r ./.github/workflows/ci_test_requirements.txt
|
run: pip install -r ./.github/workflows/ci_test_requirements.txt
|
||||||
|
@ -62,7 +64,7 @@ jobs:
|
||||||
test-ubuntu-2004:
|
test-ubuntu-2004:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -83,7 +85,7 @@ jobs:
|
||||||
test-ubuntu-2204-oscrypto:
|
test-ubuntu-2204-oscrypto:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
id: pip-stuff
|
id: pip-stuff
|
||||||
|
@ -112,7 +114,7 @@ jobs:
|
||||||
test-ubuntu-2204-oscrypto-fork:
|
test-ubuntu-2204-oscrypto-fork:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -139,7 +141,7 @@ jobs:
|
||||||
test-windows:
|
test-windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -154,22 +156,14 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
test-mac:
|
test-mac:
|
||||||
runs-on: macos-11
|
runs-on: macos-12
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
pip3 install -r ./.github/workflows/ci_test_requirements.txt
|
pip3 install -r ./.github/workflows/ci_test_requirements.txt
|
||||||
# Install Python2 stuff
|
|
||||||
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
|
|
||||||
python2 get-pip.py
|
|
||||||
python2 -m pip --no-python-version-warning install -r ./.github/workflows/ci_test_requirements.txt
|
|
||||||
|
|
||||||
- name: Run tests (Python 3)
|
- name: Run tests (Python 3)
|
||||||
run: |
|
run: |
|
||||||
cd tests && python3 ./main.py && cd ..
|
cd tests && python3 ./main.py && cd ..
|
||||||
|
|
||||||
- name: Run tests (Python 2)
|
|
||||||
run: |
|
|
||||||
cd tests && PYTHONWARNINGS=ignore python2 ./main.py && cd ..
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2023 Leseratte10
|
# Copyright (c) 2021-2023 Leseratte10
|
||||||
# This file is part of the ACSM Input Plugin by Leseratte10
|
# This file is part of the ACSM Input Plugin by Leseratte10
|
||||||
|
@ -7,6 +7,14 @@
|
||||||
# For more information, see:
|
# For more information, see:
|
||||||
# https://github.com/Leseratte10/acsm-calibre-plugin
|
# https://github.com/Leseratte10/acsm-calibre-plugin
|
||||||
|
|
||||||
|
sed_i() {
|
||||||
|
script="$1"
|
||||||
|
path="$2"
|
||||||
|
tmpfile="$path.tmp"
|
||||||
|
sed "$script" "$path" > "$tmpfile"
|
||||||
|
mv "$tmpfile" "$path"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[ ! -f calibre-plugin/asn1crypto.zip ] && ./package_modules.sh
|
[ ! -f calibre-plugin/asn1crypto.zip ] && ./package_modules.sh
|
||||||
[ ! -f calibre-plugin/oscrypto.zip ] && ./package_modules.sh
|
[ ! -f calibre-plugin/oscrypto.zip ] && ./package_modules.sh
|
||||||
|
@ -25,15 +33,15 @@ base64 decrypt_win32.exe > decrypt_win32_b64.txt
|
||||||
base64 decrypt_win64.exe > decrypt_win64_b64.txt
|
base64 decrypt_win64.exe > decrypt_win64_b64.txt
|
||||||
|
|
||||||
# Base64-encode binaries and place them inside decryptor.py:
|
# Base64-encode binaries and place them inside decryptor.py:
|
||||||
sed "/@@@CALIBRE_DECRYPTOR_WIN32_B64@@@/ {
|
sed_i "/@@@CALIBRE_DECRYPTOR_WIN32_B64@@@/ {
|
||||||
r decrypt_win32_b64.txt
|
r decrypt_win32_b64.txt
|
||||||
d
|
d
|
||||||
}" -i ../keyextractDecryptor.py
|
}" ../keyextractDecryptor.py
|
||||||
|
|
||||||
sed "/@@@CALIBRE_DECRYPTOR_WIN64_B64@@@/ {
|
sed_i "/@@@CALIBRE_DECRYPTOR_WIN64_B64@@@/ {
|
||||||
r decrypt_win64_b64.txt
|
r decrypt_win64_b64.txt
|
||||||
d
|
d
|
||||||
}" -i ../keyextractDecryptor.py
|
}" ../keyextractDecryptor.py
|
||||||
|
|
||||||
rm decrypt_win32_b64.txt decrypt_win64_b64.txt
|
rm decrypt_win32_b64.txt decrypt_win64_b64.txt
|
||||||
rm decrypt_win32.exe decrypt_win64.exe
|
rm decrypt_win32.exe decrypt_win64.exe
|
||||||
|
@ -57,10 +65,10 @@ for file in **/*.py;
|
||||||
do
|
do
|
||||||
#echo $file
|
#echo $file
|
||||||
# Inject Python2 compat code:
|
# Inject Python2 compat code:
|
||||||
sed '/#@@CALIBRE_COMPAT_CODE@@/ {
|
sed_i '/#@@CALIBRE_COMPAT_CODE@@/ {
|
||||||
r __calibre_compat_code.py
|
r __calibre_compat_code.py
|
||||||
d
|
d
|
||||||
}' -i $file
|
}' $file
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2023 Leseratte10
|
# Copyright (c) 2021-2023 Leseratte10
|
||||||
# This file is part of the ACSM Input Plugin by Leseratte10
|
# This file is part of the ACSM Input Plugin by Leseratte10
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2023 Leseratte10
|
# Copyright (c) 2021-2023 Leseratte10
|
||||||
# This file is part of the ACSM Input Plugin by Leseratte10
|
# This file is part of the ACSM Input Plugin by Leseratte10
|
||||||
|
|
Loading…
Reference in New Issue
Block a user