Skip to content

Commit ed7fbab

Browse files
'Add new script'
1 parent 2494af7 commit ed7fbab

File tree

4 files changed

+456
-0
lines changed

4 files changed

+456
-0
lines changed

ct/autocaliweb.sh

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: vhsdream
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://github.com/gelbphoenix/autocaliweb
7+
8+
APP="Autocaliweb"
9+
var_tags="${var_tags:-ebooks}"
10+
var_cpu="${var_cpu:-2}"
11+
var_ram="${var_ram:-2048}"
12+
var_disk="${var_disk:-6}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-12}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /opt/autocaliweb ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
31+
setup_uv
32+
33+
RELEASE=$(curl -fsSL https://api.github.com/repos/gelbphoenix/autocaliweb/releases/latest | jq '.tag_name' | sed 's/^"v//;s/"$//')
34+
if check_for_gh_release "autocaliweb" "gelbphoenix/autocaliweb"; then
35+
msg_info "Stopping Services"
36+
systemctl stop autocaliweb metadata-change-detector acw-ingest-service acw-auto-zipper
37+
msg_ok "Stopped Services"
38+
39+
INSTALL_DIR="/opt/autocaliweb"
40+
export VIRTUAL_ENV="${INSTALL_DIR}/venv"
41+
$STD tar -cf ~/autocaliweb_bkp.tar "$INSTALL_DIR"/{metadata_change_logs,dirs.json,.env,scripts/ingest_watcher.sh,scripts/auto_zipper_wrapper.sh,scripts/metadata_change_detector_wrapper.sh}
42+
fetch_and_deploy_gh_release "autocaliweb" "gelbphoenix/autocaliweb" "tarball" "latest" "/opt/autocaliweb"
43+
msg_info "Updating ${APP}"
44+
cd "$INSTALL_DIR"
45+
if [[ ! -d "$VIRTUAL_ENV" ]]; then
46+
$STD uv venv "$VIRTUAL_ENV"
47+
fi
48+
$STD uv sync --all-extras --active
49+
cd "$INSTALL_DIR"/koreader/plugins
50+
PLUGIN_DIGEST="$(find acwsync.koplugin -type f -name "*.lua" -o -name "*.json" | sort | xargs sha256sum | sha256sum | cut -d' ' -f1)"
51+
echo "Plugin files digest: $PLUGIN_DIGEST" >acwsync.koplugin/${PLUGIN_DIGEST}.digest
52+
echo "Build date: $(date)" >>acwsync.koplugin/${PLUGIN_DIGEST}.digest
53+
echo "Files included:" >>acwsync.koplugin/${PLUGIN_DIGEST}.digest
54+
$STD zip -r koplugin.zip acwsync.koplugin/
55+
cp -r koplugin.zip "$INSTALL_DIR"/cps/static
56+
mkdir -p "$INSTALL_DIR"/metadata_temp
57+
$STD tar -xf ~/autocaliweb_bkp.tar --directory /
58+
KEPUB_VERSION="$(/usr/bin/kepubify --version)"
59+
CALIBRE_RELEASE="$(curl -s https://api.github.com/repos/kovidgoyal/calibre/releases/latest | grep -o '"tag_name": "[^"]*' | cut -d'"' -f4)"
60+
echo "${KEPUB_VERSION#v}" >"$INSTALL_DIR"/KEPUBIFY_RELEASE
61+
echo "${CALIBRE_RELEASE#v}" >/"$INSTALL_DIR"/CALIBRE_RELEASE
62+
sed 's/^/v/' ~/.autocaliweb >"$INSTALL_DIR"/ACW_RELEASE
63+
chown -R acw:acw "$INSTALL_DIR"
64+
rm ~/autocaliweb_bkp.tar
65+
msg_ok "Updated $APP"
66+
67+
msg_info "Starting Services"
68+
systemctl start autocaliweb metadata-change-detector acw-ingest-service acw-auto-zipper
69+
msg_ok "Started Services"
70+
71+
msg_ok "Updated Successfully"
72+
fi
73+
exit
74+
}
75+
76+
start
77+
build_container
78+
description
79+
80+
msg_ok "Completed Successfully!\n"
81+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
82+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
83+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8083${CL}"

ct/headers/autocaliweb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
___ __ ___ __
2+
/ | __ __/ /_____ _________ _/ (_) _____ / /_
3+
/ /| |/ / / / __/ __ \/ ___/ __ `/ / / | /| / / _ \/ __ \
4+
/ ___ / /_/ / /_/ /_/ / /__/ /_/ / / /| |/ |/ / __/ /_/ /
5+
/_/ |_\__,_/\__/\____/\___/\__,_/_/_/ |__/|__/\___/_.___/
6+

frontend/public/json/autocaliweb.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "Autocaliweb",
3+
"slug": "autocaliweb",
4+
"categories": [
5+
13
6+
],
7+
"date_created": "2025-08-30",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 8083,
12+
"documentation": "https://github.com/gelbphoenix/autocaliweb/wiki",
13+
"config_path": "/etc/autocaliweb",
14+
"website": "https://github.com/gelbphoenix/autocaliweb",
15+
"logo": "https://github.com/gelbphoenix/autocaliweb/raw/refs/heads/master/cps/static/icon-dark.svg",
16+
"description": "A modern web management system for eBooks, eComics and PDFs",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/autocaliweb.sh",
21+
"resources": {
22+
"cpu": 2,
23+
"ram": 2048,
24+
"hdd": 6,
25+
"os": "Debian",
26+
"version": "12"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": "admin",
32+
"password": "admin123"
33+
},
34+
"notes": []
35+
}

0 commit comments

Comments
 (0)