Exclude work-related books

This commit is contained in:
mez 2025-04-27 16:25:10 +01:00
parent f98fd67f5a
commit 795e72b1db

View file

@ -111,6 +111,7 @@ for file in concernedfiles:
for action in node.children: for action in node.children:
if action.heading == "read": if action.heading == "read":
for book in action.children: for book in action.children:
if "work" not in book.tags:
bookid = re.sub(" and rated .*","",book.heading) bookid = re.sub(" and rated .*","",book.heading)
if bookid not in bookids: if bookid not in bookids:
status = "new" status = "new"
@ -128,6 +129,7 @@ for file in concernedfiles:
origbook["readdates"].extend(twodict["readdates"]) origbook["readdates"].extend(twodict["readdates"])
if action.heading == "progress": if action.heading == "progress":
for book in action.children: for book in action.children:
if "work" not in book.tags:
bookid = book.heading bookid = book.heading
if bookid not in bookids: if bookid not in bookids:
status = "new" status = "new"
@ -145,6 +147,7 @@ for file in concernedfiles:
origbook["progressdates"].extend(twodict["progressdates"]) origbook["progressdates"].extend(twodict["progressdates"])
if action.heading == "obtained": if action.heading == "obtained":
for book in action.children: for book in action.children:
if "work" not in book.tags:
bookid = re.sub(" \(.*\)","",book.heading) bookid = re.sub(" \(.*\)","",book.heading)
if bookid not in bookids: if bookid not in bookids:
status = "new" status = "new"