From 88365b3d9b2abe9b5706369947598d2336b9f0aa Mon Sep 17 00:00:00 2001 From: Bryan Bailey Date: Mon, 21 Mar 2022 21:47:36 -0400 Subject: [PATCH] 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']