mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
switch back to relative paths
This commit is contained in:
parent
cb0d6526d7
commit
81ab050cd2
2 changed files with 18 additions and 19 deletions
|
@ -92,6 +92,23 @@ def archive_link(out_dir, link, overwrite=False):
|
||||||
|
|
||||||
return link
|
return link
|
||||||
|
|
||||||
|
def log_link_archive(out_dir, link):
|
||||||
|
update_existing = os.path.exists(out_dir)
|
||||||
|
if not update_existing:
|
||||||
|
os.makedirs(out_dir)
|
||||||
|
|
||||||
|
print('[{symbol_color}{symbol}{reset}] [{timestamp}] "{title}": {blue}{base_url}{reset}'.format(
|
||||||
|
symbol='*' if update_existing else '+',
|
||||||
|
symbol_color=ANSI['black' if update_existing else 'green'],
|
||||||
|
**link,
|
||||||
|
**ANSI,
|
||||||
|
))
|
||||||
|
if link['type']:
|
||||||
|
print(' i Type: {}'.format(link['type']))
|
||||||
|
|
||||||
|
print(' {} ({})'.format(out_dir, 'updating' if update_existing else 'creating'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def attach_result_to_link(method):
|
def attach_result_to_link(method):
|
||||||
"""
|
"""
|
||||||
|
@ -397,21 +414,3 @@ def fetch_favicon(out_dir, link, timeout=TIMEOUT):
|
||||||
# raise
|
# raise
|
||||||
# else:
|
# else:
|
||||||
# print(' √ Skipping video download')
|
# print(' √ Skipping video download')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def log_link_archive(out_dir, link):
|
|
||||||
update_existing = os.path.exists(out_dir)
|
|
||||||
if not update_existing:
|
|
||||||
os.makedirs(out_dir)
|
|
||||||
|
|
||||||
print('[{symbol_color}{symbol}{reset}] [{timestamp}] "{title}": {blue}{base_url}{reset}'.format(
|
|
||||||
symbol='*' if update_existing else '+',
|
|
||||||
symbol_color=ANSI['black' if update_existing else 'green'],
|
|
||||||
**link,
|
|
||||||
**ANSI,
|
|
||||||
))
|
|
||||||
if link['type']:
|
|
||||||
print(' i Type: {}'.format(link['type']))
|
|
||||||
|
|
||||||
print(' {} ({})'.format(out_dir, 'exists' if update_existing else 'created'))
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ INDEX_ROW_TEMPLATE = os.getenv('INDEX_ROW_TEMPLATE', 'templates/index_ro
|
||||||
|
|
||||||
### 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(ROOT_FOLDER, ARCHIVE_DIR, 'html')
|
HTML_FOLDER = os.path.join(ARCHIVE_DIR, 'html')
|
||||||
ARCHIVE_FOLDER = os.path.join(HTML_FOLDER, 'archive')
|
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