Skip to content

Instantly share code, notes, and snippets.

cekage /
Created March 2, 2019 12:42
Remove empty lines in Content field of document.
#!/usr/bin/env python3
import sqlite3
import re
conn = sqlite3.connect('/opt/paperless/data/db.sqlite3')
c = conn.cursor()
d = conn.cursor()
for row in c.execute('''Select id,content from documents_document order by id asc'''):
purgedContent = re.sub('(\r|\n)+','\n', row[1])
cekage /
Created December 4, 2017 12:42

Keybase proof

I hereby claim:

  • I am cekage on github.
  • I am cekage ( on keybase.
  • I have a public key ASDl9ddNW03hcLATA3_s2E6rhrAufVN1hAVtGXF6qCx8AQo

To claim this, I am signing this object: