Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
|
@@ -75,7 +75,8 @@ def save_papers_to_folder(papers_json: str, folder: str = "downloads") -> str:
|
|
| 75 |
|
| 76 |
# Improved filename sanitization
|
| 77 |
clean_title = "".join([c if c.isalnum() else "_" for c in title])[:50]
|
| 78 |
-
filename = os.path.join(folder, f"{clean_title or f'paper_{idx}'}.txt")
|
|
|
|
| 79 |
with open(filename, 'w') as f:
|
| 80 |
f.write(f"Title: {paper['title']}\n")
|
| 81 |
f.write(f"Authors: {', '.join(paper['authors'])}\n")
|
|
|
|
| 75 |
|
| 76 |
# Improved filename sanitization
|
| 77 |
clean_title = "".join([c if c.isalnum() else "_" for c in title])[:50]
|
| 78 |
+
filename = os.path.join(folder, f"{clean_title or f'paper_{idx}'}.txt")
|
| 79 |
+
print(filename)
|
| 80 |
with open(filename, 'w') as f:
|
| 81 |
f.write(f"Title: {paper['title']}\n")
|
| 82 |
f.write(f"Authors: {', '.join(paper['authors'])}\n")
|