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 c5c4a6628f - Show all commits

View File

@ -7,7 +7,7 @@ from typing import List, Dict, Any, Optional
def read_file(fname: pathlib.Path, tags_only: bool = False) -> Dict[str, Any]: def read_file(fname: pathlib.Path, tags_only: bool = False) -> Dict[str, Any]:
with open(fname, "r") as fd: with open(fname, "r") as fd:
tagline = fd.readline().strip().split(':')[1].strip() tagline = fd.readline().strip().split(':', maxsplit=1)[1].strip()
# also support tags separated by ',' (old format) # also support tags separated by ',' (old format)
separator = ',' if ',' in tagline else ' ' separator = ',' if ',' in tagline else ' '
tags = [t.strip() for t in tagline.split(separator)] tags = [t.strip() for t in tagline.split(separator)]