Spaces:
Running
Running
Commit
·
64e2bcf
1
Parent(s):
a33242c
Add logging for blog posting and ensure main execution flow
Browse files
main.py
CHANGED
@@ -46,6 +46,7 @@ def paper_data(paper_data, wait_time=5):
|
|
46 |
except:
|
47 |
encoded_bytes = repr(citation).strip()
|
48 |
citation = html.unescape(encoded_bytes)
|
|
|
49 |
status = post_blog(doi, title, category, summary, mindmap, citation, access_key, wait_time)
|
50 |
except Exception as e:
|
51 |
print(f"Error posting blog '{title}': {e}")
|
@@ -76,3 +77,6 @@ def post_blogpost(uaccess_key, wait_time=5):
|
|
76 |
finally:
|
77 |
print("\n-------------------------------------------------------\nProcess Completed\n-------------------------------------------------------\n")
|
78 |
return pdata
|
|
|
|
|
|
|
|
46 |
except:
|
47 |
encoded_bytes = repr(citation).strip()
|
48 |
citation = html.unescape(encoded_bytes)
|
49 |
+
print(f"Posting blog '{title}'")
|
50 |
status = post_blog(doi, title, category, summary, mindmap, citation, access_key, wait_time)
|
51 |
except Exception as e:
|
52 |
print(f"Error posting blog '{title}': {e}")
|
|
|
77 |
finally:
|
78 |
print("\n-------------------------------------------------------\nProcess Completed\n-------------------------------------------------------\n")
|
79 |
return pdata
|
80 |
+
|
81 |
+
if __name__ == "__main__":
|
82 |
+
post_blogpost(access_key)
|