From 22624980d7c2b8aaba70758ebf92cfa610f1bc57 Mon Sep 17 00:00:00 2001 From: Bryan Bailey Date: Sun, 20 Mar 2022 21:49:58 -0400 Subject: [PATCH 1/2] TODO fix invalid escape sequence in issue_number property --- yoink/comic.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yoink/comic.py b/yoink/comic.py index 629b531..cce7679 100644 --- a/yoink/comic.py +++ b/yoink/comic.py @@ -70,7 +70,8 @@ class Comic(Scrapable): @property def issue_number(self) -> int: - # maches any year in parentheses + # matches any year in parentheses (xxxx) + # TODO yoink/comic.py:74: DeprecationWarning: invalid escape sequence '\(' date_reg = re.search("(\([12]\d{3}\))", self.title) try: From 88365b3d9b2abe9b5706369947598d2336b9f0aa Mon Sep 17 00:00:00 2001 From: Bryan Bailey Date: Mon, 21 Mar 2022 21:47:36 -0400 Subject: [PATCH 2/2] windows support --- yoink/common.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/yoink/common.py b/yoink/common.py index 59d13bb..2e9f506 100644 --- a/yoink/common.py +++ b/yoink/common.py @@ -1,13 +1,15 @@ -import pathlib +from pathlib import Path # TODO replace os path with pathlib import os from enum import Enum, auto +# TODO replace expan user +home_folder = Path.home() app_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) -config_path = os.path.abspath(os.path.join(os.environ.get('HOME'), '.config/yoink')) -library_path = os.path.abspath(os.path.join(os.environ.get('HOME'), 'yoink/library')) +config_path = os.path.abspath(os.path.join(os.path.expanduser('~'), '.config/yoink')) +library_path = os.path.abspath(os.path.join(os.path.expanduser('~'), 'yoink/library')) required_comic_files = ('.cbr', '.cbz', '000.jpg', '001.jpg') skippable_images = ('logo-1.png', 'logo.png', 'report.png', 'request.png', 'prev.png', 'Next.png', 'Donate.png', '11.png', 'navbar.svg') supported_sites = ['readallcomics.com', 'tpb.party', 'dragonballsupermanga.net', 'mangadex.tv']