This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Converts a JSONL file generated with telegram-history-dump (1) to CSV | |
# Usage: python telegram-csv.py <path to json file> <path to output csv file> | |
# Example: python telegram-csv.py Bob.json Bob.csv | |
# 1: https://github.com/tvdstaaij/telegram-history-dump | |
from datetime import datetime | |
import unicodecsv as csv | |
import json, sys | |
def get_isodate(msg): | |
date = msg.get("date", None) |