Compare commits

..

No commits in common. "master" and "v1.0.0" have entirely different histories.

8 changed files with 9 additions and 55 deletions

1
.gitignore vendored
View File

@ -3,4 +3,3 @@ __pycache__/
config.py
*.pyc
.idea/
*.env

View File

@ -1,14 +0,0 @@
FROM alpine:3.8
ADD ["./requirements.txt", "/requirements.txt"]
RUN apk add --update --no-cache python3 postgresql-dev py3-psycopg2 && \
pip3 install -r /requirements.txt && \
rm /requirements.txt && \
adduser -D app
WORKDIR /app
CMD ["python3", "-u", "/app/main.py"]
EXPOSE 5000
USER app

View File

@ -1,5 +1,3 @@
# MOVED PERMANENTLY TO GITHUB
https://github.com/michigg/codimd_note_overview
# CodiMD note overview

View File

@ -1,15 +1,16 @@
version: "3"
networks:
db_net:
external: true
services:
codimd_note_overview:
build:
context: .
dockerfile: Dockerfile.dev
build: .
image: docker.wiai.de/fswiai/codimd_notes_overview:0.1
ports:
- 8080:5000
networks:
- db_net
env_file:
- ./docker.env
volumes:
- ./src:/app
- /home/michigg/Nextcloud/Documents/OFU_Fachschaft/Server/hackmd_overview_addon/hackmd/docker.env

View File

@ -1,7 +0,0 @@
DB_HOST=<hostname>
POSTGRES_DB=<db name>
POSTGRES_USER=<user name>
POSTGRES_PASSWORD=<user password>
# Padlist
TESTING=<True|False>

View File

@ -1,19 +0,0 @@
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)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

View File

@ -20,10 +20,6 @@
<a class="navbar-brand" href="#">
<h1>CodiMD notes</h1>
</a>
<div navbar-nav flex-row ml-md-auto d-none d-md-flex>
<a class="nav-item nav-link" href="https://git.wiai.de/mgoetz/codimd_note_overview" target="_blank">Fork me <img
src="{{ url_for('static', filename='images/gitea-192.png') }}" width="35px" heigt="35px"></a>
</div>
</nav>
<div class="container">
@ -45,7 +41,7 @@
<td scope="row"><a href="{{host}}/{{note['shortid']}}" target="_blank">{{note['shortid']}}</a></td>
<td>{{note['title']}}</td>
<td>{{note['alias']}}</td>
<td><span class="note-date">{% if note['lastchangeAt'] %}{{note['lastchangeAt'].strftime('%Y-%m-%d %H:%M')}}{% endif %}</span>
<td><span class="note-date">{% if note['lastchangeAt'] %}{{note['lastchangeAt'].strftime('%d.%m.%Y %H:%M')}}{% endif %}</span>
</td>
<td>{{note['permission']}}</td>
<td>{%if note['content']%}💬{%else%}❌{%endif%}</td>