Compare commits

..

3 Commits

4 changed files with 22 additions and 1 deletions

View File

@ -1,10 +1,12 @@
# MOVED PERMANENTLY TO GITHUB
https://github.com/michigg/codimd_note_overview
# CodiMD note overview
a searchable list of existing hackmd pads [https://padlist.wiai.de/](https://padlist.wiai.de/)
![demo.png](demo.png)
![demo.jpg](demo.jpg)
## Testing locally

BIN
demo.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

BIN
demo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

View File

@ -0,0 +1,19 @@
import os
import psycopg2
DB_HOST = os.environ.get('DB_HOST')
DB_NAME = os.environ.get('POSTGRES_DB')
DB_USER = os.environ.get('POSTGRES_USER')
DB_PASSWORD = os.environ.get('POSTGRES_PASSWORD')
deletion_statement = 'DELETE FROM "Notes" WHERE "content" = \'\';'
try:
conn = psycopg2.connect(host=DB_HOST, database=DB_NAME, user=DB_USER, password=DB_PASSWORD)
cur = conn.cursor()
cur.execute(deletion_statement)
conn.commit()
cur.close()
conn.close()
except Exception as e:
print(e)