Changes from https://github.com/juk0de/ChatMastermind.git #1

Closed
ok wants to merge 176 commits from main into juk
Showing only changes of commit 54ece6efeb - Show all commits

View File

@ -13,7 +13,15 @@ def print_cmd(args: argparse.Namespace, config: Config) -> None:
try:
message = Message.from_file(fname)
if message:
print(message.to_str(source_code_only=args.source_code_only))
if args.question:
print(message.question)
elif args.answer:
print(message.answer)
elif message.answer and args.only_source_code:
for code in message.answer.source_code():
print(code)
else:
print(message.to_str())
except MessageError:
print(f"File is not a valid message: {args.file}")
sys.exit(1)