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

code

parent be655d42
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ def main():
file_content = file.read()
print("Parsing file...")
try:
library = bibtexparser.parse_string(file_content)
library = bibtexparser.loads(file_content)
#opening output file
try:
with open('output.txt', 'w') as out:
......@@ -39,16 +39,19 @@ def main():
dictio = {}
en_x = library.entries[x]
print("Filling dictionary for entry "+ str(x+1) + "")
for y in en_x.fields:
key = y.key
# Direkt auf die Einträge zugreifen, da es sich um ein Dictionary handelt
for key, value in en_x.items():
key_low = key.lower()
dictio[key_low] = y.value
dictio[key_low] = value
if en_x.entry_type == "article":
# Überprüfung auf den Typ des Eintrags über 'ENTRYTYPE'
if en_x['ENTRYTYPE'] == "article":
articleHTML(dictio, x, out)
elif en_x.entry_type =="misc":
elif en_x['ENTRYTYPE'] == "misc":
miscHTML(dictio, x, out)
except Exception as e:
print(f"An unexpected error occurred: {e}")
except Exception as e:
......
{/*<!-- Citation num 1--> */}
<li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-1">
<span property="schema:author" typeof="schema:Person">
<span property="schema:Name"> Roth, F.</span>;
<span property="schema:Name"> Draguhn, A.</span>
</span>
<span property="schema:name">&nbsp;Die Entwicklung der Patch-Clamp-Technik. </span>
<i property="schema:publisher" typeof="schema:Organization"> Springer eBooks</i>
<b property="issueNumber" typeof="PublicationIssue"> </b>,&nbsp;
<span property="schema:pageBegin"> 1</span>-<span property="schema:pageEnd">14</span>
(<time property="schema:datePublished" datatype="xsd:gYear" dateTime=" 2023">2023</time>).
<a className="doi" href="https://doi.org/10.1007/978-3-662-66053-9_1"> doi: 10.1007/978-3-662-66053-9_1</a>
</li>
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