Skip to content

Commit

Permalink
完善文档
Browse files Browse the repository at this point in the history
  • Loading branch information
rroy233 committed Apr 27, 2023
1 parent 24180c7 commit 90acf27
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 5 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,44 @@ getlimit - 获取当日使用限额
admin - 查看管理员指令
```
#### 创建配置文件
#### 配置
复制`config.example.yaml`为`config.yaml`
```yaml
general:
bot_token: "xxx" # 从BotFather获得
language: "zh-hans" # 默认语言(对应/languages文件夹中的文件名)
worker_num: 2 # 消息处理的线程数
download_worker_num: 3 # 下载、文件转码工作线程数
admin_uid: 0 # 管理员UID
user_daily_limit: 10 # 每日使用次数限制
process_wait_queue_max_size: 50 # 等待队列最大长度
cache:
enabled: false # 是否启用文件缓存(需要使用Redis)
storage_dir: "./storage/cache" # 文件缓存存放位置
max_disk_usage: 1024 # 最大磁盘占用(MB)
cache_expire: 86400 # 文件缓存有效期(s)
cache_clean_interval: 1800 # 过期文件检查周期(s)
logger:
report: false # 是否启用远程日志上报(需要自行设计接收端,参考https://github.com/rroy233/logger)
report_url: "" # 远程日志上报url(POST)
report_query_key: "" # 远程日志上报query参数
redis:
server: "localhost" # redis服务器地址
port: "6379" # redis服务器端口
tls: false # redis是否启用tls
password: "" # redis密码
db: 0 # redis数据库编号
```


#### 下载ffmpeg

下载对应平台的[ffmpeg](https://ffmpeg.org/)的可执行文件,命名格式为`ffmpeg-{GOOS}-{GOARCH}`,复制到`./ffmpeg`文件夹
下载对应平台的[ffmpeg](https://ffmpeg.org/)的可执行文件,命名格式为`ffmpeg-{GOOS}-{GOARCH}`,复制到`./ffmpeg`文件夹

#### 运行程序

Expand Down
36 changes: 33 additions & 3 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

### Feature

* Send sticker or sticker link to Bot, so it will help you convert into GIF file.
* Forward GIF to Bot, and Bot will send it back to you as a file for saving.
* Send stickers or sticker links to the bot, and it will convert them into easily savable GIF files for you.
* Forward GIFs to the bot, and it will send them back to you in file form for easy saving.
* Download single sticker.
* Download whole sticker set.

Expand Down Expand Up @@ -70,10 +70,40 @@ getlimit - Get remaining usage times
admin - Get admin commands
```
#### Create Config File
#### Configuration
copy `config.example.yaml` to `config.yaml`.
```yaml
general:
bot_token: "xxx" # Obtained from BotFather
language: "zh-hans" # Default language (corresponding to the filename in the /languages folder)
worker_num: 2 # Number of threads for message processing
download_worker_num: 3 # Number of threads for downloading and file transcoding
admin_uid: 0 # Admin UID
user_daily_limit: 10 # Daily usage limit
process_wait_queue_max_size: 50 # Maximum length of the wait queue
cache:
enabled: false # Whether to enable file caching (requires Redis)
storage_dir: "./storage/cache" # Location for storing file cache
max_disk_usage: 1024 # Maximum disk usage (MB)
cache_expire: 86400 # File cache validity period (s)
cache_clean_interval: 1800 # Expiration file check interval (s)
logger:
report: false # Whether to enable remote log reporting (requires a custom receiver, see https://github.com/rroy233/logger)
report_url: "" # Remote log reporting URL (POST)
report_query_key: "" # Query parameter for remote log reporting
redis:
server: "localhost" # Redis server address
port: "6379" # Redis server port
tls: false # Whether to enable TLS for Redis
password: "" # Redis password
db: 0 # Redis database number
```

#### Download ffmpeg

download ffmpeg from [official website](https://ffmpeg.org/), rename it to `ffmpeg-{GOOS}-{GOARCH}`, and put it into `./ffmpeg` folder.
Expand Down

0 comments on commit 90acf27

Please sign in to comment.