mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
Add custom archive directory as configuration option.
This commit is contained in:
parent
0a75dee583
commit
17d07239f0
4 changed files with 11 additions and 7 deletions
|
@ -13,6 +13,7 @@ from index import dump_index
|
|||
from fetch import dump_website
|
||||
from config import (
|
||||
ARCHIVE_PERMISSIONS,
|
||||
ARCHIVE_DIR,
|
||||
ANSI,
|
||||
check_dependencies,
|
||||
)
|
||||
|
@ -46,11 +47,11 @@ def create_archive(export_file, service=None, resume=None):
|
|||
print('[X] No links found in {}, is it a {} export file?'.format(export_file, service))
|
||||
raise SystemExit(1)
|
||||
|
||||
if not os.path.exists(service):
|
||||
os.makedirs(service)
|
||||
if not os.path.exists(os.path.join(ARCHIVE_DIR, service)):
|
||||
os.makedirs(os.path.join(ARCHIVE_DIR, service))
|
||||
|
||||
if not os.path.exists(os.path.join(service, 'archive')):
|
||||
os.makedirs(os.path.join(service, 'archive'))
|
||||
if not os.path.exists(os.path.join(ARCHIVE_DIR, service, 'archive')):
|
||||
os.makedirs(os.path.join(ARCHIVE_DIR, service, 'archive'))
|
||||
|
||||
dump_index(links, service)
|
||||
check_dependencies()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue