Browse Source

added option to download pdf

main
crunk 5 months ago
parent
commit
e779a764b4
  1. 2
      library/application/csvparser.py
  2. 0
      library/data/files/files_here
  3. 5
      library/page.py
  4. 4
      library/templates/publication.html

2
library/application/csvparser.py

@ -17,6 +17,7 @@ FIELDNAMES = [
"LicenseShort",
"Highlights",
"Comments",
"Files",
]
@ -53,6 +54,7 @@ class CsvParser:
"License": license,
"Highlights": row["Highlights"],
"Comments": row["Comments"],
"Files": row["Files"],
"Image": self._hasimage(row["Id"]),
}
return pubinfo

0
library/data/files/files_here

5
library/page.py

@ -6,8 +6,7 @@ import json
import os
import bcrypt
import flask
from flask import redirect, render_template, request
from flask import redirect, render_template, request, Blueprint
from flask_wtf.csrf import CSRFProtect
from icalendar import Calendar
from PIL import Image
@ -23,6 +22,8 @@ from search import search
APP = create_app()
csrf = CSRFProtect()
csrf.init_app(APP)
files = Blueprint("files", __name__, static_folder="files")
APP.register_blueprint(files)
csvparser = CsvParser(
APP.config["LIBRARY_FILENAME"], APP.config["IMAGE_FOLDER"]
)

4
library/templates/publication.html

@ -53,6 +53,10 @@
<td>Comments</td>
<td><p>{{ fullpublication["Comments"] }}</p></td>
</tr>
<tr>
<td>File</td>
<td><a href='files/{{fullpublication["Files"]}}'><p>{{ fullpublication["Files"] }}</p></a></td>
</tr>
</tbody>
</table>
</div>

Loading…
Cancel
Save