Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit f78ee60

Browse files
author
jxxghp
committed
v3.0.0
1 parent 9a61d13 commit f78ee60

File tree

451 files changed

+69040
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+69040
-2
lines changed

.github/ISSUE_TEMPLATE/bug.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: 问题模板
3+
about: 如发现Bug,请按此模板提交issues,不按模板提交的问题将直接关闭。提交问题务必描述清楚、附上日志,描述不清导致无法理解和分析的问题也可能会被直接关闭。
4+
---
5+
6+
## 你使用的 NAStool 是什么版本,什么环境?
7+
8+
> NAStool 版本: vx.x.x
9+
>
10+
> 环境: docker or windows or Synology
11+
>
12+
13+
## 你遇到什么问题了?
14+
15+
> 描述一下你遇到的问题
16+
17+
## 是否已经浏览过Issues、Wiki及TG公众号仍无法解决?
18+
19+
> 请搜索Issues列表、查看wiki跟TG公众号的更新说明,已经解释过的问题不要重复提问
20+
21+
22+
## 你期望的结果
23+
24+
> 描述以下你期望的结果
25+
26+
## 给出程序界面截图、后台运行日志或配置文件
27+
28+
> 如UI BUG请提供截图及配置文件截图
29+
> 其它问题提供后台日志,如为Docker请提供docker的日志

.github/ISSUE_TEMPLATE/feature.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: 功能需求模板
3+
about: 如有新功能需要需要提交,请按此模板创建issues
4+
---
5+
6+
## 你使用的 NAStool 是什么版本,什么环境?
7+
8+
> NAStool 版本: vx.x.x
9+
>
10+
> 环境: docker or windows or synology
11+
12+
## 你想要新增或者改进什么功能?
13+
14+
> 你想要新增或者改进什么功能?
15+
16+
## 这个功能有什么可以参考的资料吗?
17+
18+
> 这个功能有什么可以参考的资料吗?是否可以列举一些,不要引用同类但商业化软件的任何内容.

.github/workflows/build-windows.yml

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: NAStool Windows
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- version.py
9+
- .github/workflows/build-windows.yml
10+
- requirements.txt
11+
12+
jobs:
13+
Windows-build:
14+
runs-on: windows-latest
15+
steps:
16+
- name: init Python 3.10.10
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.10.10'
20+
- name: install dependent packages
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install wheel numpy==1.23.5 pyparsing==3.0.9 wxpython==4.2.0 pyinstaller==5.7.0
24+
git clone --depth=1 -b master https://github.com/NAStool/nas-tools --recurse-submodule
25+
cd nas-tools
26+
pip install -r requirements.txt
27+
echo ("NASTOOL_CONFIG=D:/a/nas-tools/nas-tools/nas-tools/config/config.yaml") >> $env:GITHUB_ENV
28+
echo $env:NASTOOL_CONFIG
29+
shell: pwsh
30+
- name: package through pyinstaller
31+
run: |
32+
cd nas-tools
33+
copy .\windows\rely\upx.exe c:\hostedtoolcache\windows\python\3.10.10\x64\Scripts
34+
copy .\windows\rely\hook-cn2an.py c:\hostedtoolcache\windows\python\3.10.10\x64\lib\site-packages\pyinstaller\hooks
35+
copy .\windows\rely\hook-zhconv.py c:\hostedtoolcache\windows\python\3.10.10\x64\lib\site-packages\pyinstaller\hooks
36+
copy .\third_party.txt .\windows
37+
copy .\windows\rely\template.jinja2 c:\hostedtoolcache\windows\Python\3.10.10\x64\lib\site-packages\setuptools\_vendor\pyparsing\diagram
38+
xcopy .\web c:\hostedtoolcache\windows\python\3.10.10\x64\lib\site-packages\web\ /e
39+
xcopy .\config c:\hostedtoolcache\windows\python\3.10.10\x64\lib\site-packages\config\ /e
40+
xcopy .\db_scripts c:\hostedtoolcache\windows\python\3.10.10\x64\lib\site-packages\db_scripts\ /e
41+
cd windows
42+
pyinstaller nas-tools.spec
43+
shell: pwsh
44+
- name: upload windows file
45+
uses: actions/upload-artifact@v3
46+
with:
47+
name: windows
48+
path: D:/a/nas-tools/nas-tools/nas-tools/windows/dist/nas-tools.exe
49+
50+
Create-release_Send-message:
51+
runs-on: ubuntu-latest
52+
needs: [Windows-build]
53+
steps:
54+
- uses: actions/checkout@v2
55+
- name: Release version
56+
id: release_version
57+
run: |
58+
app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
59+
echo "app_version=$app_version" >> $GITHUB_ENV
60+
- name: download exe and rename
61+
uses: actions/download-artifact@v3
62+
- name: get release_informations
63+
shell: bash
64+
run: |
65+
pwd
66+
mkdir releases
67+
cd windows
68+
mv nas-tools.exe /home/runner/work/nas-tools/nas-tools/releases/nastool_win_v${{ env.app_version }}.exe
69+
pwd
70+
- name: Create release
71+
id: create_release
72+
uses: actions/create-release@latest
73+
env:
74+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75+
with:
76+
tag_name: v${{ env.app_version }}
77+
release_name: v${{ env.app_version }}
78+
body: ${{ github.event.commits[0].message }}
79+
draft: false
80+
prerelease: false
81+
- name: Upload release asset
82+
uses: dwenegar/upload-release-assets@v1
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
with:
86+
release_id: ${{ steps.create_release.outputs.id }}
87+
assets_path: |
88+
/home/runner/work/nas-tools/nas-tools/releases/
89+
#
90+
#- name: Send telegram message (release informations)
91+
# uses: appleboy/telegram-action@master
92+
# with:
93+
# to: ${{ secrets.TELEGRAM_TO }}
94+
# token: ${{ secrets.TELEGRAM_TOKEN }}
95+
# format: markdown
96+
# message: |
97+
# *v${{ env.app_version }}*
98+
99+
# ${{ github.event.commits[0].message }}

.github/workflows/build.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: NAStool Docker
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- version.py
9+
- .github/workflows/build.yml
10+
- package_list.txt
11+
- requirements.txt
12+
- docker/Dockerfile
13+
- docker/entrypoint.sh
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
name: Build Docker Image
18+
steps:
19+
-
20+
name: Checkout
21+
uses: actions/checkout@master
22+
23+
-
24+
name: Release version
25+
id: release_version
26+
run: |
27+
app_version=$(cat version.py |sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
28+
echo "app_version=$app_version" >> $GITHUB_ENV
29+
30+
-
31+
name: Set Up QEMU
32+
uses: docker/setup-qemu-action@v1
33+
34+
-
35+
name: Set Up Buildx
36+
uses: docker/setup-buildx-action@v1
37+
38+
-
39+
name: Login DockerHub
40+
uses: docker/login-action@v1
41+
with:
42+
username: ${{ secrets.DOCKER_USERNAME }}
43+
password: ${{ secrets.DOCKER_PASSWORD }}
44+
45+
- name: Build Image
46+
uses: docker/build-push-action@v2
47+
with:
48+
context: .
49+
file: docker/Dockerfile
50+
platforms: |
51+
linux/amd64
52+
push: true
53+
tags: |
54+
${{ secrets.DOCKER_USERNAME }}/nas-tools-private:latest
55+
${{ secrets.DOCKER_USERNAME }}/nas-tools-private:${{ env.app_version }}

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/.idea/**
2+
*.pyc
3+
*.c
4+
/test.py
5+
/setup.py
6+
/build_sites.py
7+
/web/backend/user.py
8+
/third_party/**
9+
/build/**
10+
/venv/**

.gitmodules

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[submodule "third_party/feapder"]
2+
path = third_party/feapder
3+
url = https://github.com/jxxghp/feapder
4+
[submodule "third_party/qbittorrent-api"]
5+
path = third_party/qbittorrent-api
6+
url = https://github.com/rmartin16/qbittorrent-api
7+
[submodule "third_party/anitopy"]
8+
path = third_party/anitopy
9+
url = https://github.com/igorcmoura/anitopy
10+
[submodule "third_party/plexapi"]
11+
path = third_party/plexapi
12+
url = https://github.com/pkkid/python-plexapi
13+
[submodule "third_party/transmission-rpc"]
14+
path = third_party/transmission-rpc
15+
url = https://github.com/trim21/transmission-rpc
16+
[submodule "third_party/slack_bolt"]
17+
path = third_party/slack_bolt
18+
url = https://github.com/slackapi/bolt-python

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![GitHub issues](https://img.shields.io/github/issues/NAStool/nas-tools?style=plastic)](https://github.com/NAStool/nas-tools/issues)
77
[![GitHub license](https://img.shields.io/github/license/NAStool/nas-tools?style=plastic)](https://github.com/NAStool/nas-tools/blob/master/LICENSE.md)
88
[![Docker pulls](https://img.shields.io/docker/pulls/jxxghp/nas-tools?style=plastic)](https://hub.docker.com/r/jxxghp/nas-tools)
9-
[![Platform](https://img.shields.io/badge/platform-amd64/arm64-pink?style=plastic)](https://hub.docker.com/r/jxxghp/nas-tools)
9+
[![Platform](https://img.shields.io/badge/platform-amd64-pink?style=plastic)](https://hub.docker.com/r/jxxghp/nas-tools)
1010

1111

1212
Docker:https://hub.docker.com/repository/docker/jxxghp/nas-tools
@@ -53,4 +53,4 @@ https://spk7.imnks.com/
5353

5454
## 免责声明
5555
1) 本软件不提供任何内容,仅作为辅助工具简化用户手工操作,对用户的行为及内容毫不知情,使用本软件产生的任何责任需由使用者本人承担。
56-
2) 本软件代码开源,基于开源代码进行修改,人为去除相关限制导致软件被分发、传播并造成责任事件的,需由代码修改发布者承担全部责任。同时按AGPL-3.0开源协议要求,基于此软件代码的所有修改必须开源。
56+
2) 本软件代码开源,基于开源代码进行修改,人为去除相关限制导致软件被分发、传播并造成责任事件的,需由代码修改发布者承担全部责任。同时按AGPL-3.0开源协议要求,基于此软件代码的所有修改必须开源。

app/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)