Skip to content

Instantly share code, notes, and snippets.

View Jimmm's full-sized avatar
💭
The best part of living is loving and giving

Jimmm

💭
The best part of living is loving and giving
View GitHub Profile
# 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)