Skip to content

Instantly share code, notes, and snippets.

@cekage
cekage / purgePaperlessEmptyLines.py
Created Mar 2, 2019
Remove empty lines in Content field of document.
View purgePaperlessEmptyLines.py
#!/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])
View keybase.md

Keybase proof

I hereby claim:

  • I am cekage on github.
  • I am cekage (https://keybase.io/cekage) on keybase.
  • I have a public key ASDl9ddNW03hcLATA3_s2E6rhrAufVN1hAVtGXF6qCx8AQo

To claim this, I am signing this object:

You can’t perform that action at this time.