Skip to content
Snippets Groups Projects
Commit f30755ea authored by Liliana Sanfilippo's avatar Liliana Sanfilippo
Browse files

cit

parent 3e9704e5
No related branches found
No related tags found
No related merge requests found
Pipeline #457204 failed
......@@ -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")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment