Skip to content

Commit 7812d67

Browse files
committed
Merge remote-tracking branch 'upstream/main' into koreader-sync
2 parents 76179af + 2b3db61 commit 7812d67

File tree

28 files changed

+286
-207
lines changed

28 files changed

+286
-207
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ And just like that, Calibre-Web Automated should be up and running! **HOWEVER**
267267

268268
- CWA has been designed to make switching over as easy as possible. To migrate your CW instance to CWA, simply:
269269
1. Stop your instance of CW if it's still running
270+
2. Whatever your `/books` bind was in Calibre-Web, should be your `/calibre-library` bind for CWA
270271
2. Mount the same `/config` folder in your Docker Compose that you were using for CW (or a copy of it to be extra safe)
271272
3. Mount the same folder containing your Calibre Library (the Docker Compose for the Linuxserver image of Calibre Web has this as `/books` by default)
272273
- And then you're done! All of your users, settings ect. should be automatically carried over into your new CWA instance! Enjoy!

root/app/calibre-web/cps/static/css/caliBlur.css

Lines changed: 97 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

root/app/calibre-web/cps/static/css/style.css

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,8 +680,79 @@ p.cwa-settings-disclaimer {
680680
}
681681

682682
select.cwa-settings-select {
683-
background-color: white;
684-
color: #444444;
685683
text-align: center;
686684
border-radius: 6px;
685+
width: 8rem;
686+
background-color: #f8f8f8 !important;
687+
}
688+
689+
.settings-section-header {
690+
color: #45b29d;
691+
padding-bottom: 14px;
692+
}
693+
694+
.settings-container {
695+
background: #f8f8f8;
696+
padding-left: 4rem;
697+
padding-right: 6rem;
698+
margin-right: 2rem;
699+
padding-top: 2rem;
700+
padding-bottom: 2rem;
701+
margin-bottom: 2rem;
702+
}
703+
704+
.cwa_stats_container {
705+
display: grid;
706+
grid-template-columns: 1fr 1fr 1fr 1fr; /* Default: 4 equal columns */
707+
gap: 10px; /* Space between sections */
708+
padding: 20px;
709+
width: 100%; /* Ensure it spans the full width */
710+
height: auto; /* Allow height to adjust based on content */
711+
}
712+
713+
.cwa_stats_section {
714+
display: flex;
715+
flex-direction: column;
716+
justify-content: center;
717+
align-items: center;
718+
border: none;
719+
border-radius: 8px;
720+
padding: 20px;
721+
text-align: center;
722+
background-color: #ffffff;
723+
}
724+
725+
.cwa_stats_header {
726+
font-size: 1.5em;
727+
font-weight: bold;
728+
margin-bottom: 10px;
729+
color: #333333;
730+
}
731+
732+
.cwa_stats_value {
733+
font-size: 2.5em;
734+
font-weight: bold;
735+
color: #45b29d;
736+
}
737+
738+
/* Media Query for Medium Screens */
739+
@media (max-width: 1024px) {
740+
.cwa_stats_container {
741+
grid-template-columns: repeat(
742+
2,
743+
1fr
744+
); /* 2 equal columns on medium screens */
745+
}
746+
}
747+
748+
/* Media Query for Mobile Screens or Thin Windows */
749+
@media (max-width: 480px) {
750+
.cwa_stats_container {
751+
grid-template-columns: 1fr; /* 1 column, 4 sections stacked vertically */
752+
}
753+
}
754+
755+
.stats_see_more_btn {
756+
border-radius: 6px !important;
757+
margin-bottom: 0px !important;
687758
}

root/app/calibre-web/cps/templates/cwa_settings.html

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,7 @@
66
{% endblock %}
77

88
{% block header %}
9-
<style>
10-
.settings-container {
11-
background: #1f2c3554;
12-
padding-left: 4rem;
13-
padding-right: 6rem;
14-
margin-right: 2rem;
15-
padding-top: 2rem;
16-
padding-bottom: 2rem;
17-
margin-bottom: 2rem;
18-
}
19-
20-
.settings-section-header {
21-
color: #ffc200;
22-
padding-bottom: 14px;
23-
}
24-
25-
.settings-explanation {
26-
color: #e9e9e9;
27-
font-size: small !important;
28-
line-height: normal;
29-
max-width: 90rem;
30-
font-style: normal !important;
31-
padding-left: 0px !important;
32-
margin: 0 !important;
33-
margin-bottom: 20px !important;
34-
}
35-
36-
.settings-disclaimer {
37-
font-size: x-small !important;
38-
font-style: normal !important;
39-
color: #e9e9e9;
40-
padding-left: 0px !important;
41-
line-height: normal;
42-
margin: 0 !important;
43-
}
44-
45-
.settings-divider {
46-
margin-top: 3rem;
47-
margin-bottom: 3rem;
48-
border-color: #5c6b74;
49-
border-width: 2px;
50-
}
51-
52-
</style>
9+
<style></style>
5310
{% endblock %}
5411

5512
{% block body %}
@@ -169,7 +126,7 @@ <h4 class="settings-section-header">CWA Auto-Conversion Target Format - EPUB by
169126
formats selected in the ignore list below)
170127
</p>
171128
<label for="auto_convert_target_format" style="padding-right: 10px; margin-bottom: 16px !important;">Choose a target format:</label>
172-
<select class="cwa-settings-select" style="width: 8rem; background-color: #151e26 !important;" name="auto_convert_target_format" id="auto_convert_target_format">
129+
<select class="cwa-settings-select" name="auto_convert_target_format" id="auto_convert_target_format">
173130
{% for format in target_formats -%}
174131
{% if cwa_settings['auto_convert_target_format'] == format %}
175132
<option value="{{ format }}" selected>{{ format }}</option>

root/app/calibre-web/cps/templates/cwa_stats.html

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -7,66 +7,6 @@
77
margin: 0;
88
font-family: Arial, sans-serif;
99
}
10-
11-
.cwa_stats_container {
12-
display: grid;
13-
grid-template-columns: 1fr 1fr 1fr 1fr; /* Default: 4 equal columns */
14-
gap: 10px; /* Space between sections */
15-
padding: 20px;
16-
width: 100%; /* Ensure it spans the full width */
17-
height: auto; /* Allow height to adjust based on content */
18-
}
19-
20-
.cwa_stats_section {
21-
display: flex;
22-
flex-direction: column;
23-
justify-content: center;
24-
align-items: center;
25-
border: none;
26-
border-radius: 8px;
27-
padding: 20px;
28-
text-align: center;
29-
background-color: #1520268a;
30-
}
31-
32-
.cwa_stats_header {
33-
font-size: 1.5em;
34-
font-weight: bold;
35-
margin-bottom: 10px;
36-
color: whitesmoke;
37-
}
38-
39-
.cwa_stats_value {
40-
font-size: 2.5em;
41-
font-weight: bold;
42-
color: #cc7b19;
43-
}
44-
45-
/* Styling for background colors */
46-
/* .cwa_stats_section:nth-child(1) { background-color: #e0f7fa; } */
47-
/* .cwa_stats_section:nth-child(2) { background-color: #c8e6c9; } */
48-
/* .cwa_stats_section:nth-child(3) { background-color: #ffcdd2; } */
49-
/* .cwa_stats_section:nth-child(4) { background-color: #fff9c4; } */
50-
51-
/* Media Query for Medium Screens */
52-
@media (max-width: 1024px) {
53-
.cwa_stats_container {
54-
grid-template-columns: repeat(2, 1fr); /* 2 equal columns on medium screens */
55-
}
56-
}
57-
58-
/* Media Query for Mobile Screens or Thin Windows */
59-
@media (max-width: 480px) {
60-
.cwa_stats_container {
61-
grid-template-columns: 1fr; /* 1 column, 4 sections stacked vertically */
62-
}
63-
}
64-
65-
.stats_see_more_btn {
66-
border-radius: 6px !important;
67-
margin-bottom: 0px !important;
68-
}
69-
7010
</style>
7111
{% endblock %}
7212

root/etc/s6-overlay/s6-rc.d/cwa-auto-library/dependencies.d/cwa-set-perms renamed to root/etc/s6-overlay/s6-rc.d/cwa-auto-library/dependencies.d/cwa-init

File renamed without changes.

root/etc/s6-overlay/s6-rc.d/cwa-auto-zipper/dependencies.d/cwa-set-perms renamed to root/etc/s6-overlay/s6-rc.d/cwa-auto-zipper/dependencies.d/cwa-init

File renamed without changes.

root/etc/s6-overlay/s6-rc.d/cwa-auto-zipper/run

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@
33
echo "[cwa-auto-zipper] Starting CWA-Auto-Zipper service..."
44
echo "[cwa-auto-zipper] Matching internal localtime & timezone with the one provided..."
55

6-
mkdir -p /config/processed_books/converted
7-
mkdir -p /config/processed_books/imported
8-
mkdir -p /config/processed_books/failed
9-
mkdir -p /config/processed_books/fixed_originals
10-
mkdir -p /config/log_archive
11-
mkdir -p /config/.cwa_conversion_tmp
12-
13-
chown -R abc:abc /config/processed_books
14-
chown -R abc:abc /config/log_archive
15-
chown -R abc:abc /config/.cwa_conversion_tmp
16-
17-
186
tz=$(printcontenv TZ)
197
if [[ $tz == "" ]]
208
then

root/etc/s6-overlay/s6-rc.d/cwa-ingest-service/run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
echo "========== STARTING CWA-INGEST SERVICE =========="
88

99
WATCH_FOLDER=$(grep -o '"ingest_folder": "[^"]*' /app/calibre-web-automated/dirs.json | grep -o '[^"]*$')
10-
echo "[cwa-ingest-service]: Watching folder: $WATCH_FOLDER"
10+
echo "[cwa-ingest-service] Watching folder: $WATCH_FOLDER"
1111

1212
# Monitor the folder for new files
1313
s6-setuidgid abc inotifywait -m -r --format="%e %w%f" -e close_write -e moved_to "$WATCH_FOLDER" |
@@ -16,7 +16,7 @@ while read -r events filepath ; do
1616
# CURRENT_TIME=$(date +'%s')
1717
# TIME_OF_MATCH=$(grep "$filepath" ingest-log-test.txt | egrep -o '[0-9]{10}')
1818
# TODO NEED TO GET DIFFERENCE BETWEEN THE 2 TIMES AND IF LESS THAN 60 SECONDS, IGNORE
19-
echo "[cwa-ingest-service]: New files detected - $filepath - Starting Ingest Processor..."
19+
echo "[cwa-ingest-service] New files detected - $filepath - Starting Ingest Processor..."
2020
python3 /app/calibre-web-automated/scripts/ingest_processor.py "$filepath" # &
2121
# echo "'${filepath}' - $(date +'%s')" >> /config/.ingest_dupe_list
2222
# INGEST_PROCESSOR_PID=$!

root/etc/s6-overlay/s6-rc.d/cwa-init-remove-locks/run

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

0 commit comments

Comments
 (0)