From f30755ea8431055b433a1bf0bd6ae391a39ccb23 Mon Sep 17 00:00:00 2001
From: Liliana Sanfilippo <liliana.sanfilippo@uni-bielefeld.de>
Date: Sat, 28 Sep 2024 15:37:33 +0200
Subject: [PATCH] cit

---
 code/cit.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/code/cit.py b/code/cit.py
index 5b3f9224..0372a7a4 100644
--- a/code/cit.py
+++ b/code/cit.py
@@ -97,6 +97,7 @@ def main():
         print("DONE")
 
 def makeauthors(authors, out):
+    print("Starting on authors...")
     authors = authors.replace("\n", " ").replace(" and ", "|").strip()  # "and" durch "|" ersetzen und Whitespace entfernen
     autlist = authors.split("|")
 
@@ -143,12 +144,10 @@ def articleHTML(dictio, x, out):
     print("Writing html code for article "+ str(x) + "...")
     out.write("{/*<!-- Citation num " + str(x) + "--> */}" + "\n")
     out.write("<li typeof=\"schema:ScolarlyArticle\" role=\"doc-biblioentry\" property=\"schema:citation\" id=\"desc-" + str(x) + "\">"+ "\n")
-#    out.write("\t" + "<span property=\"schema:author\" typeof=\"schema:Person\">"+ "\n")
-    
     print("Just a sec, separating authors...")
     authors = dictio['author']
+    print("giving authors...")
     makeauthors(authors, out)
-
 #    out.write("\t" +"</span>"+ "\n")
     title = dictio['title'].replace('{', '').replace('}', '')
     out.write("\t" + "<span property=\"schema:name\">&nbsp;"+ title + "</span>. "+ "\n")
@@ -163,6 +162,7 @@ def articleHTML(dictio, x, out):
                     pag = re.split('--|-|–', pages)
                     begin = pag[0].strip()
                     end = pag[1].strip()
+                    print("- in pages")
                     out.write("\t" + ",&nbsp;<span property=\"schema:pageBegin\"> "+ begin +"</span>-<span property=\"schema:pageEnd\">"+ end + "</span>&nbsp;"+ "\n")
                 else:
                     if re.match(r'^\d+(-\d+)?$', pages):  # Check for typical numeric page ranges
@@ -192,6 +192,9 @@ def articleHTML(dictio, x, out):
     out.write("</li>" + "\n"+ "\n")
 
 
+
+
+
 def miscHTML(dictio, x, out):
     print("Writing html code for entry "+ str(x) + "...")
     out.write("{/*<!-- Citation num " + str(x) + "--> */}" + "\n")
-- 
GitLab