diff --git a/code/cit.py b/code/cit.py index 14dd8cb9c1c00cd06932b021d51d2d3e7c92fca2..fbc60bf271cf99d3db35d279b982edc38fe2a92d 100644 --- a/code/cit.py +++ b/code/cit.py @@ -103,50 +103,56 @@ def makeauthors(authors, out): # Maximale Anzahl der anzuzeigenden Autoren max_authors = 6 + + out.write("\t<span property=\"schema:author\" typeof=\"schema:Person\">\n") # Tag für Autoren öffnen + for i, a in enumerate(autlist): try: - first = None - last = None - name = None - a = a.strip() # Whitespace entfernen if ',' in a: s = a.split(", ") if len(s) > 1: - first_names = s[1].split() # Teilt den Vornamen in einzelne Namen auf + first_names = s[1].strip() # Vornamen # Nur die Initialen verwenden - initials = '. '.join([n[0] for n in first_names]) + '.' if first_names else '' - last = s[0] + initials = '. '.join([n[0] for n in first_names.split()]) + '.' if first_names else '' + last = s[0].strip() # Nachname name = last + ", " + initials else: - last = s[0].strip() # Entferne Whitespace + last = s[0].strip() # Nachname name = last + ", " else: s = a.split() if len(s) == 2: - first = s[0].strip() # Entferne Whitespace - first_sh = first[0] - last = s[1].strip() # Entferne Whitespace + first = s[0].strip() # Vornamen + first_sh = first[0] # Initiale des ersten Vornamens + last = s[1].strip() # Nachname name = last + ", " + first_sh + "." else: # Falls es mehrere Vornamen gibt, sie in Initialen umwandeln leng = len(s) - last = s[leng-1].strip() # Entferne Whitespace + last = s[leng - 1].strip() # Nachname first = '. '.join([n[0] for n in s[:-1]]) + '.' # Nur Initialen der Vornamen name = last + ", " + first # Schreibe den Namen in die Ausgabedatei if i < max_authors: - out.write("\t" + "\t" + "<span property=\"schema:Name\"> " + name + "</span>" + "\n") + out.write("\t\t<span property=\"schema:Name\"> " + name + "</span>\n") # Wenn wir mehr als 6 Autoren haben, schreibe "et al." nach dem 6. Autor if i == max_authors: - out.write("\t" + "\t" + "<span property=\"schema:Name\"> et al.</span>" + "\n") + out.write("\t\t<span property=\"schema:Name\"> et al.</span>\n") break # Stoppe die Schleife, nachdem "et al." hinzugefügt wurde - + except Exception as e: print(f"An unexpected error occurred: {e} see " + a) + out.write("\t</span>\n") # Tag für Autoren schließen + +# Beispiel der Verwendung +author = "Cloarec-Ung, Fanny-Mei and Beaulieu, Jamie and Suthananthan, Arunan and Lehnertz, Bernhard and Sauvageau, Guy and Sheppard, Hilary M. and Knapp, David J. H. F." +with open('output.txt', 'w') as out_file: + makeauthors(author, out_file) + diff --git a/code/output.txt b/code/output.txt index a25525dbe50db45ddf019d64ffc81e571b2d0bcb..52c6ae03b371940dd2a5c0378163b80d002ff989 100644 --- a/code/output.txt +++ b/code/output.txt @@ -1,5 +1,6 @@ {/*<!-- 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:author" typeof="schema:Person"> <span property="schema:Name"> Cloarec-Ung, F.</span> <span property="schema:Name"> Beaulieu, J.</span> @@ -8,6 +9,7 @@ <span property="schema:Name"> Sheppard, H. M.</span> <span property="schema:Name"> Knapp, David J. H. F., </span> + </span> </span> <span property="schema:name"> Near-perfect precise on-target editing of human hematopoietic stem and @@ -21,6 +23,7 @@ progenitor cells {/*<!-- Citation num 2--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-2"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Nelson, J. W.</span> <span property="schema:Name"> Randolph, P. B.</span> @@ -31,6 +34,7 @@ Kelcee A., </span> <span property="schema:Name"> Anzalone, A. V.</span> <span property="schema:Name"> et al.</span> </span> + </span> <span property="schema:name"> Engineered pegRNAs improve prime editing efficiency</span>. <i property="schema:publisher" typeof="schema:Organization"> Nature Biotechnology</i> <b property="issueNumber" typeof="PublicationIssue"> 40</b>, @@ -41,6 +45,7 @@ Kelcee A., </span> {/*<!-- Citation num 3--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-3"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Doench, J. G.</span> <span property="schema:Name"> Fusi, N.</span> @@ -50,6 +55,7 @@ Kelcee A., </span> <span property="schema:Name"> Smith, I.</span> <span property="schema:Name"> et al.</span> </span> + </span> <span property="schema:name"> Optimized sgRNA design to maximize activity and minimize off-target effects of CRISPR-Cas9 @@ -63,12 +69,14 @@ of CRISPR-Cas9 {/*<!-- Citation num 4--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-4"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> White, N.</span> <span property="schema:Name"> Sadeeshkumar, H.</span> <span property="schema:Name"> Sun, A.</span> <span property="schema:Name"> Sudarsan, N. a. B.</span> </span> + </span> <span property="schema:name"> Na+ riboswitches regulate genes for diverse physiological processes in bacteria @@ -82,10 +90,12 @@ bacteria {/*<!-- Citation num 5--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-5"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Iwawaki, T.</span> <span property="schema:Name"> Akai, R.</span> </span> + </span> <span property="schema:name"> Analysis of the XBP1 splicing mechanism using endoplasmic reticulum stress-indicators @@ -99,6 +109,7 @@ stress-indicators {/*<!-- Citation num 6--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-6"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Zhang, Y.</span> <span property="schema:Name"> Lin, S.</span> @@ -108,6 +119,7 @@ stress-indicators <span property="schema:Name"> Wang, Z.</span> <span property="schema:Name"> et al.</span> </span> + </span> <span property="schema:name"> XBP1 splicing contributes to endoplasmic reticulum stress-induced human islet amyloid polypeptide up-regulation @@ -121,6 +133,7 @@ amyloid polypeptide up-regulation {/*<!-- Citation num 7--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-7"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Wei, T.</span> <span property="schema:Name"> Sun, Y.</span> @@ -131,6 +144,7 @@ Zachary, </span> <span property="schema:Name"> Johnson, L. T.</span> <span property="schema:Name"> et al.</span> </span> + </span> <span property="schema:name"> Lung SORT LNPs enable precise homology-directed repair mediated CRISPR/Cas genome correction in cystic fibrosis models @@ -144,6 +158,7 @@ CRISPR/Cas genome correction in cystic fibrosis models {/*<!-- Citation num 8--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-8"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Ibrahim, M.</span> <span property="schema:Name"> Ramadan, E.</span> @@ -153,6 +168,7 @@ CRISPR/Cas genome correction in cystic fibrosis models <span property="schema:Name"> Ishima, Y.</span> <span property="schema:Name"> et al.</span> </span> + </span> <span property="schema:name"> Polyethylene glycol (PEG): The nature, immunogenicity, and role in the hypersensitivity of PEGylated products @@ -166,6 +182,7 @@ hypersensitivity of PEGylated products {/*<!-- Citation num 9--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-9"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Jiang, A. Y.</span> <span property="schema:Name"> Witten, J.</span> @@ -175,6 +192,7 @@ hypersensitivity of PEGylated products <span property="schema:Name"> Oladimeji, F. A.</span> <span property="schema:Name"> et al.</span> </span> + </span> <span property="schema:name"> Combinatorial development of nebulized mRNA delivery formulations for the lungs @@ -188,6 +206,7 @@ lungs {/*<!-- Citation num 10--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-10"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Vilà -González, M.</span> <span property="schema:Name"> Pinte, L.</span> @@ -198,6 +217,7 @@ Erika, </span> <span property="schema:Name"> Rodrat, M.</span> <span property="schema:Name"> et al.</span> </span> + </span> <span property="schema:name"> In vitro platform to model the function of ionocytes in the human airway epithelium @@ -212,8 +232,10 @@ epithelium {/*<!-- Citation num 11--> */} <li typeof="schema:Book" role="doc-biblioentry" property="schema:citation" id="desc-11"> <span property="schema:author" typeof="schema:Organisation"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Paris, K.</span> </span> + </span> <span property="schema:name"> Genome Editing and Biological Weapons: Assessing the Risk of Misuse.</span> <i property="schema:publisher" typeof="schema:Organization"> Springer Nature Switzerland AG</i> (<time property="schema:datePublished" datatype="xsd:gYear" dateTime="2023">2023</time>). @@ -221,9 +243,11 @@ epithelium {/*<!-- Citation num 12--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-12"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Wickiser, J. K.</span> </span> + </span> <span property="schema:name"> The democratization of biology: how CRISPR and synthetic biology usher in new biosecurity threats @@ -236,10 +260,12 @@ biosecurity threats {/*<!-- Citation num 13--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-13"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Cohen, J.</span> <span property="schema:Name"> Desai, T.</span> </span> + </span> <span property="schema:name"> Security implications of CRISPR-enabled genome editing: New weapons of mass disruption? @@ -253,10 +279,12 @@ disruption? {/*<!-- Citation num 14--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-14"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Doudna, J. A.</span> <span property="schema:Name"> Charpentier, E.</span> </span> + </span> <span property="schema:name"> The rise of synthetic biology: New biosecurity risks and regulatory challenges @@ -270,10 +298,12 @@ challenges {/*<!-- Citation num 15--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-15"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Shwartz, M.</span> <span property="schema:Name"> Conklin, B.</span> </span> + </span> <span property="schema:name"> Public perception of CRISPR and genome editing: Misconceptions and media portrayal @@ -287,8 +317,10 @@ portrayal {/*<!-- Citation num 16--> */} <li typeof="schema:Book" role="doc-biblioentry" property="schema:citation" id="desc-16"> <span property="schema:author" typeof="schema:Organisation"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Chadwick, R. F.</span> </span> + </span> <span property="schema:name"> Encyclopedia of applied ethics.</span> <i property="schema:publisher" typeof="schema:Organization"> Academic Press</i> (<time property="schema:datePublished" datatype="xsd:gYear" dateTime="2012">2012</time>). @@ -296,10 +328,12 @@ portrayal {/*<!-- Citation num 17--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-17"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Rubeis, G.</span> <span property="schema:Name"> Steger, F.</span> </span> + </span> <span property="schema:name"> Risks and benefits of human germline genome editing: An ethical analysis</span>. <i property="schema:publisher" typeof="schema:Organization"> Asian Bioethics Review</i> <b property="issueNumber" typeof="PublicationIssue"> 10</b>, @@ -310,9 +344,11 @@ portrayal {/*<!-- Citation num 18--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-18"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Ansah, E. O.</span> </span> + </span> <span property="schema:name"> Ethical Challenges and Controversies in the Practice and Advancement of Gene Therapy @@ -327,8 +363,10 @@ Therapy {/*<!-- Citation num 19--> */} <li typeof="schema:Book" role="doc-biblioentry" property="schema:citation" id="desc-19"> <span property="schema:author" typeof="schema:Organisation"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Pugh, J.</span> </span> + </span> <span property="schema:name"> Autonomy, Rationality, and Contemporary Bioethics.</span> <i property="schema:publisher" typeof="schema:Organization"> Oxford University PressOxford</i> (<time property="schema:datePublished" datatype="xsd:gYear" dateTime="2020">2020</time>). @@ -337,9 +375,11 @@ Therapy {/*<!-- Citation num 20--> */} <li typeof="schema:Book" role="doc-biblioentry" property="schema:citation" id="desc-20"> <span property="schema:author" typeof="schema:Organisation"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Gstraunthaler, G.</span> <span property="schema:Name"> Lindl, T.</span> </span> + </span> <span property="schema:name"> Allgemeine Aspekte der Primärkultur.</span> <i property="schema:publisher" typeof="schema:Organization"> Springer</i> (<time property="schema:datePublished" datatype="xsd:gYear" dateTime="2013">2013</time>). @@ -348,8 +388,10 @@ Therapy {/*<!-- Citation num 21--> */} <li typeof="schema:Book" role="doc-biblioentry" property="schema:citation" id="desc-21"> <span property="schema:author" typeof="schema:Organisation"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Thiele, F.</span> </span> + </span> <span property="schema:name"> International Encyclopedia of the Social & Behavioral Sciences.</span> <i property="schema:publisher" typeof="schema:Organization"> Elsevier</i> (<time property="schema:datePublished" datatype="xsd:gYear" dateTime="2001">2001</time>). @@ -358,8 +400,10 @@ Therapy {/*<!-- Citation num 22--> */} <li typeof="schema:Book" role="doc-biblioentry" property="schema:citation" id="desc-22"> <span property="schema:author" typeof="schema:Organisation"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Gethmann, C.</span> </span> + </span> <span property="schema:name"> Research: Ethical Aspects of Long-term Responsibilities.</span> <i property="schema:publisher" typeof="schema:Organization"> Elsevier</i> (<time property="schema:datePublished" datatype="xsd:gYear" dateTime="2001">2001</time>). @@ -367,6 +411,7 @@ Therapy {/*<!-- Citation num 23--> */} <li typeof="schema:ScolarlyArticle" role="doc-biblioentry" property="schema:citation" id="desc-23"> + <span property="schema:author" typeof="schema:Person"> <span property="schema:author" typeof="schema:Person"> <span property="schema:Name"> Kiani, A. K.</span> <span property="schema:Name"> Pheby, D.</span> @@ -376,6 +421,7 @@ Therapy <span property="schema:Name"> Marks, R.</span> <span property="schema:Name"> et al.</span> </span> + </span> <span property="schema:name"> Ethical considerations regarding animal experimentation</span>. <i property="schema:publisher" typeof="schema:Organization"> Journal of Preventive Medicine and Hygiene</i> <b property="issueNumber" typeof="PublicationIssue"> 63</b>,