Add --glob and --location flags to hist and question commands, to be able to specify the location and files they should use.
This commit is contained in:
@@ -15,7 +15,8 @@ def convert_messages(args: argparse.Namespace, config: Config) -> None:
|
||||
('.txt', '.yaml') to the latest default message file suffix ('.msg').
|
||||
"""
|
||||
chat = ChatDB.from_dir(Path(config.cache),
|
||||
Path(config.db))
|
||||
Path(config.db),
|
||||
glob='*')
|
||||
# read all known message files
|
||||
msgs = chat.msg_gather(loc=msg_location.DISK, glob='*.*')
|
||||
# make a set of all message IDs
|
||||
@@ -55,7 +56,9 @@ def print_chat(args: argparse.Namespace, config: Config) -> None:
|
||||
answer_contains=args.answer)
|
||||
chat = ChatDB.from_dir(Path(config.cache),
|
||||
Path(config.db),
|
||||
mfilter=mfilter)
|
||||
mfilter=mfilter,
|
||||
loc=msg_location(args.location),
|
||||
glob=args.glob)
|
||||
chat.print(args.source_code_only,
|
||||
args.with_metadata,
|
||||
paged=not args.no_paging,
|
||||
|
||||
Reference in New Issue
Block a user