Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
|
@@ -76,6 +76,8 @@ def save_papers_to_folder(papers_json: str, folder: str = "downloads") -> str:
|
|
| 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")
|
|
|
|
| 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("Current working directory:", os.getcwd())
|
| 80 |
+
print("Absolute path to downloads:", os.path.abspath("downloads"))
|
| 81 |
print(filename)
|
| 82 |
with open(filename, 'w') as f:
|
| 83 |
f.write(f"Title: {paper['title']}\n")
|