aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-02-08 17:36:37 +0000
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-02-08 17:36:37 +0000
commit59088c0a3a1b301dd57f4555d9dfbdc96bcc9515 (patch)
tree38467805d7e291a6ea9c1828b02bdeb2be71e108
parentUpdate for older arXiv urls (diff)
downloadpaper2remarkable-59088c0a3a1b301dd57f4555d9dfbdc96bcc9515.tar.gz
paper2remarkable-59088c0a3a1b301dd57f4555d9dfbdc96bcc9515.zip
Formatting
-rwxr-xr-xarxiv2remarkable.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/arxiv2remarkable.py b/arxiv2remarkable.py
index bd62776..7a2f144 100755
--- a/arxiv2remarkable.py
+++ b/arxiv2remarkable.py
@@ -193,7 +193,8 @@ def get_paper_info(url):
page = get_page_with_retry(url)
soup = bs4.BeautifulSoup(page, "html.parser")
authors = [
- x["content"] for x in soup.find_all("meta", {"name": "citation_author"})
+ x["content"]
+ for x in soup.find_all("meta", {"name": "citation_author"})
]
title = soup.find_all("meta", {"name": "citation_title"})[0]["content"]
date = soup.find_all("meta", {"name": "citation_date"})[0]["content"]
@@ -215,7 +216,8 @@ def generate_filename(info):
def upload_to_rm(filepath, remarkable_dir="/", rmapi_path="rmapi"):
logger.info("Starting upload to reMarkable")
status = subprocess.call(
- [rmapi_path, "put", filepath, remarkable_dir], stdout=subprocess.DEVNULL
+ [rmapi_path, "put", filepath, remarkable_dir],
+ stdout=subprocess.DEVNULL,
)
if not status == 0:
exception("Uploading file %s to remarkable failed" % filepath)