mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
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 os
|
||||||
|
import sys
|
||||||
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
from datetime import datetime
|
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)
|
idx, link = 0, to_archive.peek(0)
|
||||||
try:
|
try:
|
||||||
for idx, link in enumerate(to_archive):
|
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)
|
archive_link(link_dir, link)
|
||||||
|
|
||||||
except (KeyboardInterrupt, SystemExit, Exception) as e:
|
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)),
|
total=len(list(to_archive)),
|
||||||
))
|
))
|
||||||
print(' Continue where you left off by running:')
|
print(' Continue where you left off by running:')
|
||||||
print(' ./archive.py {} {}'.format(
|
print(' {} {} {}'.format(
|
||||||
|
sys.argv[0],
|
||||||
source,
|
source,
|
||||||
link['timestamp'],
|
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')
|
LINK_INDEX_TEMPLATE = os.getenv('LINK_INDEX_TEMPLATE', 'templates/link_index_fancy.html')
|
||||||
INDEX_TEMPLATE = os.getenv('INDEX_TEMPLATE', 'templates/index.html')
|
INDEX_TEMPLATE = os.getenv('INDEX_TEMPLATE', 'templates/index.html')
|
||||||
INDEX_ROW_TEMPLATE = os.getenv('INDEX_ROW_TEMPLATE', 'templates/index_row.html')
|
INDEX_ROW_TEMPLATE = os.getenv('INDEX_ROW_TEMPLATE', 'templates/index_row.html')
|
||||||
|
TEMPLATE_STATICFILES = os.getenv('TEMPLATE_STATICFILES', 'templates/static')
|
||||||
|
|
||||||
### Output Paths
|
### Output Paths
|
||||||
ROOT_FOLDER = os.path.dirname(os.path.abspath(__file__))
|
ROOT_FOLDER = os.path.dirname(os.path.abspath(__file__))
|
||||||
HTML_FOLDER = os.path.join(ARCHIVE_DIR, 'html')
|
HTML_FOLDER = os.path.join(ARCHIVE_DIR, 'html')
|
||||||
ARCHIVE_FOLDER = os.path.join(HTML_FOLDER, 'archive')
|
|
||||||
os.chdir(ROOT_FOLDER)
|
os.chdir(ROOT_FOLDER)
|
||||||
|
|
||||||
# ******************************************************************************
|
# ******************************************************************************
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue