Spaces:
Sleeping
Sleeping
File size: 655 Bytes
394f0f6 540dde0 110ce7a e2a5e80 110ce7a 303a3a3 37e6751 25d0975 110ce7a 5871307 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import os
def save_raw_text(main_text, other_texts):
# メインテキストとその他のテキストを改行で結合
combined_text = main_text + "\\n" + other_texts
# 結合したテキストを output1.txt に保存
output1_path = os.path.join(os.path.dirname(__file__), "output1.txt")
with open(output1_path, 'w', encoding='utf-8') as file:
file.write(combined_text)
return ""
if __name__ == "__main__":
import sys
main_text = sys.argv[1] if len(sys.argv) > 1 else ""
other_texts = sys.argv[2] if len(sys.argv) > 2 else ""
output_text = save_raw_text(main_text, other_texts)
print(output_text)
|