cellarspoon
3 years ago
No known key found for this signature in database
GPG Key ID: 3789458B3D0C410
3 changed files with
7 additions and
6 deletions
-
Makefile
-
app.py
-
templates/index.html
|
|
@ -1,5 +1,5 @@ |
|
|
|
default: run |
|
|
|
|
|
|
|
run: |
|
|
|
@mkdir -p metadatum generated && \
|
|
|
|
@mkdir -p metadatum static/generated && \
|
|
|
|
FLASK_ENV=development FLASK_APP=app flask run |
|
|
|
|
|
@ -50,11 +50,12 @@ def upload(): |
|
|
|
metadata_fpath = os.path.join(CWD, "metadatum", filename) |
|
|
|
f.save(metadata_fpath) |
|
|
|
|
|
|
|
pdf = os.path.join(CWD, "generated", "test.pdf") |
|
|
|
pdf = os.path.join(CWD, "static", "generated", "{}.pdf".format(filename)) |
|
|
|
metadata = "sqlite:///{}".format(os.path.join(CWD, "metadatum", filename)) |
|
|
|
make_cards( |
|
|
|
pdf, metadata, ["title", "timestamp", "comments", "authors"], ["tags"] |
|
|
|
) |
|
|
|
return render_template("index.html", upload_form=upload_form, pdf=pdf) |
|
|
|
pdf_url = url_for("static", filename="generated/{}.pdf".format(filename)) |
|
|
|
return render_template("index.html", upload_form=upload_form, pdf=pdf_url) |
|
|
|
|
|
|
|
return render_template("index.html", upload_form=upload_form) |
|
|
|
|
|
@ -41,9 +41,9 @@ |
|
|
|
|
|
|
|
</form> |
|
|
|
|
|
|
|
{% if pdf %} |
|
|
|
<p> FOOOO </p> |
|
|
|
{% endif %} |
|
|
|
<object data="{{ pdf }}" type="application/pdf"> |
|
|
|
<iframe src="{{ pdf }}"></iframe> |
|
|
|
</object> |
|
|
|
|
|
|
|
</body> |
|
|
|
</html> |
|
|
|