Skip to content

Commit ce8b295

Browse files
committed
Merge remote-tracking branch 'upstream/main' into hardcover
2 parents c02df51 + c5fcd81 commit ce8b295

File tree

29 files changed

+573
-277
lines changed

29 files changed

+573
-277
lines changed

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Enforce LF for all shell scripts and related files
2+
*.sh text eol=lf
3+
*.bash text eol=lf
4+
*.env text eol=lf
5+
*.conf text eol=lf
6+
Dockerfile text eol=lf
7+
*.yml text eol=lf
8+
**/run text eol=lf

.github/workflows/dockerhub-build-push-on-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
BUILD_DATE=${{ github.event.repository.updated_at }}
5858
VERSION=${{ vars.CURRENT_DEV_VERSION }}-DEV_BUILD-${{ env.IMAGE_TAG }}-${{ vars.CURRENT_DEV_BUILD_NUM }}
5959
tags: |
60-
${{ secrets.DOCKERHUB_USERNAME }}/calibre-web-automated:dev-${{ env.IMAGE_TAG }}
60+
${{ secrets.DOCKERHUB_USERNAME }}/calibre-web-automated:dev
6161
6262
platforms: linux/amd64,linux/arm64
6363

Dockerfile

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ ARG BUILD_DATE
2727
ARG VERSION
2828
ARG CALIBREWEB_RELEASE=0.6.24
2929
ARG LSCW_RELEASE=0.6.24-ls304
30-
ARG UNIVERSAL_CALIBRE_RELEASE=7.16.0
30+
ARG CALIBRE_RELEASE=8.4.0
31+
ARG KEPUBIFY_RELEASE=v4.0.4
3132
LABEL build_version="Version:- ${VERSION}"
3233
LABEL build_date="${BUILD_DATE}"
3334
LABEL CW-Stock-version="${CALIBREWEB_RELEASE}"
@@ -88,15 +89,21 @@ RUN \
8889
pip install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/ubuntu/ -r \
8990
requirements.txt -r \
9091
optional-requirements.txt && \
91-
# STEP 1.8 - Installs the latest release of kepubify
92-
echo "***install kepubify" && \
93-
if [ -z ${KEPUBIFY_RELEASE+x} ]; then \
92+
# STEP 1.8 - Installs kepubify
93+
echo "**** install kepubify ****" && \
94+
if [[ $KEPUBIFY_RELEASE == 'newest' ]]; then \
9495
KEPUBIFY_RELEASE=$(curl -sX GET "https://api.github.com/repos/pgaskin/kepubify/releases/latest" \
9596
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
9697
fi && \
97-
curl -o \
98-
/usr/bin/kepubify -L \
99-
https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-64bit && \
98+
if [ "$(uname -m)" == "x86_64" ]; then \
99+
curl -o \
100+
/usr/bin/kepubify -L \
101+
https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-64bit; \
102+
elif [ "$(uname -m)" == "aarch64" ]; then \
103+
curl -o \
104+
/usr/bin/kepubify -L \
105+
https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-arm64; \
106+
fi && \
100107
# STEP 2 - Install Calibre-Web Automated
101108
echo "~~~~ CWA Install - installing additional required packages ~~~~" && \
102109
# STEP 2.1 - Install additional required packages
@@ -157,28 +164,31 @@ RUN \
157164
libxdamage1 \
158165
libgl1 \
159166
libglx-mesa0 \
160-
xz-utils && \
167+
xz-utils \
168+
binutils && \
161169
# STEP 3.2 - Make the /app/calibre directory for the installed files
162170
mkdir -p \
163171
/app/calibre && \
164-
# STEP 3.3 - Download the desired version of Calibre, determined by the UNIVERSAL_CALIBRE_RELEASE variable and the architecture of the build environment
172+
# STEP 3.3 - Download the desired version of Calibre, determined by the CALIBRE_RELEASE variable and the architecture of the build environment
165173
if [ "$(uname -m)" == "x86_64" ]; then \
166174
curl -o \
167175
/calibre.txz -L \
168-
"https://download.calibre-ebook.com/${UNIVERSAL_CALIBRE_RELEASE}/calibre-${UNIVERSAL_CALIBRE_RELEASE}-x86_64.txz"; \
176+
"https://download.calibre-ebook.com/${CALIBRE_RELEASE}/calibre-${CALIBRE_RELEASE}-x86_64.txz"; \
169177
elif [ "$(uname -m)" == "aarch64" ]; then \
170178
curl -o \
171179
/calibre.txz -L \
172-
"https://download.calibre-ebook.com/${UNIVERSAL_CALIBRE_RELEASE}/calibre-${UNIVERSAL_CALIBRE_RELEASE}-arm64.txz"; \
180+
"https://download.calibre-ebook.com/${CALIBRE_RELEASE}/calibre-${CALIBRE_RELEASE}-arm64.txz"; \
173181
fi && \
174182
# STEP 3.4 - Extract the downloaded file to /app/calibre
175183
tar xf \
176184
/calibre.txz -C \
177185
/app/calibre && \
186+
# STEP 3.4.1 - Remove the ABI tag from the extracted libQt6* files to allow them to be used on older kernels
187+
strip --remove-section=.note.ABI-tag /app/calibre/lib/libQt6* && \
178188
# STEP 3.5 - Delete the extracted calibre.txz to save space in final image
179189
rm /calibre.txz && \
180-
# STEP 3.6 - Store the UNIVERSAL_CALIBRE_RELEASE in the root of the image in CALIBRE_RELEASE
181-
echo $UNIVERSAL_CALIBRE_RELEASE > /CALIBRE_RELEASE
190+
# STEP 3.6 - Store the CALIBRE_RELEASE in the root of the image in CALIBRE_RELEASE
191+
echo $CALIBRE_RELEASE > /CALIBRE_RELEASE
182192

183193
# Removes packages that are no longer required, also emptying dirs used to build the image that are no longer needed
184194
RUN \
@@ -202,4 +212,4 @@ COPY --from=unrar /usr/bin/unrar-ubuntu /usr/bin/unrar
202212
EXPOSE 8083
203213
VOLUME /config
204214
VOLUME /cwa-book-ingest
205-
VOLUME /calibre-library
215+
VOLUME /calibre-library

Dockerfile_calibre_not_included

Lines changed: 0 additions & 166 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Calibre-Web Automated aims to be an all-in-one solution, combining the modern li
124124
#### **Server Stats Tracking Page** 📍📊
125125
- Ever wondered how many times CWA has been there for you in the background? Check out the CWA Stats page to see a fun list of statistics showing how many times CWA has been there to make your life just that little bit easier
126126
- A database also exists to keep track of any and all enforcements, imports, conversions & fixes both for peace of mind and to make the checking of any bugs or weird behaviour easier
127-
- Full documentation can be found below [here](#checking-the-cover-enforcement-logs)
127+
<!-- - Full documentation can be found below [here](#checking-the-cover-enforcement-logs) -->
128128

129129
![CWA Server Stats Page](/README_images/cwa-server-stats-page.png)
130130

@@ -277,7 +277,7 @@ And just like that, Calibre-Web Automated should be up and running! **HOWEVER**
277277

278278
## _Calibre-Web Quick Start Guide_
279279

280-
1. Open your browser and navigate to http://localhost:8084 or http://localhost:8084/opds for the OPDS catalog
280+
1. Open your browser and navigate to http://localhost:8083 or http://localhost:8083/opds for the OPDS catalog
281281
2. Log in with the default admin credentials (_below_)
282282
3. Configure your Calibre-Web Automated instance via the Admin Page
283283
- A guide to what all of the stock CW Settings do can be found [here](https://github.com/janeczku/calibre-web/wiki/Configuration#basic-configuration)
@@ -363,4 +363,4 @@ Check out [Post-Install Tasks Here](#post-install-tasks) when necessary.
363363

364364
- CWA is really lucky to have a very passionate and active community of people that really help shape CWA into what it is today
365365
- If you have any ideas or want to contribute to the project, you're more than welcome to! We accept anyone regardless of skill level of expertise!
366-
- If you've got a good idea or want to simply suggest improvements, simply get in touch with us on the Discord Server [here](https://discord.gg/EjgSeek94R)!
366+
- If you've got a good idea or want to simply suggest improvements, simply get in touch with us on the Discord Server [here](https://discord.gg/EjgSeek94R)!
103 KB
Loading

root/app/calibre-web/cps/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ def reconnect():
190190

191191

192192
@admi.route("/ajax/updateThumbnails", methods=['POST'])
193-
@admin_required
194193
@user_login_required
194+
@admin_required
195195
def update_thumbnails():
196196
content = config.get_scheduled_task_settings()
197197
if content['schedule_generate_book_covers']:

root/app/calibre-web/cps/cwa_functions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,8 @@ def convert_library_start(queue):
478478
queue.put(cl_process)
479479

480480
def get_tmp_conversion_dir() -> str:
481-
dirs_json_path = "/app/calibre-web-automated/dirs.json"
482481
dirs = {}
483-
with open(dirs_json_path, 'r') as f:
482+
with open(DIRS_JSON, 'r') as f:
484483
dirs: dict[str, str] = json.load(f)
485484
tmp_conversion_dir = f"{dirs['tmp_conversion_dir']}/"
486485

0 commit comments

Comments
 (0)