Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bielefeld-CeBiTec-Temp-until-thaw
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Liliana Sanfilippo
Bielefeld-CeBiTec-Temp-until-thaw
Commits
1d97196a
Commit
1d97196a
authored
5 months ago
by
Liliana Sanfilippo
Browse files
Options
Downloads
Patches
Plain Diff
code
parent
be655d42
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
code/cit.py
+9
-6
9 additions, 6 deletions
code/cit.py
code/output.txt
+14
-0
14 additions, 0 deletions
code/output.txt
with
23 additions
and
6 deletions
code/cit.py
+
9
−
6
View file @
1d97196a
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
code/output.txt
0 → 100644
+
14
−
0
View file @
1d97196a
{/*<!-- 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"> Die Entwicklung der Patch-Clamp-Technik. </span>
<i property="schema:publisher" typeof="schema:Organization"> Springer eBooks</i>
<b property="issueNumber" typeof="PublicationIssue"> </b>,
<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>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment