21 lines
496 B
Python
21 lines
496 B
Python
import argparse
|
|
from pathlib import Path
|
|
|
|
from . import (parse_messages_in_chat_folder, merge_adjacent_messages,
|
|
format_messages)
|
|
|
|
def parse_args():
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument('path', type=Path)
|
|
return parser.parse_args()
|
|
|
|
def main():
|
|
args = parse_args()
|
|
|
|
messages = parse_messages_in_chat_folder(args.path)
|
|
messages = merge_adjacent_messages(messages)
|
|
print(format_messages(messages))
|
|
|
|
if __name__ == '__main__':
|
|
main()
|