Skip to content

Commit

Permalink
update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaohong6 committed Mar 13, 2022
1 parent daf56a1 commit 9055c51
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ python3 main.py
1. 提供日语曲名(必填)
2. 提供中文曲名(如果与日语曲名一样或没有翻译则留空)
3. 提供B站视频链接(如有)。如果填了,程序会询问视频是否是亲自投稿。
4. 询问是否有投稿文。如果输入投稿文,则需要输入多行内容,结束时输入空行告诉程序输入停止。

通过修改`config.yaml`文件,可以解锁以下功能:
1. 询问是否有投稿文。如果输入投稿文,则需要输入多行内容,结束时输入空行告诉程序输入停止。
2. 展示歌曲的封面图,并要求用户点击图片选择背景颜色,该颜色会被用在`VOCALOID_Songbox``VOCALOID Songbox Introduction`两个模板。
3. 以及其它默认打开的功能,如裁剪封面图片的黑边。

如果出现无法解决的问题,程序会
1. 询问用户该怎么办。例如:在vocadb上找到多个同名歌时让用户做决定;找不到歌曲的中文翻译时要求用户提供。
Expand All @@ -42,5 +46,4 @@ python3 main.py
正确范例:输入曲名xxx,视频链接xxx之后,程序输出了以下错误信息"..."

* 除了AtWiki和vocadb,可以考虑从别的网站抓取信息。没什么技术困难,但是费时间。例如抓取网易云音乐的歌词(不过Ann好像写过这个的脚本)
* 添加文件输入歌曲信息,而不是局限于控制台,避免输入半天信息结果发现输错了必须重来的尴尬。难度同上(其实可以直接用pipe达成)。
* 更智能的歌词选择:现在已经可以去除大部分开头与歌词无关的内容。但是不一定能适配所有AtWiki条目。
2 changes: 1 addition & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ wikitext: !WikitextConfig
uploader_note: false
color: !ColorConfig
# 让用户从图片选择背景颜色
color_from_image: true
color_from_image: false
# 如果指定了背景颜色,但是文字颜色没有指定,亮度(0-100)高达多少会使用黑色文字?
fg_color_threshold: 60
# 打开森雨亮瞎眼模式;功能未知;副作用未知
Expand Down
2 changes: 2 additions & 0 deletions utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def get_manual_lyrics() -> Lyrics:
result.append("")
index += 1
else:
if index + target_line - 1 >= len(translation):
break
result.append(translation[index + target_line - 1])
index += group_length
return Lyrics(staff=[], translator=translator, source_name=name, source_url=url,
Expand Down

0 comments on commit 9055c51

Please sign in to comment.