From b98d95d1b038fdf4d21b84ab66eaec6d122569f6 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 19 Aug 2019 18:28:34 +0100 Subject: Ensure filename is ascii using unidecode --- arxiv2remarkable.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arxiv2remarkable.py') diff --git a/arxiv2remarkable.py b/arxiv2remarkable.py index 01ab273..83a89bb 100755 --- a/arxiv2remarkable.py +++ b/arxiv2remarkable.py @@ -28,6 +28,7 @@ import sys import tempfile import time import titlecase +import unidecode import urllib.parse GITHUB_URL = "https://github.com/GjjvdBurg/arxiv2remarkable" @@ -158,6 +159,7 @@ class Provider(metaclass=abc.ABCMeta): title_part = titlecase.titlecase(title).replace(" ", "_") year_part = info["date"].split("/")[0] name = author_part + "_-_" + title_part + "_" + year_part + ".pdf" + name = unidecode.unidecode(name) self.log("Created filename: %s" % name) return name -- cgit v1.2.3