Skip to content

Instantly share code, notes, and snippets.

@tcchau
tcchau / trac2down.py
Last active December 11, 2015 16:29 — forked from sgk/trac2down.py
Modified to take into account some trac databases that store timestamps at a microsecond resolution and would cause fromtimestamp() to throw a ValueError exception.
#!/usr/bin/python
# vim:set fileencoding=utf-8 sw=2 ai:
import sqlite3
import datetime
import re
SQL = '''
select
name, version, time, author, text