From 65a5840686875e0d2211ca2c51d56dfa07dac0f6 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Tue, 15 Aug 2023 17:39:33 -0700 Subject: [PATCH] Updated Usage (markdown) --- Usage.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Usage.md b/Usage.md index abbdfdc..086a438 100644 --- a/Usage.md +++ b/Usage.md @@ -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(...)