Skip to content

Commit b70e11d

Browse files
committed
更新 README
1 parent 4ebb516 commit b70e11d

1 file changed

Lines changed: 31 additions & 20 deletions

File tree

README.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,46 @@
11
# Blog-Pic-go
22
![Go](https://img.shields.io/github/go-mod/go-version/CharlieYu4994/Blog-Pic-go)![GPLv3](https://img.shields.io/github/license/CharlieYu4994/Blog-Pic-go) ![GitHub last commit](https://img.shields.io/github/last-commit/CharlieYu4994/Blog-Pic-go)
33

4-
一个潦草的 Bing 每日一图 API 的 Go 语言实现,并提供图片地址持久化存储
4+
![Demo](https://api.lassi-cat.cn:60443/bingapi/bing)
5+
6+
~~一个潦草的 Bing 每日一图 API 的 Go 语言实现,并提供图片地址持久化存储~~
7+
8+
一个潦草的博客壁纸的 Go 语言实现,并提供图片地址持久化存储
9+
10+
> PS:已经不只是 Bing 每日一图 API 了……
11+
512

613
## 特点
714
+ 使用 Golang 编写,SQLite3 作为数据库实现,较为轻量化
815
+ 提供自定义设置项,方便个性化
16+
+ 提供 Bing 美图以及 NASA 的 APOD
17+
918

10-
## 部署
19+
## 使用
1120

1221
### 环境要求
1322
+ 任意一台服务器 (required)
14-
+ Go 编译环境 (optional 仅在需要自行编译时需要)
23+
+ Go 编译环境 (required)
1524

16-
### 提供二进制文件
17-
1.[Release](https://github.com/CharlieYu4994/Blog-Pic-go/releases) 页面下载二进制文件
18-
2. 根据『config.json.template』创建配置文件
19-
3. 将数据库、配置文件、二进制文件放在同一目录下运行
20-
4. 访问 `your.domain/bing` 查看效果
21-
22-
### 不提供二进制文件
25+
### 编译
2326
1.[Release](https://github.com/CharlieYu4994/Blog-Pic-go/releases) 页面下载源码
2427
2. 解压并进入文件夹
2528
3. 在文件夹下运行 `go build ./`
26-
4. 根据『config.json.template』创建配置文件
27-
5. 将数据库、配置文件、二进制文件放在同一目录下运行
28-
6. 访问 `your.domain/bing` 查看效果
2929

30+
### 部署
31+
1. 根据『config.json.template』创建配置文件
32+
2. 将数据库、配置文件、二进制文件放在同一目录下运行
33+
3. 访问 `your.domain/bing` 查看效果
3034

31-
## 使用
32-
访问 `your.domain/bing?dat=<date>&res=<resolution>` 然后你会被重定向到图片
35+
36+
## 访问
37+
访问 `your.domain/<type>?dat=<date>&res=<resolution>` 然后你会被重定向到图片
3338

3439
### 参数
40+
1. type 图片类型 (required)
41+
+ bing:Bing 美图
42+
+ apod:NASA 的 APOD
43+
3544
1. dat 日期偏移 (optional)
3645
+ 0:当天的,同理 1 为一天前的,最大为你设置的 `picnum`-1
3746
+ -1:随机图片
@@ -42,30 +51,32 @@
4251
+ uhdres:当天的最高分辨率,分辨率不定
4352
+ `height`x`width`:自定义分辨率(**必须被 Bing 官方支持**
4453
+ 可以不提供,不提供默认为 `hdres`
54+
+ NASA 的 APOD 不支持调整分辨率
55+
4556

4657
## 资源
4758

4859
### 官方演示
4960
大家可以随便使用
5061
```
51-
api.lassi-cat.cn:60443/bingapi/bing?dat=<date>&res=<resolution>
62+
api.lassi-cat.cn:60443/bingapi/<type>?dat=<date>&res=<resolution>
5263
```
53-
![Demo](https://api.lassi-cat.cn:60443/bingapi/bing)
5464
更多详情请查看 [Demo 主页](https://bing.charlie.moe)
5565
> 此 Demo 由 [LassiCat](https://github.com/LassiCat) 的服务器托管运行 ~~(其实就是咱的)~~
5666
5767
### 图像数据库
5868
~~在『main』分支下的『picture.db』为从2021年1月1日开始的图像,不定期更新 (其实不更新)~~
5969

60-
请使用 [Bing-API-db](https://github.com/CharlieYu4994/Bing-API-db) 提供的数据
70+
请使用 [Blog-Pic-db](https://github.com/CharlieYu4994/Blog-Pic-db) 提供的数据
6171

62-
[点击](https://github.com/CharlieYu4994/Bing-API-db/releases/latest/download/picture.db) 下载最新数据库
72+
[点击](https://github.com/CharlieYu4994/Blog-Pic-db/releases/latest/download/picture.db) 以下载最新数据库
6373

6474
### 对 BingAPI 的研究
6575
[对 BingAPI 的简单研究](https://blog.charlie.moe/post/BingAPI-00/)
6676

77+
6778
## 版权
68-
Bing 今日美图有微软 Bing 提供,**使用请注意版权,不可用于商业用途**
79+
Bing 美图由微软 Bing 提供,APOD 由 NASA 提供,**使用请注意版权,不可用于商业用途**
6980

7081
本程序由 [@CharlieYu4994](https://blog.charlie.moe/) 编写,以 GPLv3 协议发布
7182

0 commit comments

Comments
 (0)