fix archive path appending bug
This commit is contained in:
parent
0099849df9
commit
9ea61bf364
2 changed files with 5 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
from functools import wraps
|
||||
from datetime import datetime
|
||||
|
@ -46,7 +47,7 @@ def archive_links(archive_path, links, source=None, resume=None):
|
|||
idx, link = 0, to_archive.peek(0)
|
||||
try:
|
||||
for idx, link in enumerate(to_archive):
|
||||
link_dir = os.path.join(archive_path, link['timestamp'])
|
||||
link_dir = os.path.join(archive_path, 'archive', link['timestamp'])
|
||||
archive_link(link_dir, link)
|
||||
|
||||
except (KeyboardInterrupt, SystemExit, Exception) as e:
|
||||
|
@ -58,7 +59,8 @@ def archive_links(archive_path, links, source=None, resume=None):
|
|||
total=len(list(to_archive)),
|
||||
))
|
||||
print(' Continue where you left off by running:')
|
||||
print(' ./archive.py {} {}'.format(
|
||||
print(' {} {} {}'.format(
|
||||
sys.argv[0],
|
||||
source,
|
||||
link['timestamp'],
|
||||
))
|
||||
|
|
|
@ -33,11 +33,11 @@ TIMEOUT = int(os.getenv('TIMEOUT', '60'))
|
|||
LINK_INDEX_TEMPLATE = os.getenv('LINK_INDEX_TEMPLATE', 'templates/link_index_fancy.html')
|
||||
INDEX_TEMPLATE = os.getenv('INDEX_TEMPLATE', 'templates/index.html')
|
||||
INDEX_ROW_TEMPLATE = os.getenv('INDEX_ROW_TEMPLATE', 'templates/index_row.html')
|
||||
TEMPLATE_STATICFILES = os.getenv('TEMPLATE_STATICFILES', 'templates/static')
|
||||
|
||||
### Output Paths
|
||||
ROOT_FOLDER = os.path.dirname(os.path.abspath(__file__))
|
||||
HTML_FOLDER = os.path.join(ARCHIVE_DIR, 'html')
|
||||
ARCHIVE_FOLDER = os.path.join(HTML_FOLDER, 'archive')
|
||||
os.chdir(ROOT_FOLDER)
|
||||
|
||||
# ******************************************************************************
|
||||
|
|
Loading…
Add table
Reference in a new issue