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

Commit

Permalink
Update jsdelivr CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
a76yyyy committed May 23, 2022
1 parent 9d858d5 commit 5173c0c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Nothing right now.
``` bash
# 先cd到源码所在目录, 执行命令后重启进程
wget https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/update.sh -O ./update.sh && \
wget https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/update.sh -O ./update.sh && \
sh ./update.sh
```

Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a href="https://github.com/qiandao-today/qiandao">
<img style="border-radius:50%" width="150" src="https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/web/static/img/icon.png">
<img style="border-radius:50%" width="150" src="https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/web/static/img/icon.png">
</a>
</p>

Expand Down Expand Up @@ -51,8 +51,8 @@
</div>

<p align="center">
<img width="45%" style="border:solid 1px #DCEBFB" src="https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/web/static/img/login.png" >
<img width="45%" style="border:solid 1px #DCEBFB" src="https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/web/static/img/index.png">
<img width="45%" style="border:solid 1px #DCEBFB" src="https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/web/static/img/login.png" >
<img width="45%" style="border:solid 1px #DCEBFB" src="https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/web/static/img/index.png">
</p>

操作说明
Expand All @@ -75,7 +75,7 @@ Docker容器部署方式
# 创建并切换至 qiandao 目录
mkdir -p $(pwd)/qiandao/config && cd $(pwd)/qiandao
# 下载 docker-compose.yml
wget https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/docker-compose.yml
wget https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/docker-compose.yml
# 根据需求和配置描述修改配置环境变量
vi ./docker-compose.yml
# 执行 Docker Compose 命令
Expand Down Expand Up @@ -200,7 +200,7 @@ REDIS_DB_INDEX|否|1|默认为1
QIANDAO_EVIL|否|500|(限Redis连接已开启)登录用户或IP在1小时内 <br>操作失败(如登录, 验证, 测试等操作)次数*相应惩罚分值 <br>达到evil上限后自动封禁直至下一小时周期
EVIL_PASS_LAN_IP|否|True|是否关闭本机私有IP地址用户及Localhost_API请求的evil限制
TRACEBACK_PRINT|否|False|是否启用在控制台日志中打印Exception的TraceBack信息
PUSH_PIC_URL|否|[push_pic.png](https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/web/static/img/push_pic.png)|默认为[push_pic.png](https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/web/static/img/push_pic.png)
PUSH_PIC_URL|否|[push_pic.png](https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/web/static/img/push_pic.png)|默认为[push_pic.png](https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/web/static/img/push_pic.png)
PUSH_BATCH_SW|否|True|是否允许开启定期推送签到任务日志, 默认为True
MAIL_SMTP|否|""|邮箱SMTP服务器
MAIL_PORT|否|""|邮箱SMTP服务器端口
Expand All @@ -216,12 +216,12 @@ ALLOW_RETRY|否|True|在Pycurl环境下部分请求可能导致Request错误时,
DNS_SERVER|否|""|通过Curl使用指定DNS进行解析(仅支持Pycurl环境), <br>如 8.8.8.8
CURL_ENCODING|否|True|是否允许使用Curl进行Encoding操作
CURL_CONTENT_LENGTH|否|True|是否允许Curl使用Headers中自定义Content-Length请求
NOT_RETRY_CODE|否|[详见配置](https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/config.py)...|[详见配置](https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/config.py)...
EMPTY_RETRY|否|True|[详见配置](https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/config.py)...
NOT_RETRY_CODE|否|[详见配置](https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/config.py)...|[详见配置](https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/config.py)...
EMPTY_RETRY|否|True|[详见配置](https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/config.py)...
USER0ISADMIN|否|True|第一个注册用户为管理员,False关闭
EXTRA_ONNX_NAME|否|""|config目录下自定义ONNX文件名<br>(不填 ".onnx" 后缀)<br>多个onnx文件名用"\|"分隔
EXTRA_CHARSETS_NAME|否|""|config目录下自定义ONNX对应自定义charsets.json文件名<br>(不填 ".json" 后缀)<br>多个json文件名用"\|"分隔
> 详细信息请查阅[config.py](https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/config.py)
> 详细信息请查阅[config.py](https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/config.py)
## 旧版local_config.py迁移

Expand All @@ -240,23 +240,23 @@ EXTRA_CHARSETS_NAME|否|""|config目录下自定义ONNX对应自定义charsets.j

``` bash
# 先cd到源码所在目录, 执行命令后重启进程
wget https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/update.sh -O ./update.sh && \
wget https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/update.sh -O ./update.sh && \
sh ./update.sh
```

2. **Docker容器部署更新**

``` bash
# 先进入容器后台, 执行命令后重启容器
wget https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/update.sh -O /usr/src/app/update.sh && \
wget https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/update.sh -O /usr/src/app/update.sh && \
sh /usr/src/app/update.sh
```

3. **强制同步最新源码**

``` bash
# 先cd到仓库代码根目录, 执行命令后重启进程
wget https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/update.sh -O ./update.sh && \
wget https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/update.sh -O ./update.sh && \
sh ./update.sh -f
```

Expand Down Expand Up @@ -290,11 +290,11 @@ EXTRA_CHARSETS_NAME|否|""|config目录下自定义ONNX对应自定义charsets.j

[a76yyyy](https://github.com/a76yyyy/qiandao)

[……](https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/version.json)
[……](https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/version.json)

个人项目精力有限, 仅保证对Chrome浏览器的支持。如果测试了其他浏览器可以pull request。

许可
===========

[MIT](https://cdn.jsdelivr.net/gh/qiandao-today/qiandao@master/LICENSE) 许可协议
[MIT](https://fastly.jsdelivr.net/gh/qiandao-today/qiandao@master/LICENSE) 许可协议
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# 日志及推送设置
traceback_print = bool(strtobool(os.getenv('TRACEBACK_PRINT', 'False'))) # 是否启用在控制台日志中打印Exception的TraceBack信息
push_pic = os.getenv('PUSH_PIC_URL', 'https://cdn.jsdelivr.net/gh/a76yyyy/qiandao@master/web/static/img/push_pic.png') # 日志推送默认图片地址
push_pic = os.getenv('PUSH_PIC_URL', 'https://fastly.jsdelivr.net/gh/a76yyyy/qiandao@master/web/static/img/push_pic.png') # 日志推送默认图片地址
push_batch_sw = bool(strtobool(os.getenv('PUSH_BATCH_SW', 'True'))) # 是否允许开启定期推送签到任务日志, 默认为True

class mysql(object):
Expand Down
18 changes: 9 additions & 9 deletions config/tpls_history.json
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@
"万能福利吧": {
"name": "万能福利吧",
"author": "github-h",
"url": "https://cdn.jsdelivr.net/gh/qiandao-today/templates@master/万能福利吧.har",
"url": "https://fastly.jsdelivr.net/gh/qiandao-today/templates@master/万能福利吧.har",
"update": false,
"comments": "cookie https://www.wnflb2020.com/forum.php",
"filename": "万能福利吧.har",
Expand All @@ -400,7 +400,7 @@
"高清MP4粉": {
"name": "高清MP4粉",
"author": "github-h",
"url": "https://cdn.jsdelivr.net/gh/qiandao-today/templates@master/高清MP4粉.har",
"url": "https://fastly.jsdelivr.net/gh/qiandao-today/templates@master/高清MP4粉.har",
"update": false,
"comments": "cookie 每日签到 https://mp4fan.org/",
"filename": "高清MP4粉.har",
Expand Down Expand Up @@ -472,7 +472,7 @@
"evacgE次元": {
"name": "evacgE次元",
"author": "AragonSnow",
"url": "https://cdn.jsdelivr.net/gh/qiandao-today/templates@master/evacg(E%E6%AC%A1%E5%85%83).har",
"url": "https://fastly.jsdelivr.net/gh/qiandao-today/templates@master/evacg(E%E6%AC%A1%E5%85%83).har",
"update": false,
"comments": "cookie和homeaction,都在首页链接里",
"filename": "evacg(E次元).har",
Expand All @@ -484,7 +484,7 @@
"数码之家": {
"name": "数码之家",
"author": "acooler15",
"url": "https://cdn.jsdelivr.net/gh/qiandao-today/templates@master/数码之家.har",
"url": "https://fastly.jsdelivr.net/gh/qiandao-today/templates@master/数码之家.har",
"update": false,
"comments": "首页cookie",
"filename": "数码之家.har",
Expand All @@ -496,7 +496,7 @@
"迅维网": {
"name": "迅维网",
"author": "acooler15",
"url": "https://cdn.jsdelivr.net/gh/qiandao-today/templates@master/迅维网.har",
"url": "https://fastly.jsdelivr.net/gh/qiandao-today/templates@master/迅维网.har",
"update": false,
"comments": "首页cookie",
"filename": "迅维网.har",
Expand All @@ -508,7 +508,7 @@
"远景论坛": {
"name": "远景论坛",
"author": "acooler15",
"url": "https://cdn.jsdelivr.net/gh/qiandao-today/templates@master/远景论坛.har",
"url": "https://fastly.jsdelivr.net/gh/qiandao-today/templates@master/远景论坛.har",
"update": false,
"comments": "首页cookie",
"filename": "远景论坛.har",
Expand All @@ -520,7 +520,7 @@
"91Wii核心玩家的集中营": {
"name": "91Wii核心玩家的集中营",
"author": "FellBan",
"url": "https://cdn.jsdelivr.net/gh/qiandao-today/templates@master/91Wii核心玩家的集中营.har",
"url": "https://fastly.jsdelivr.net/gh/qiandao-today/templates@master/91Wii核心玩家的集中营.har",
"update": false,
"comments": "cookie",
"filename": "91Wii核心玩家的集中营.har",
Expand All @@ -532,7 +532,7 @@
"致美化": {
"name": "致美化",
"author": "FellBan",
"url": "https://cdn.jsdelivr.net/gh/qiandao-today/templates@master/%E8%87%B4%E7%BE%8E%E5%8C%96.har",
"url": "https://fastly.jsdelivr.net/gh/qiandao-today/templates@master/%E8%87%B4%E7%BE%8E%E5%8C%96.har",
"update": false,
"comments": "user(用户名),password(密码)",
"filename": "致美化.har",
Expand All @@ -544,7 +544,7 @@
"Hao4K": {
"name": "Hao4K",
"author": "QQ群",
"url": "https://cdn.jsdelivr.net/gh/qiandao-today/templates@master/Hao 4K-账号版.har",
"url": "https://fastly.jsdelivr.net/gh/qiandao-today/templates@master/Hao 4K-账号版.har",
"update": false,
"comments": "user(用户名),password(密码)",
"filename": "Hao 4K-账号版.har",
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
# - JAWSDB_MARIA_URL=mysql://user:pass@localhost:3306/dbname?auth_plugin=
- REDISCLOUD_URL=redis://redis:6379
# - TRACEBACK_PRINT=False
# - PUSH_PIC_URL=https://cdn.jsdelivr.net/gh/a76yyyy/qiandao@master/web/static/img/push_pic.png
# - PUSH_PIC_URL=https://fastly.jsdelivr.net/gh/a76yyyy/qiandao@master/web/static/img/push_pic.png
# - PUSH_BATCH_SW=True
# - DB_TYPE=sqlite3
# - REDIS_DB_INDEX=1
Expand Down
2 changes: 1 addition & 1 deletion web/handlers/subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def get(self, userid):
if (now_ts - int(repos['lastupdate']) > 24 * 3600):
for repo in repos['repos']:
if repo['repoacc']:
url = '{0}@{1}'.format(repo['repourl'].replace('https://github.com/', 'https://cdn.jsdelivr.net/gh/'), repo['repobranch'])
url = '{0}@{1}'.format(repo['repourl'].replace('https://github.com/', 'https://fastly.jsdelivr.net/gh/'), repo['repobranch'])
else:
if (repo['repourl'].find('https://github.com/') > -1):
url = '{0}/{1}'.format(repo['repourl'].replace('https://github.com/', 'https://raw.githubusercontent.com/'), repo['repobranch'])
Expand Down

0 comments on commit 5173c0c

Please sign in to comment.