feat: threading of fields
This commit is contained in:
parent
a63cfb7f0c
commit
84abbdeb2c
16
app.py
16
app.py
@ -78,11 +78,23 @@ def upload():
|
||||
os.path.join(CWD, "metadatum", metadata_name)
|
||||
)
|
||||
|
||||
fields = ["title", "author", "comments", "timestamp", "tags"]
|
||||
side_a = [
|
||||
field
|
||||
for field in upload_form.data.keys()
|
||||
if field in fields and upload_form.data[field] == "side a"
|
||||
]
|
||||
side_b = [
|
||||
field
|
||||
for field in upload_form.data.keys()
|
||||
if field in fields and upload_form.data[field] == "side b"
|
||||
]
|
||||
|
||||
make_cards(
|
||||
pdf_path,
|
||||
metadata_conn,
|
||||
["title", "timestamp", "comments", "authors"],
|
||||
["tags"],
|
||||
side_a,
|
||||
side_b,
|
||||
)
|
||||
|
||||
gen_msg = (
|
||||
|
Loading…
Reference in New Issue
Block a user