Browse Source

fix my broken shit

main
cellarspoon 3 years ago
parent
commit
916b4980b5
No known key found for this signature in database GPG Key ID: 3789458B3D0C410
  1. 6
      temp_index.py

6
temp_index.py

@ -11,7 +11,7 @@ def make_cards():
"""The main entrypoint for card generation.""" """The main entrypoint for card generation."""
# TODO: thread arguments into this logic # TODO: thread arguments into this logic
doc = create_doc("text.pdf") doc = create_doc("text.pdf")
content = get_fields(doc) content = get_fields()
doc.build(content) doc.build(content)
@ -22,11 +22,13 @@ def get_fields():
session = init_session("sqlite:///metadata.db") session = init_session("sqlite:///metadata.db")
for book in session.query(Book).all(): for book in session.query(Book).all():
for comment in session.query(Comment).all():
ptitle = Paragraph( ptitle = Paragraph(
"<font size=12>{}</font>".format(book.title), styles["Italic"] "<font size=12>{}</font>".format(book.title), styles["Italic"]
) )
ptime = Paragraph( ptime = Paragraph(
"<font size=10>Uploaded: {}</font>".format(book.timestamp), styles["Normal"] "<font size=10>Uploaded: {}</font>".format(book.timestamp),
styles["Normal"],
) )
pcomments = Paragraph("<font size=10>{}</font>".format(comment.text)) pcomments = Paragraph("<font size=10>{}</font>".format(comment.text))

Loading…
Cancel
Save