Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -90,6 +90,7 @@ def create_bibtex_entry(data):
|
|
90 |
|
91 |
if match_year:
|
92 |
data['year'] = match.group(1)
|
|
|
93 |
else:
|
94 |
data.pop('year', '')
|
95 |
|
@@ -101,7 +102,6 @@ def create_bibtex_entry(data):
|
|
101 |
else:
|
102 |
data.pop('pages', '')
|
103 |
|
104 |
-
year = data['year']
|
105 |
author_words = data.get('author', '').split()
|
106 |
first_author = author_words[0] if author_words else 'unknown'
|
107 |
bibtex_id = f"{first_author}{year}" if year else first_author
|
|
|
90 |
|
91 |
if match_year:
|
92 |
data['year'] = match.group(1)
|
93 |
+
year = data['year']
|
94 |
else:
|
95 |
data.pop('year', '')
|
96 |
|
|
|
102 |
else:
|
103 |
data.pop('pages', '')
|
104 |
|
|
|
105 |
author_words = data.get('author', '').split()
|
106 |
first_author = author_words[0] if author_words else 'unknown'
|
107 |
bibtex_id = f"{first_author}{year}" if year else first_author
|