GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Usage Usage
Nick Sweeting edited this page
ArchiveBox API Reference:
Related:
All three of these ways of running ArchiveBox are equivalent and interchangeable:
You can share a single archivebox data directory between Docker and non-Docker instances as well, allowing you to run the server in a container but still execute CLI commands on the host for example. For more examples see README: Usage and Docker pages.
You can set environment variables in your shell profile, a config file, or by using the # set config via the CLI archivebox config --set TIMEOUT=120 # OR edit ArchiveBox.conf and add this under its existing [ARCHIVING_CONFIG] section: TIMEOUT=120 # OR use environment variables env TIMEOUT=120 archivebox add 'https://example.com' See Configuration page for core ArchiveBox config options and the abx-plugins config reference for per-plugin options (e.g. Tip You can run ArchiveBox commands from anywhere (without having to archivebox add 'https://example.com' # OR echo 'https://example.com' | archivebox add You can also add cat urls_to_archive.txt | archivebox add # OR archivebox add < urls_to_archive.txt # OR curl 'https://example.com/some/rss/feed.xml' | archivebox add # OR archivebox add --depth=1 'https://example.com/some/rss/feed.xml' You can also pipe in RSS, XML, Netscape, or any of the other supported import formats via stdin. archivebox add < ~/Downloads/browser_bookmarks_export.html # OR archivebox add < ~/Downloads/pinboard_bookmarks.json # OR archivebox add < ~/Downloads/any_text_containing_urls.txt Look in the bash ./bin/export_browser_history.sh --chrome archivebox add < chrome_history.json # or bash ./bin/export_browser_history.sh --firefox archivebox add < firefox_history.json # or bash ./bin/export_browser_history.sh --safari archivebox add < safari_history.json To archive logged-in sites, you can import cookies from your browser into a persona. This generates a archivebox persona create --import=chrome personal # supported: chrome/chromium/brave/edge (Chromium-based only) # use --profile to target a specific profile (e.g. Default, Profile 1) # re-running import merges/dedupes cookies.txt (by domain/path/name) but replaces chrome_user_data If cookie extraction fails, you can still export a Netscape-format # configure which areas you want to require login to use vs make publicly available archivebox config --set PUBLIC_INDEX=False archivebox config --set PUBLIC_ADD_VIEW=False archivebox config --set PERMISSIONS=private # default visibility of newly created snapshots (was: PUBLIC_SNAPSHOTS=False) archivebox server 0.0.0.0:5797 # start the archivebox web server Open http://admin.archivebox.localhost:5797/admin/ in a browser to create the first admin and finish web setup. To create additional accounts from the CLI, use See the Configuration Wiki and Security Wiki for more info... Or if you prefer to generate a static HTML index instead of using the built-in web server, you can run You can sort by column, search using the box in the upper right, and see the total number of links at the bottom. Click the Favicon under the "Files" column to go to the details page for each link. A logged-in admin user may select ☑️ one or more snapshots from the list and perform Snapshot actions:
Set up the official ArchiveBox Browser Extension to submit URLs directly from your browser to ArchiveBox.
![]()
The Simply back up the entire - data/ - index.sqlite3 # Main index of all archived URLs - ArchiveBox.conf # Main config file in ini format - archive/ - 155243135 -> users/admin/snapshots/20210406/example.com/SNAPSHOT_UUID/ - users/ - admin/ - snapshots/ - 20210406/ - example.com/ - SNAPSHOT_UUID/ - index.jsonl - index.html # Archive method outputs: - wget/warc/ - ytdlp/media/ - git/ ... - sources/ # Each imported URL list is saved as a copy here - getpocket.com-1552432264.txt - stdin-1552291774.txt ... For more info about ArchiveBox's database/filesystem layout and troubleshooting steps:
I've found it takes about an hour to download 1000 articles, and they'll take up roughly 1GB. Storage requirements go up immensely if you're using ArchiveBox's unified crawl runner handles bounded concurrency without starting competing writers: env CRAWL_MAX_CONCURRENT_SNAPSHOTS=4 archivebox add < urls_to_archive.txtHigher concurrency is not always faster on slow disks or network filesystems, so increase it gradually. Users have reported running it with 50k+ bookmarks with success (though it will take more RAM while running). If you already imported a huge list of bookmarks and want to import only new
bookmarks, you can use the For more info about troubleshooting filesystem permissions, performance, or issues when running on a NAS:
Explore the SQLite3 DB a bit to see what's available using the SQLite3 shell: cd ~/archivebox/data sqlite3 index.sqlite3 # example usage: SELECT * FROM core_snapshot; UPDATE auth_user SET email = '[email protected]' WHERE username = 'someUsernameHere'; ... More info:
Explore the Python API a bit to see what's available using the archivebox shell: Python API Documentation: https://docs.archivebox.io/dev/apidocs/index.html $ archivebox shell [i] ArchiveBox shell >>> from archivebox.core.models import Snapshot >>> from archivebox.cli.archivebox_add import add # count completed snapshots >>> print(Snapshot.objects.filter(status=Snapshot.StatusChoices.SEALED).count()) 24 # inspect or add URLs through current APIs >>> Snapshot.objects.filter(url="https://example.com").first() <Snapshot: https://example.com> >>> crawl, snapshots = add(urls=["https://example.com/new"], index_only=True) # show raw SQL queries run >>> from django.db import connection >>> print(connection.queries) For more info and example usage:
You can interact with ArchiveBox as a Python library from external scripts or programs. This API is a local API, designed to be used on the same machine as the ArchiveBox collection. For example, you could create a script import os from pathlib import Path DATA_DIR = Path("~/archivebox/data").expanduser() os.chdir(DATA_DIR) # you must import and setup django first to establish a DB connection from archivebox.config.django import setup_django setup_django(check_db=True) # then import the specific API you need from archivebox.cli.archivebox_add import add crawl, snapshots = add(urls=["https://example.com"], index_only=True) print(crawl.id, list(snapshots.values_list("id", flat=True))) For more information see:
Clone this wiki locally |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |