mirror of
https://github.com/HiMeditator/auto-caption.git
synced 2026-02-14 20:02:03 +08:00
docs(readme): 更新说明并添加终端使用指南
This commit is contained in:
@@ -29,14 +29,18 @@ def caption_display(obj):
|
||||
if caption_index >=0 and caption_index != int(obj['index']):
|
||||
display.finalize_current_sentence()
|
||||
caption_index = int(obj['index'])
|
||||
full_text = f"{obj['text']} {obj['translation']}"
|
||||
full_text = f"{obj['text']}\n{obj['translation']}"
|
||||
if obj['translation']:
|
||||
full_text += "\n"
|
||||
display.update_text(full_text)
|
||||
display.display()
|
||||
|
||||
def translation_display(obj):
|
||||
global original_caption
|
||||
global display
|
||||
full_text = f"{obj['text']} {obj['translation']}"
|
||||
full_text = f"{obj['text']}\n{obj['translation']}"
|
||||
if obj['translation']:
|
||||
full_text += "\n"
|
||||
display.update_text(full_text)
|
||||
display.display()
|
||||
display.finalize_current_sentence()
|
||||
|
||||
Reference in New Issue
Block a user