From 54801dcc35e87f7bde61f271857e54a20163e72f Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sat, 12 Dec 2020 13:50:00 +0100 Subject: [PATCH] Wire up install docs and requirements And fix an import that I maybe broke but not sure. --- .gitignore | 3 +++ README.md | 18 ++++++++++++++++++ library/csvparser/__init__.py | 0 .../__pycache__/csvparser.cpython-39.pyc | Bin 817 -> 0 bytes library/page.py | 2 +- makefile | 10 ++++++++++ requirements.txt | 1 + 7 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 library/csvparser/__init__.py delete mode 100644 library/csvparser/__pycache__/csvparser.cpython-39.pyc create mode 100644 makefile create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a5203d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.venv/ +/__pycache__/ +*.pyc diff --git a/README.md b/README.md index e69de29..33acea6 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,18 @@ +# varia-library-website + +> Work In Progress + +## Hacking + +``` +$ python3 -m venv .venv && source .venv/bin/activate +$ FLASK_APP=library +``` + +Or run `make setup`. + +``` +$ FLASK_APP=library.page flask run +``` + +Or run `make`. diff --git a/library/csvparser/__init__.py b/library/csvparser/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/library/csvparser/__pycache__/csvparser.cpython-39.pyc b/library/csvparser/__pycache__/csvparser.cpython-39.pyc deleted file mode 100644 index b2c4c022e108ec176e2379174d88c1a13006d10f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 817 zcmZ`%&2G~`5Z+lkw(GPMRb1c+h=gLeR2&dOBH|b!euS`uthIOBxHz%9yG>QeIfXkC zPmmmW9k}h46R*${GY*7Qh+WOMp3%;H<8M|R9K;OQw=dtbJLud zRkOZ?HJ5zJ7p!HU?*X&DRnW3EEZ`k7`?!}Lu-WZL%shUG9JJq~wZ!F(uj9GURhbV9 zGk2f|q4VoT%^a_d^BZ9&&OfWmnTt)K%f@E1)Xt;3@u)29D{q4_u+{6g$)ujD#7x9Auar(kYObofnW~vhkh~Nd9AXJA^wscE<)*YM`RylIvJu)~ z=JspYT)C(VVkjh0NF4@uAb|Uz5Apkkem(}a`sL{SN5A7;{Z83}w=iNKjuu|aS7GZ( z?=C6}?EJw$+P=A=Ek|wrv8J(UdJ}2?V9nizbDUwhNm;2Z+cZUTb}2h_G+EtoMo*@-yr|SuATsJbf{5>XQ5eO)0Ot_1 AumAu6 diff --git a/library/page.py b/library/page.py index dd09dfd..fc1baca 100644 --- a/library/page.py +++ b/library/page.py @@ -4,7 +4,7 @@ import flask from flask import render_template -from csvparser.csvparser import getpublications +from library.csvparser.csvparser import getpublications APP = flask.Flask(__name__, static_folder="static") diff --git a/makefile b/makefile new file mode 100644 index 0000000..1957aff --- /dev/null +++ b/makefile @@ -0,0 +1,10 @@ +default: run + +setup: + @python3 -m venv .venv && \ + .venv/bin/pip install -r requirements.txt + +run: + @FLASK_APP=library.page .venv/bin/flask run + +.PHONY: setup run diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7e10602 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +flask