From 597a5f6997b77e511ca25ca19ebd65b554700502 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 30 Oct 2017 03:19:52 -0500 Subject: [PATCH] use absolute paths instead of relative --- config.py | 3 ++- parse.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.py b/config.py index ab94faca..0f37920f 100644 --- a/config.py +++ b/config.py @@ -34,8 +34,9 @@ INDEX_ROW_TEMPLATE = os.getenv('INDEX_ROW_TEMPLATE', 'templates/index_ro ### Output Paths ROOT_FOLDER = os.path.dirname(os.path.abspath(__file__)) -HTML_FOLDER = os.path.join(ARCHIVE_DIR, 'html') +HTML_FOLDER = os.path.join(ROOT_FOLDER, ARCHIVE_DIR, 'html') ARCHIVE_FOLDER = os.path.join(HTML_FOLDER, 'archive') +os.chdir(ROOT_FOLDER) # ****************************************************************************** # ********************** Do not edit below this point ************************** diff --git a/parse.py b/parse.py index 54eb8344..d5eda177 100644 --- a/parse.py +++ b/parse.py @@ -146,7 +146,6 @@ def parse_rss_export(rss_file): def parse_bookmarks_export(html_file): """Parse netscape-format bookmarks export files (produced by all browsers)""" - html_file.seek(0) pattern = re.compile("]*>(.+)", re.UNICODE | re.IGNORECASE) for line in html_file: