|
|
@ -109,6 +109,8 @@ def annotations(): |
|
|
|
books = db.session.query(Book).all() |
|
|
|
# books = db.session.query(Book).order_by(Book.title) |
|
|
|
# id = book.id |
|
|
|
server = request.host |
|
|
|
rstr=('http://' + server+'/uploads/','') |
|
|
|
annot = get_annotations() |
|
|
|
print(annot) |
|
|
|
return render_template('annotations.html', annot=annot, books=books, light=light) |
|
|
@ -121,6 +123,17 @@ def annotations_pdf(): |
|
|
|
html = render_template(('annotations.html'), annot=annot, light=light) |
|
|
|
return render_pdf(HTML(string=html)) |
|
|
|
|
|
|
|
# @app.route('/myannotations.pdf') |
|
|
|
# def myannotations_pdf(): |
|
|
|
# books = db.session.query(Book).all() |
|
|
|
# name=str(request.args.get('query')) |
|
|
|
# annot = get_annotations() |
|
|
|
# res = get_annot_results(annot,name) |
|
|
|
# # Make a PDF straight from HTML in a string. |
|
|
|
# html = render_template('results_annot.html', name=name, annot=annot, res=res, books=books) |
|
|
|
# return render_pdf(HTML(string=html)) |
|
|
|
|
|
|
|
|
|
|
|
@app.route('/viewpdf/<filename>') |
|
|
|
def viewtestfile1_file(filename): |
|
|
|
return redirect("/static/viewer/web/viewer.html?file=%2Fuploads%2F"+urlquote(filename)) |
|
|
@ -677,6 +690,7 @@ def search_annot(): |
|
|
|
res = get_annot_results(annot,name) |
|
|
|
return render_template('results_annot.html', name=name, annot=annot, res=res, books=books) |
|
|
|
|
|
|
|
|
|
|
|
## STACKS! |
|
|
|
|
|
|
|
@app.route('/add_to_stack/<int:id>', methods=['GET', 'POST']) |
|
|
|