1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-18 04:11:57 +02:00

Updated Usage (markdown)

Nick Sweeting
2023-08-15 17:39:33 -07:00
parent 3c2d77928f
commit 65a5840686

@@ -332,11 +332,12 @@ import os
DATA_DIR = '~/archivebox/data'
os.chdir(DATA_DIR)
# you must import and setup django first to establish a DB connection
from archivebox.config import setup_django
setup_django()
from archivebox.main import check_data_folder, setup_django, add, remove, server
check_data_folder(DATA_DIR)
setup_django(DATA_DIR)
# then you can import all the main functions
from archivebox.main import add, remove, server
add('https://example.com', index_only=True, out_dir=DATA_DIR)
remove(...)