Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bielefeld-CeBiTec
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
Model registry
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
2024 Competition
Bielefeld-CeBiTec
Commits
f30755ea
Commit
f30755ea
authored
5 months ago
by
Liliana Sanfilippo
Browse files
Options
Downloads
Patches
Plain Diff
cit
parent
3e9704e5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#457204
failed
5 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/cit.py
+6
-3
6 additions, 3 deletions
code/cit.py
with
6 additions
and
3 deletions
code/cit.py
+
6
−
3
View file @
f30755ea
...
...
@@ -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
\"
>
"
+
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
"
+
"
, <span property=
\"
schema:pageBegin
\"
>
"
+
begin
+
"
</span>-<span property=
\"
schema:pageEnd
\"
>
"
+
end
+
"
</span>
"
+
"
\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
"
)
...
...
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