mirror of
https://github.com/Leseratte10/acsm-calibre-plugin.git
synced 2024-10-01 21:26:09 +06:00
Compare commits
No commits in common. "27bd9531c44f9896e4ade81c768c12e393e51e9a" and "64aaca3fbea10bd6e16534df4d4409e623b73abd" have entirely different histories.
27bd9531c4
...
64aaca3fbe
32
.github/workflows/main.yml
vendored
32
.github/workflows/main.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install compilers
|
||||
run: |
|
||||
|
@ -33,13 +33,11 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
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
|
||||
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
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install python requirements
|
||||
|
@ -52,7 +50,7 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
container: python:2.7
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install python requirements
|
||||
run: pip install -r ./.github/workflows/ci_test_requirements.txt
|
||||
|
@ -64,7 +62,7 @@ jobs:
|
|||
test-ubuntu-2004:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
@ -85,7 +83,7 @@ jobs:
|
|||
test-ubuntu-2204-oscrypto:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
id: pip-stuff
|
||||
|
@ -114,7 +112,7 @@ jobs:
|
|||
test-ubuntu-2204-oscrypto-fork:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
@ -141,7 +139,7 @@ jobs:
|
|||
test-windows:
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
@ -156,14 +154,22 @@ jobs:
|
|||
|
||||
|
||||
test-mac:
|
||||
runs-on: macos-12
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
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)
|
||||
run: |
|
||||
cd tests && python3 ./main.py && cd ..
|
||||
|
||||
- name: Run tests (Python 2)
|
||||
run: |
|
||||
cd tests && PYTHONWARNINGS=ignore python2 ./main.py && cd ..
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2021-2023 Leseratte10
|
||||
# This file is part of the ACSM Input Plugin by Leseratte10
|
||||
|
@ -7,14 +7,6 @@
|
|||
# For more information, see:
|
||||
# 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/oscrypto.zip ] && ./package_modules.sh
|
||||
|
@ -33,15 +25,15 @@ base64 decrypt_win32.exe > decrypt_win32_b64.txt
|
|||
base64 decrypt_win64.exe > decrypt_win64_b64.txt
|
||||
|
||||
# Base64-encode binaries and place them inside decryptor.py:
|
||||
sed_i "/@@@CALIBRE_DECRYPTOR_WIN32_B64@@@/ {
|
||||
sed "/@@@CALIBRE_DECRYPTOR_WIN32_B64@@@/ {
|
||||
r decrypt_win32_b64.txt
|
||||
d
|
||||
}" ../keyextractDecryptor.py
|
||||
}" -i ../keyextractDecryptor.py
|
||||
|
||||
sed_i "/@@@CALIBRE_DECRYPTOR_WIN64_B64@@@/ {
|
||||
sed "/@@@CALIBRE_DECRYPTOR_WIN64_B64@@@/ {
|
||||
r decrypt_win64_b64.txt
|
||||
d
|
||||
}" ../keyextractDecryptor.py
|
||||
}" -i ../keyextractDecryptor.py
|
||||
|
||||
rm decrypt_win32_b64.txt decrypt_win64_b64.txt
|
||||
rm decrypt_win32.exe decrypt_win64.exe
|
||||
|
@ -65,10 +57,10 @@ for file in **/*.py;
|
|||
do
|
||||
#echo $file
|
||||
# Inject Python2 compat code:
|
||||
sed_i '/#@@CALIBRE_COMPAT_CODE@@/ {
|
||||
sed '/#@@CALIBRE_COMPAT_CODE@@/ {
|
||||
r __calibre_compat_code.py
|
||||
d
|
||||
}' $file
|
||||
}' -i $file
|
||||
|
||||
done
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2021-2023 Leseratte10
|
||||
# This file is part of the ACSM Input Plugin by Leseratte10
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2021-2023 Leseratte10
|
||||
# This file is part of the ACSM Input Plugin by Leseratte10
|
||||
|
|
Loading…
Reference in New Issue
Block a user