diff --git a/apps/kotatsu/README.md b/apps/kotatsu/README.md new file mode 100644 index 000000000..351ae4abd --- /dev/null +++ b/apps/kotatsu/README.md @@ -0,0 +1,66 @@ +# Kotatsu + +口袋里的漫画 + +![Kotatsu](https://file.lifebus.top/imgs/kotatsu_cover.png) + +![](https://img.shields.io/badge/%E6%96%B0%E7%96%86%E8%90%8C%E6%A3%AE%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E5%AE%A4-%E6%8F%90%E4%BE%9B%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81-blue) + +## 安装说明 + +### Kotatsu 同步服务器 + +Kotatsu 是一款适用于 Android 平台的免费开源漫画阅读器。它支持多种语言的在线漫画,并具备筛选和搜索功能、本地存储离线阅读、收藏、书签、新章节通知等功能。 + +如果您不想公开自部署的同步服务器,请在注册完成自己的设备后,将`允许新用户注册`改为禁止,重启即可。 + +## 简介 + +一款简单、方便的 Android 开源漫画阅读器,由社区提供,您可以比以往更轻松地找到和阅读您喜欢的漫画。 + +## 特性 + +### 大量来源 + +支持超过 1000 个来源 + +### 可定制的阅读器 + +通过不同的阅读器设置使阅读更加方便 + +### 支持追踪 + +支持 MyAnimeList、Anilist 和 Shikimori + +### 智能搜索 + +快速轻松地搜索感兴趣的标题 + +### 强大的下载器 + +可以缓慢下载标题以避免出现源问题 + +### 同步 + +轻松在您的设备之间同步系列。 + +## 下载客户端 + +
+
+ F-Droid + F-Droid +
+
+ GitHub + GitHub Releases +
+
+ +--- + +![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png) diff --git a/apps/kotatsu/data.yml b/apps/kotatsu/data.yml new file mode 100644 index 000000000..a47710025 --- /dev/null +++ b/apps/kotatsu/data.yml @@ -0,0 +1,14 @@ +additionalProperties: + key: kotatsu + name: Kotatsu + tags: + - WebSite + - Local + shortDescZh: 口袋里的漫画 + shortDescEn: Manga in your pocket + type: website + crossVersionUpdate: true + limit: 0 + website: https://kotatsu.app/ + github: https://github.com/KotatsuApp/Kotatsu/ + document: https://kotatsu.app/ diff --git a/apps/kotatsu/logo.png b/apps/kotatsu/logo.png new file mode 100644 index 000000000..7f0ce6745 Binary files /dev/null and b/apps/kotatsu/logo.png differ diff --git a/apps/kotatsu/logo.svg b/apps/kotatsu/logo.svg new file mode 100644 index 000000000..64321067b --- /dev/null +++ b/apps/kotatsu/logo.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + diff --git a/apps/kotatsu/v20250725/config/database.sql b/apps/kotatsu/v20250725/config/database.sql new file mode 100644 index 000000000..662429cff --- /dev/null +++ b/apps/kotatsu/v20250725/config/database.sql @@ -0,0 +1,134 @@ +drop table if exists favourites; + +drop table if exists categories; + +drop table if exists history; + +drop table if exists manga_tags; + +drop table if exists manga; + +drop table if exists tags; + +drop table if exists users; + +create table manga +( + id bigint not null, + title varchar(84) not null, + alt_title varchar(84) null, + url varchar(255) not null, + public_url varchar(255) not null, + rating float not null, + content_rating char(12) null, + cover_url varchar(255) not null, + large_cover_url varchar(255) null, + state char(12) null, + author varchar(64) null, + source varchar(32) not null, + primary key (id) +); + +create table tags +( + id bigint not null, + title varchar(64) not null, + `key` varchar(120) not null, + source varchar(32) not null, + primary key (id) +); + +create table manga_tags +( + manga_id bigint not null, + tag_id bigint not null, + primary key (manga_id, tag_id), + constraint manga_tags_ibfk_1 + foreign key (tag_id) references tags (id), + constraint manga_tags_ibfk_2 + foreign key (manga_id) references manga (id) + on delete cascade +); + +create index tag_id + on manga_tags (tag_id); + +create table users +( + id int auto_increment + primary key, + email varchar(120) not null, + password char(32) not null, + nickname varchar(84) null, + favourites_sync_timestamp bigint null, + history_sync_timestamp bigint null +); + +create table categories +( + id bigint not null, + created_at bigint not null, + sort_key int not null, + title varchar(120) not null, + `order` char(16) not null, + user_id int not null, + track tinyint(1) not null, + show_in_lib tinyint(1) not null, + deleted_at bigint not null, + primary key (id, user_id), + constraint categories_ibfk_1 + foreign key (user_id) references users (id) + on delete cascade +); + +create index categories_id_index + on categories (id); + +create table favourites +( + manga_id bigint not null, + category_id bigint not null, + sort_key int not null, + pinned tinyint(1) not null, + created_at bigint not null, + deleted_at bigint not null, + user_id int not null, + primary key (manga_id, category_id, user_id), + constraint favourites_categories_id_pk + foreign key (category_id, user_id) references categories (id, user_id), + constraint favourites_ibfk_1 + foreign key (manga_id) references manga (id), + constraint favourites_ibfk_2 + foreign key (user_id) references users (id) +); + +create index user_id + on favourites (user_id); + +create table history +( + manga_id bigint not null, + created_at bigint not null, + updated_at bigint not null, + chapter_id bigint not null, + page smallint not null, + scroll double not null, + percent double not null, + chapters int not null, + deleted_at bigint not null, + user_id int not null, + primary key (user_id, manga_id), + constraint history_ibfk_1 + foreign key (manga_id) references manga (id), + constraint history_ibfk_2 + foreign key (user_id) references users (id) + on delete cascade +); + +create index manga_id + on history (manga_id); + +create unique index users_email_uindex + on users (email); + + diff --git a/apps/kotatsu/v20250725/data.yml b/apps/kotatsu/v20250725/data.yml new file mode 100644 index 000000000..8b311c6a7 --- /dev/null +++ b/apps/kotatsu/v20250725/data.yml @@ -0,0 +1,84 @@ +additionalProperties: + formFields: + - child: + default: "" + envKey: PANEL_DB_HOST + required: true + type: service + default: mysql + edit: true + envKey: PANEL_DB_TYPE + labelZh: MySQL 服务 (前置检查) + labelEn: Database Service (Pre-check) + required: true + type: apps + values: + - label: MySQL + value: mysql + - label: MariaDB + value: mariadb + - label: Percona + value: percona + - default: 8080 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: WebUI 端口 + labelEn: WebUI port + required: true + rule: paramPort + type: number + - default: "" + edit: true + envKey: JWT_SECRET + labelZh: JWT 密钥 + labelEn: JWT secret + required: true + type: text + - default: "127.0.0.1" + edit: true + envKey: DATABASE_HOST + labelZh: 数据库 主机 + labelEn: Database Host + required: true + type: text + - default: 3306 + edit: true + envKey: DATABASE_PORT + labelZh: 数据库 端口 + labelEn: Database Port + required: true + rule: paramPort + type: number + - default: "kotatsu-syncserver" + edit: true + envKey: DATABASE_NAME + labelZh: 数据库 名称 + labelEn: Database Name + required: true + type: text + - default: "kotatsu-syncserver" + edit: true + envKey: DATABASE_USER + labelZh: 数据库 用户名 + labelEn: Database Username + required: true + type: text + - default: "" + edit: true + envKey: DATABASE_PASSWORD + labelZh: 数据库 密码 + labelEn: Database Password + required: true + type: password + - default: "true" + edit: true + envKey: ALLOW_NEW_REGISTER + labelZh: 允许新用户注册 + labelEn: Allow new users to register + required: true + type: select + values: + - label: 开放注册 + value: "true" + - label: 禁止注册 + value: "false" diff --git a/apps/kotatsu/v20250725/docker-compose.yml b/apps/kotatsu/v20250725/docker-compose.yml new file mode 100644 index 000000000..15e821619 --- /dev/null +++ b/apps/kotatsu/v20250725/docker-compose.yml @@ -0,0 +1,20 @@ +networks: + 1panel-network: + external: true + +services: + kotatsu-syncserver: + image: qyg2297248353/kotatsu-syncserver:v20250725 + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:8080 + env_file: + - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} + - ${ENV_FILE:-/etc/1panel/envs/default.env} + environment: + - TZ=Asia/Shanghai diff --git a/apps/kotatsu/v20250725/envs/default.env b/apps/kotatsu/v20250725/envs/default.env new file mode 100644 index 000000000..cd05f46e6 --- /dev/null +++ b/apps/kotatsu/v20250725/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/apps/kotatsu/v20250725/envs/global.env b/apps/kotatsu/v20250725/envs/global.env new file mode 100644 index 000000000..e10989fe4 --- /dev/null +++ b/apps/kotatsu/v20250725/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/apps/kotatsu/v20250725/scripts/init.sh b/apps/kotatsu/v20250725/scripts/init.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/kotatsu/v20250725/scripts/init.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/kotatsu/v20250725/scripts/uninstall.sh b/apps/kotatsu/v20250725/scripts/uninstall.sh new file mode 100644 index 000000000..c86c4fbca --- /dev/null +++ b/apps/kotatsu/v20250725/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/kotatsu/v20250725/scripts/upgrade.sh b/apps/kotatsu/v20250725/scripts/upgrade.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/kotatsu/v20250725/scripts/upgrade.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi