fix bug with invalid newline-character

This commit is contained in:
sunwoo1524 2023-12-05 19:33:42 +09:00
parent f871121f75
commit 62087c0132

View file

@ -17,7 +17,10 @@ def writeRandomSentenceNote():
sentences = work_sheet.col_values(1) sentences = work_sheet.col_values(1)
# choice random sentence # choice random sentence
sentence = random.choice(sentences) sentence: str = random.choice(sentences)
# change newline-character to be valid
sentence = sentence.replace("\\n", "\n")
# write note # write note
random_sentence_note = misskey.notes_create(text=sentence) random_sentence_note = misskey.notes_create(text=sentence)