修改地址,保留push-docker
This commit is contained in:
parent
fcb404d484
commit
1b93e4bf64
|
@ -1,147 +0,0 @@
|
|||
name: 报告错误
|
||||
description: 在使用 study_xxqg 的过程中遇到了错误
|
||||
title: '[Bug]: '
|
||||
labels: [ "bug?" ]
|
||||
|
||||
body:
|
||||
# User's README and agreement
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## 感谢您愿意填写错误回报!
|
||||
## 以下是一些注意事项,请务必阅读让我们能够更容易处理
|
||||
|
||||
### ❗ | 确定没有相同问题的ISSUE已被提出.
|
||||
### 🌎| 请准确填写环境信息
|
||||
### ❔ | 打开DEBUG模式复现,并提供出现问题前后至少 10 秒的完整日志内容。请自行删除日志内存在的个人信息及敏感内容。
|
||||
|
||||
## 如果您不知道如何有效、精准地表述,我们建议您先阅读《提问的智慧》
|
||||
链接: [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md)
|
||||
---
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: 请确保您已阅读以上注意事项,并勾选下方的确认框。
|
||||
options:
|
||||
- label: "我已经仔细项目文档!!!"
|
||||
required: true
|
||||
- label: "我已经在 [Issue Tracker](https://github.com/johlanse/study_xxqg/issues) 和文档中找过我要提出的问题,没有找到相同问题的ISSUE。"
|
||||
required: true
|
||||
- label: 我已知晓并同意,此处仅用于汇报程序中存在的问题。若这个 Issue 是关于其他非程序本身问题,则我的 Issue 可能会被无条件自动关闭或/并锁定。
|
||||
required: true
|
||||
|
||||
# User's data
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## 环境信息
|
||||
请根据实际使用环境修改以下信息。
|
||||
|
||||
# Env | study_xxqg Version
|
||||
- type: input
|
||||
id: env-xxqg-ver
|
||||
attributes:
|
||||
label: studyXxqg 版本
|
||||
validations:
|
||||
required: true
|
||||
|
||||
# Env | VM Version
|
||||
- type: dropdown
|
||||
id: env-vm-ver
|
||||
attributes:
|
||||
label: 运行环境
|
||||
description: 选择运行 study_xxqg 的系统版本
|
||||
options:
|
||||
- Windows (64)
|
||||
- Windows (32/x84)
|
||||
- MacOS
|
||||
- Linux
|
||||
- Ubuntu
|
||||
- CentOS
|
||||
- Debian
|
||||
- ArchLinux
|
||||
- 其它(请在下方说明)
|
||||
validations:
|
||||
required: true
|
||||
|
||||
# Env | VM Arch
|
||||
- type: dropdown
|
||||
id: env-vm-arch
|
||||
attributes:
|
||||
label: 运行架构
|
||||
description: (可选) 选择运行 study_xxqg 的系统架构
|
||||
options:
|
||||
- AMD64
|
||||
- x86
|
||||
- ARM [32] (别名:AArch32 / ARMv7)
|
||||
- ARM [64] (别名:AArch64 / ARMv8)
|
||||
- 其它
|
||||
|
||||
# Env | Use type
|
||||
- type: dropdown
|
||||
id: env-use-type
|
||||
attributes:
|
||||
label: 运行方式
|
||||
description: 选择程序的运行方式
|
||||
options:
|
||||
- Docker
|
||||
- Docker-Compose
|
||||
- 可执行文件(release的二进制)文件运行
|
||||
- 源码运行
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
||||
# Input | Reproduce
|
||||
- type: textarea
|
||||
id: reproduce-steps
|
||||
attributes:
|
||||
label: 重现步骤
|
||||
description: |
|
||||
我们需要执行哪些操作才能让 bug 出现?
|
||||
简洁清晰的重现步骤能够帮助我们更迅速地定位问题所在。
|
||||
validations:
|
||||
required: true
|
||||
|
||||
# Input | Expected result
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: 期望的结果是什么?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
# Input | Actual result
|
||||
- type: textarea
|
||||
id: actual
|
||||
attributes:
|
||||
label: 实际的结果是什么?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
# Optional | CMD
|
||||
- type: textarea
|
||||
id: cmd
|
||||
attributes:
|
||||
label: docker运行命令或者docker-compose的内容
|
||||
render: golang
|
||||
|
||||
# Optional | Logging
|
||||
- type: textarea
|
||||
id: logging
|
||||
attributes:
|
||||
label: 日志记录(可选)
|
||||
render: golang
|
||||
|
||||
# Optional | Config
|
||||
- type: textarea
|
||||
id: config
|
||||
attributes:
|
||||
label: 配置信息(可选)
|
||||
render: yaml
|
||||
|
||||
# Optional | Extra description
|
||||
- type: textarea
|
||||
id: extra-desc
|
||||
attributes:
|
||||
label: 补充说明(可选)
|
|
@ -1,8 +0,0 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 加群讨论
|
||||
url: https://t.me/+VWI88z6d1k45NGJl
|
||||
about: 加群之前请认真阅读文档
|
||||
- name: 查看文档
|
||||
url: https://johlanse.shhy.xyz
|
||||
about: 请仔细阅读文档
|
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
name: 新功能提议
|
||||
about: 提出新功能
|
||||
title: ''
|
||||
labels: feature request
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**环境信息**
|
||||
<!-- 请尽量填写 -->
|
||||
study_xxqg版本:
|
||||
|
||||
**需要添加的功能内容**
|
||||
<!-- 请在这里详细描述新功能的实现方法 -->
|
|
@ -1,63 +0,0 @@
|
|||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
BINARY_PREFIX: "study_xxqg_"
|
||||
BINARY_SUFFIX: ""
|
||||
COMMIT_ID: "${{ github.sha }}"
|
||||
PR_PROMPT: "::warning:: Build artifact will not be uploaded due to the workflow is trigged by pull request."
|
||||
LD_FLAGS: "-w -s"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build binary CI
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
# build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/amd64, darwin/arm64
|
||||
goos: [linux, windows, darwin]
|
||||
goarch: ["386", amd64, arm, arm64]
|
||||
exclude:
|
||||
- goos: darwin
|
||||
goarch: arm
|
||||
- goos: darwin
|
||||
goarch: "386"
|
||||
- goos: windows
|
||||
goarch: arm64
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
fail-fast: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Fetch all tags
|
||||
run: git fetch --force --tags
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
|
||||
- name: Build binary file
|
||||
env:
|
||||
GOOS: ${{ matrix.goos }}
|
||||
GOARCH: ${{ matrix.goarch }}
|
||||
IS_PR: ${{ !!github.head_ref }}
|
||||
CGO_ENABLED: 0
|
||||
run: |
|
||||
if [ $GOOS = "windows" ]; then export BINARY_SUFFIX="$BINARY_SUFFIX.exe"; fi
|
||||
if $IS_PR ; then echo $PR_PROMPT; fi
|
||||
export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX"
|
||||
export LD_FLAGS="-w -s -X main.VERSION=unknown"
|
||||
go mod tidy
|
||||
go build -o "output/$BINARY_NAME" -trimpath -ldflags "$LD_FLAGS" ./
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
if: ${{ !github.head_ref }}
|
||||
with:
|
||||
name: ${{ matrix.goos }}_${{ matrix.goarch }}
|
||||
path: output/
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ jobs:
|
|||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: jolanse/study_xxqg
|
||||
images: sjkhsl/study_xxqg
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=ref,event=tag
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
name: push-to-techxuexi
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
push-to-techxuexi:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: check
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Init
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
run: |
|
||||
git config --global user.name 'GitHub' && git config --global user.email 'noreply@github.com'
|
||||
|
||||
- name: Push Code
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo -e "${{ secrets.SSHKEY }}" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan github.com > ~/.ssh/known_hosts
|
||||
git push -f "git@github.com:TechXueXi/study_xxqg.git" "main:main" --tags
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.3.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '1.18'
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
||||
|
|
@ -4,7 +4,7 @@ linters-settings:
|
|||
ignoretests: true
|
||||
|
||||
goimports:
|
||||
local-prefixes: github.com/johlanse/study_xxqg
|
||||
local-prefixes: github.com/sjkhsl/study_xxqg
|
||||
|
||||
gocritic:
|
||||
disabled-checks:
|
||||
|
|
|
@ -95,7 +95,7 @@ archives:
|
|||
|
||||
nfpms:
|
||||
- license: AGPL 3.0
|
||||
homepage: https://github.com/johlanse/study_xxqg
|
||||
homepage: https://github.com/sjkhsl/study_xxqg
|
||||
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||
formats:
|
||||
- deb
|
||||
|
|
10
cli/shell.go
10
cli/shell.go
|
@ -6,11 +6,11 @@ import (
|
|||
"github.com/desertbit/grumble"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/lib"
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/johlanse/study_xxqg/push"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/lib"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/push"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
func RunCli() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
version: "3.5"
|
||||
services:
|
||||
xuexi-auto:
|
||||
image: jolanse/study_xxqg:latest
|
||||
image: sjkhsl/study_xxqg:latest
|
||||
# 容器名
|
||||
container_name: xuexi-auto
|
||||
environment:
|
||||
|
|
|
@ -10,5 +10,5 @@
|
|||
- cookie保存时间长
|
||||
- 支持多种推送方式
|
||||
|
||||
[GitHub](https://github.com/johlanse/study_xxqg)
|
||||
[GitHub](https://github.com/sjkhsl/study_xxqg)
|
||||
[Get Started](./start.md)
|
|
@ -23,7 +23,7 @@
|
|||
// 项目名称
|
||||
name: 'study_xxqg',
|
||||
// 仓库地址,点击右上角的Github章鱼猫头像会跳转到此地址
|
||||
repo: 'https://github.com/johlanse/study_xxqg',
|
||||
repo: 'https://github.com/sjkhsl/study_xxqg',
|
||||
// 侧边栏支持,默认加载的是项目根目录下的_sidebar.md文件
|
||||
loadSidebar: true,
|
||||
// 导航栏支持,默认加载的是项目根目录下的_navbar.md文件
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## 可执行文件运行
|
||||
|
||||
+ 本地访问[Releases]([Release](https://github.com/johlanse/study_xxqg/releases)) ,查找对应版本并复制链接
|
||||
+ 本地访问[Releases]([Release](https://github.com/sjkhsl/study_xxqg/releases)) ,查找对应版本并复制链接
|
||||
+ 使用wget下载对应版本压缩包
|
||||
+ > tar -xzvf study_xxqg_linux_amd64.tar.gz
|
||||
+ 运行 ```./study_xxqg --init```,首次运行会生成默认配置文件
|
||||
|
@ -9,25 +9,25 @@
|
|||
|
||||
### 一键安装脚本
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/johlanse/study_xxqg/main/docs/study_xxqg_install.py && python3 study_xxqg_install.py
|
||||
wget https://raw.githubusercontent.com/sjkhsl/study_xxqg/main/docs/study_xxqg_install.py && python3 study_xxqg_install.py
|
||||
```
|
||||
|
||||
## docker运行
|
||||
|
||||
```
|
||||
docker run --name study_xxqg --restart always -d -p 8080:8080 -v /etc/study_xxqg/:/opt/config/ jolanse/study_xxqg:latest
|
||||
docker run --name study_xxqg --restart always -d -p 8080:8080 -v /etc/study_xxqg/:/opt/config/ sjkhsl/study_xxqg:latest
|
||||
```
|
||||
各个参数的含义:
|
||||
+ **--restart always 容器总是自动重启
|
||||
+ **--name study_xxqg** 运行的容器的名称,可以根据自己实际情况进行修改
|
||||
+ **-p 8080:8080** 将容器内部的8080端口映射到容器外面,前面是宿主机的端口,就是网页上访问的端口,后面是容器内部需要运行的端口,对应配置文件内web配置的端口就好
|
||||
+ **-v /etc/study_xxqg/:/opt/config/** 将容器内的/opt/config/目录映射到宿主机的/etc/study_xxqg/目录,可根据实际情况修改前面宿主机路径,映射后对应的config.yml配置文件位置就在该目录下
|
||||
+ **jolanse/study_xxqg:latest**镜像名称和镜像的版本,latest代表开发中的最新版本
|
||||
+ **sjkhsl/study_xxqg:latest**镜像名称和镜像的版本,latest代表开发中的最新版本
|
||||
|
||||
## docker-compose运行
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/johlanse/study_xxqg/main/docker-compose.yml
|
||||
wget https://raw.githubusercontent.com/sjkhsl/study_xxqg/main/docker-compose.yml
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
+ ### windows打开**study_xxqg.exe**出现直接闪退
|
||||
```yaml
|
||||
在文件路径栏输入**cmd**,然后再黑色命令窗口中输入```./study_xxqg.exe```,
|
||||
然后查看报错内容截图并在[github](https://github.com/johlanse/study_xxqg/issues) 提交issue
|
||||
然后查看报错内容截图并在[github](https://github.com/sjkhsl/study_xxqg/issues) 提交issue
|
||||
```
|
||||
|
||||
+ ### web端账号密码
|
||||
|
|
|
@ -59,12 +59,12 @@ def updateDependent() -> str:
|
|||
|
||||
|
||||
def last_version() -> str:
|
||||
return requests.get("https://api.github.com/repos/johlanse/study_xxqg/releases/latest").json().get("tag_name")
|
||||
return requests.get("https://api.github.com/repos/sjkhsl/study_xxqg/releases/latest").json().get("tag_name")
|
||||
|
||||
|
||||
def download(github: str, version: str, binaryName: str):
|
||||
print("正在下载文件中,请耐心等待!!!")
|
||||
content = requests.get(f"{github}/johlanse/study_xxqg/releases/download/{version}/{binaryName}").content
|
||||
content = requests.get(f"{github}/sjkhsl/study_xxqg/releases/download/{version}/{binaryName}").content
|
||||
if platform.system().lower() == "windows":
|
||||
with zipfile.ZipFile(io.BytesIO(content)) as zf:
|
||||
data = zf.open("study_xxqg.exe")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## windows使用教程
|
||||
|
||||
+ 浏览器访问[Release](https://github.com/johlanse/study_xxqg/releases)
|
||||
+ 浏览器访问[Release](https://github.com/sjkhsl/study_xxqg/releases)
|
||||
+ 选择最新版本下载 ```study_xxqg_amd64.zip```
|
||||
+ 将其解压到合适的位置
|
||||
+ 进入解压后的文件夹,双击运行```study_xxqg.exe```,第一次打开可能会出现闪退,发现文件夹下生成了config文件夹
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module github.com/johlanse/study_xxqg
|
||||
module github.com/sjkhsl/study_xxqg
|
||||
|
||||
go 1.18
|
||||
|
||||
|
|
|
@ -13,9 +13,9 @@ import (
|
|||
"github.com/playwright-community/playwright-go"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
// Core
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
)
|
||||
|
||||
func Study(core2 *Core, u *model.User) {
|
||||
|
|
|
@ -17,9 +17,9 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
type Score struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package state
|
|||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/johlanse/study_xxqg/lib"
|
||||
"github.com/sjkhsl/study_xxqg/lib"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
"github.com/playwright-community/playwright-go"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
// GetUserInfo
|
||||
|
|
22
main.go
22
main.go
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/johlanse/study_xxqg/utils/stop"
|
||||
"github.com/sjkhsl/study_xxqg/utils/stop"
|
||||
"io"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
|
@ -25,15 +25,15 @@ import (
|
|||
nested "github.com/Lyrics-you/sail-logrus-formatter/sailor"
|
||||
"github.com/huoxue1/xdaemon"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/lib/state"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
// "github.com/johlanse/study_xxqg/gui"
|
||||
"github.com/johlanse/study_xxqg/lib"
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/johlanse/study_xxqg/push"
|
||||
"github.com/johlanse/study_xxqg/utils/update"
|
||||
"github.com/johlanse/study_xxqg/web"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/lib/state"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
// "github.com/sjkhsl/study_xxqg/gui"
|
||||
"github.com/sjkhsl/study_xxqg/lib"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/push"
|
||||
"github.com/sjkhsl/study_xxqg/utils/update"
|
||||
"github.com/sjkhsl/study_xxqg/web"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -104,7 +104,7 @@ func init() {
|
|||
})
|
||||
if !utils.CheckQuestionDB() {
|
||||
go utils.DownloadDbFile()
|
||||
//log.Errorln("题库文件不存在或已损坏,请手动前往 https://github.com/johlanse/study_xxqg/blob/main/conf/QuestionBank.db 下载并放入程序根目录")
|
||||
//log.Errorln("题库文件不存在或已损坏,请手动前往 https://github.com/sjkhsl/study_xxqg/blob/main/conf/QuestionBank.db 下载并放入程序根目录")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/robfig/cron/v3"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
type Ding struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
)
|
||||
|
||||
func GetPush(config conf.Config) func(id string, kind string, message string) {
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
func InitPushDeer() func(id, kind, message string) {
|
||||
|
|
|
@ -6,8 +6,8 @@ import (
|
|||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
type PushPlus struct {
|
||||
|
|
10
push/qq.go
10
push/qq.go
|
@ -11,11 +11,11 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/lib"
|
||||
"github.com/johlanse/study_xxqg/lib/state"
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/lib"
|
||||
"github.com/sjkhsl/study_xxqg/lib/state"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
12
push/tg.go
12
push/tg.go
|
@ -14,12 +14,12 @@ import (
|
|||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/lib"
|
||||
"github.com/johlanse/study_xxqg/lib/state"
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/johlanse/study_xxqg/utils/update"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/lib"
|
||||
"github.com/sjkhsl/study_xxqg/lib/state"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/utils/update"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
12
push/wx.go
12
push/wx.go
|
@ -12,12 +12,12 @@ import (
|
|||
"github.com/johlanse/wechat/mp/request"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/lib"
|
||||
"github.com/johlanse/study_xxqg/lib/state"
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/johlanse/study_xxqg/utils/update"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/lib"
|
||||
"github.com/sjkhsl/study_xxqg/lib/state"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/utils/update"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
6
run.go
6
run.go
|
@ -6,9 +6,9 @@ import (
|
|||
"github.com/panjf2000/ants/v2"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/lib"
|
||||
"github.com/johlanse/study_xxqg/lib/state"
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/lib"
|
||||
"github.com/sjkhsl/study_xxqg/lib/state"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
)
|
||||
|
||||
type Task struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ package stop
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/getlantern/systray"
|
||||
"github.com/johlanse/study_xxqg/cli"
|
||||
"github.com/sjkhsl/study_xxqg/cli"
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
)
|
||||
|
||||
// CheckUpdate 检查更新
|
||||
|
@ -48,7 +48,7 @@ func CheckUpdate(version string) string {
|
|||
return ""
|
||||
}
|
||||
if versionCompare(version, latest) {
|
||||
log.Infof("当前有更新的 study_xxqg 可供更新, 请前往 https://github.com/johlanse/study_xxqg/releases 下载.")
|
||||
log.Infof("当前有更新的 study_xxqg 可供更新, 请前往 https://github.com/sjkhsl/study_xxqg/releases 下载.")
|
||||
log.Infof("当前版本: %v 最新版本: %v", version, latest)
|
||||
return "检测到可用更新,版本号:" + latest
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ func readLine() (str string) {
|
|||
}
|
||||
|
||||
func lastVersion() (string, error) {
|
||||
response, err := http.Get("https://api.github.com/repos/johlanse/study_xxqg/releases/latest")
|
||||
response, err := http.Get("https://api.github.com/repos/sjkhsl/study_xxqg/releases/latest")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ func binaryName() string {
|
|||
}
|
||||
|
||||
func checksum(github, version string) []byte {
|
||||
sumURL := fmt.Sprintf("%v/johlanse/study_xxqg/releases/download/%v/study_xxqg_checksums.txt", github, version)
|
||||
sumURL := fmt.Sprintf("%v/sjkhsl/study_xxqg/releases/download/%v/study_xxqg_checksums.txt", github, version)
|
||||
response, err := http.Get(sumURL)
|
||||
if err != nil {
|
||||
return nil
|
||||
|
@ -182,7 +182,7 @@ func SelfUpdate(github string, version string) {
|
|||
log.Warnf("获取最新版本失败: %v", err)
|
||||
wait()
|
||||
}
|
||||
url := fmt.Sprintf("%v/johlanse/study_xxqg/releases/download/%v/%v", github, latest, binaryName())
|
||||
url := fmt.Sprintf("%v/sjkhsl/study_xxqg/releases/download/%v/%v", github, latest, binaryName())
|
||||
if version == latest {
|
||||
log.Info("当前版本已经是最新版本!")
|
||||
wait()
|
||||
|
|
|
@ -11,8 +11,8 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/utils/update"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/utils/update"
|
||||
)
|
||||
|
||||
// Restart
|
||||
|
@ -151,7 +151,7 @@ func DownloadDbFile() {
|
|||
}
|
||||
}()
|
||||
log.Infoln("正在从github下载题库文件!")
|
||||
response, err := http.Get("https://github.com/johlanse/study_xxqg/releases/download/v1.0.37-beta3/QuestionBank.db")
|
||||
response, err := http.Get("https://github.com/sjkhsl/study_xxqg/releases/download/v1.0.37-beta3/QuestionBank.db")
|
||||
if err != nil {
|
||||
log.Errorln("下载db文件错误" + err.Error())
|
||||
return
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"github.com/gin-gonic/gin"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
)
|
||||
|
||||
func configFileGet() gin.HandlerFunc {
|
||||
|
|
|
@ -13,12 +13,12 @@ import (
|
|||
"github.com/gin-gonic/gin"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/lib"
|
||||
"github.com/johlanse/study_xxqg/lib/state"
|
||||
"github.com/johlanse/study_xxqg/model"
|
||||
"github.com/johlanse/study_xxqg/push"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/lib"
|
||||
"github.com/sjkhsl/study_xxqg/lib/state"
|
||||
"github.com/sjkhsl/study_xxqg/model"
|
||||
"github.com/sjkhsl/study_xxqg/push"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
)
|
||||
|
||||
// checkToken
|
||||
|
|
|
@ -10,9 +10,9 @@ import (
|
|||
"github.com/gin-contrib/gzip"
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"github.com/johlanse/study_xxqg/conf"
|
||||
"github.com/johlanse/study_xxqg/utils"
|
||||
"github.com/johlanse/study_xxqg/utils/update"
|
||||
"github.com/sjkhsl/study_xxqg/conf"
|
||||
"github.com/sjkhsl/study_xxqg/utils"
|
||||
"github.com/sjkhsl/study_xxqg/utils/update"
|
||||
)
|
||||
|
||||
// 将静态文件嵌入到可执行程序中来
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -22,7 +22,7 @@ class Help extends Component<any, any> {
|
|||
render() {
|
||||
return <>
|
||||
<h1 style={{color:"red",margin:10}}>该软件为免费软件,若你目前正在付费使用,请速度举报管理员</h1><br/>
|
||||
<h2 style={{margin:10}}>项目地址:<a href="https://github.com/johlanse/study_xxqg">https://github.com/johlanse/study_xxqg</a></h2>
|
||||
<h2 style={{margin:10}}>项目地址:<a href="https://github.com/sjkhsl/study_xxqg">https://github.com/sjkhsl/study_xxqg</a></h2>
|
||||
<br/><h2 style={{margin:10}}>{this.state.about}</h2>
|
||||
</>
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue