def hangouts(self): from parsers.hangouts import main parser = ArgParseDefault( description='Parse message logs from Google Hangouts') parser = add_common_parse_arguments(parser) parser.add_argument('-f', '--file-path', dest='file_path', default=config['hangouts']['DEFAULT_RAW_LOCATION'], help='Path to Hangouts chat log file (json file)') args = parser.parse_args(sys.argv[2:]) main(args.own_name, args.file_path, args.max)
def messenger(self): from parsers.messenger import main parser = ArgParseDefault( description='Parse message logs from Facebook Messenger') parser = add_common_parse_arguments(parser) parser.add_argument( '-f', '--file-path', dest='file_path', default=config['messenger']['DEFAULT_RAW_LOCATION'], help='Path to Facebook messenger chat log folder') args = parser.parse_args(sys.argv[2:]) main(args.own_name, args.file_path, args.max)
def telegram(self): from parsers.telegram import main parser = ArgParseDefault( description='Parse message logs from Telegram') parser = add_common_parse_arguments(parser) parser.add_argument( '--max-dialog', dest='max_dialog', type=int, default=config['telegram']['USER_DIALOG_MESSAGES_LIMIT'], help='Maximum number of messages to export per dialog') args = parser.parse_args(sys.argv[2:]) main(args.own_name, max_exported_messages=args.max, user_dialog_messages_limit=args.max_dialog)
def whatsapp(self): from parsers.whatsapp import main parser = ArgParseDefault( description='Parse message logs from Whatsapp') parser = add_common_parse_arguments(parser) parser.add_argument('-f', '--file-path', dest='file_path', default=config['whatsapp']['DEFAULT_RAW_LOCATION'], help='Path to Facebook messenger chat log folder') parser.add_argument('-i', '--infer-datetime', dest='infer_datetime', type=str2bool, nargs='?', default=True, help='Infer datetime regex for each chat if true') args = parser.parse_args(sys.argv[2:]) main(args.own_name, args.file_path, args.max, args.infer_datetime)