diff --git a/README.md b/README.md index 2caf703..cf1c1bc 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ * 支持屏蔽弹幕、合并相似弹幕等设置 * 自带样式生成器 * 支持自动翻译弹幕、醒目留言到日语 +* 支持标注打赏用户名的读音(拼音和日文假名) ## 使用方法 ### 一、本地使用 @@ -28,11 +29,11 @@ **注意事项:** -* 本地使用时不要关闭blivechat.exe那个黑框,否则不能继续获取弹幕 +* 本地使用时不要关闭blivechat.exe那个黑框,否则不能继续获取头像或弹幕 * 样式生成器没有列出所有本地字体,但是可以手动输入本地字体 ### 二、公共服务器 -请优先在本地使用,使用公共服务器会有更大的弹幕延迟,而且服务器故障时可能发生直播事故 +请优先在本地使用,使用公共服务器会有更大的延迟,而且服务器故障时可能发生直播事故 * [公共服务器](http://chat.bilisc.com/) * [仅样式生成器](https://style.vtbs.moe/) @@ -73,8 +74,14 @@ ``` 2. 用浏览器打开[http://localhost:12450](http://localhost:12450),以下略 -### nginx配置(可选) -自建服务器时使用,`sudo vim /etc/nginx/sites-enabled/blivechat.conf` +## 自建服务器相关补充 +### 服务器配置 +服务器配置在`data/config.ini`,可以配置数据库和允许自动翻译等,编辑后要重启生效 + +**自建服务器时强烈建议不使用加载器**,否则可能因为混合HTTP和HTTPS等原因加载不出来 + +### 参考nginx配置 +`sudo vim /etc/nginx/sites-enabled/blivechat.conf` ```conf upstream blivechat { diff --git a/config.py b/config.py index ec3dc92..d1c989c 100644 --- a/config.py +++ b/config.py @@ -44,7 +44,7 @@ class AppConfig: def load(self, path): try: config = configparser.ConfigParser() - config.read(path) + config.read(path, 'utf-8') app_section = config['app'] self.database_url = app_section['database_url'] diff --git a/data/config.ini b/data/config.ini index b0df8ce..b21432b 100644 --- a/data/config.ini +++ b/data/config.ini @@ -1,25 +1,22 @@ [app] +# 数据库配置,见https://docs.sqlalchemy.org/en/13/core/engines.html#database-urls # See https://docs.sqlalchemy.org/en/13/core/engines.html#database-urls database_url = sqlite:///data/database.db +# 允许自动翻译到日语 # Enable auto translate to Japanese enable_translate = true +# 允许翻译的房间ID,以逗号分隔。如果为空,允许所有房间 # Comma separated room IDs in which translation are not allowed. If empty, all are allowed # Example: allow_translate_rooms = 4895312,22347054,21693691 allow_translate_rooms = +# 如果使用了nginx之类的反向代理服务器,设置为true # Set to true if you are using a reverse proxy server such as nginx tornado_xheaders = false +# 加载器URL,本地使用时加载器可以让你先运行OBS再运行blivechat。如果为空,不使用加载器 +# **自建服务器时强烈建议不使用加载器**,否则可能因为混合HTTP和HTTPS等原因加载不出来 # Use a loader so that you can run OBS before blivechat. If empty, no loader is used loader_url = https://xfgryujk.sinacloud.net/blivechat/loader.html - - -# DON'T modify this section -[DEFAULT] -database_url = sqlite:///data/database.db -enable_translate = true -allow_translate_rooms = -tornado_xheaders = false -loader_url = diff --git a/frontend/public/static/img/tutorial/tutorial-1.png b/frontend/public/static/img/tutorial/tutorial-1.png index 28055ee..bbb9568 100644 Binary files a/frontend/public/static/img/tutorial/tutorial-1.png and b/frontend/public/static/img/tutorial/tutorial-1.png differ diff --git a/frontend/public/static/img/tutorial/tutorial-2.png b/frontend/public/static/img/tutorial/tutorial-2.png index 2b2f285..33c5179 100644 Binary files a/frontend/public/static/img/tutorial/tutorial-2.png and b/frontend/public/static/img/tutorial/tutorial-2.png differ diff --git a/frontend/public/static/img/tutorial/tutorial-3.png b/frontend/public/static/img/tutorial/tutorial-3.png index 320bc43..16d4673 100644 Binary files a/frontend/public/static/img/tutorial/tutorial-3.png and b/frontend/public/static/img/tutorial/tutorial-3.png differ diff --git a/frontend/public/static/img/tutorial/tutorial-5.png b/frontend/public/static/img/tutorial/tutorial-5.png index 5c24060..a0b7c04 100644 Binary files a/frontend/public/static/img/tutorial/tutorial-5.png and b/frontend/public/static/img/tutorial/tutorial-5.png differ diff --git a/screenshots/chrome.png b/screenshots/chrome.png index 7d940e9..0de262c 100644 Binary files a/screenshots/chrome.png and b/screenshots/chrome.png differ diff --git a/screenshots/obs.png b/screenshots/obs.png index caf5c6f..d89adf2 100644 Binary files a/screenshots/obs.png and b/screenshots/obs.png differ diff --git a/screenshots/stylegen.png b/screenshots/stylegen.png index 10b3a74..4b6d63b 100644 Binary files a/screenshots/stylegen.png and b/screenshots/stylegen.png differ