Files
ArchiveBox/brew_dist/archivebox.rb
Claude 36b4055304 Add caveats block to Homebrew formula showing data directory
The post_install initializes var/archivebox as the data directory,
but users need to know where it is for subsequent commands. The
caveats block is shown after brew install/upgrade to guide users.

https://claude.ai/code/session_01Vx1EsNrNySgsc8Y67dGzCn
2026-03-15 04:56:25 +00:00

51 lines
1.5 KiB
Ruby

# Auto-generated by bin/build_brew.sh using homebrew-pypi-poet.
# Users install with: brew tap archivebox/archivebox && brew install archivebox
class Archivebox < Formula
include Language::Python::Virtualenv
desc "Self-hosted internet archiving solution"
homepage "https://github.com/ArchiveBox/ArchiveBox"
url "https://files.pythonhosted.org/packages/source/a/archivebox/archivebox-0.9.3.tar.gz"
sha256 "" # auto-filled by bin/build_brew.sh
license "MIT"
head "https://github.com/ArchiveBox/ArchiveBox.git", branch: "dev"
depends_on "python@3.13"
# All other runtime deps (node, chrome, yt-dlp, etc.) are installed
# on-demand by `archivebox install` and should NOT be declared here.
# Python dependency resource blocks auto-generated by homebrew-pypi-poet
# AUTOGENERATED_RESOURCES_START
# AUTOGENERATED_RESOURCES_END
def install
virtualenv_install_with_resources
end
def post_install
# Initialize ArchiveBox data in the Homebrew-managed var directory
data_dir = var/"archivebox"
data_dir.mkpath
ENV["DATA_DIR"] = data_dir.to_s
system bin/"archivebox", "init"
end
def caveats
<<~EOS
ArchiveBox data is stored in:
#{var}/archivebox
To start archiving, run:
cd #{var}/archivebox && archivebox add 'https://example.com'
To start the web UI:
cd #{var}/archivebox && archivebox server 0.0.0.0:8000
EOS
end
test do
assert_match version.to_s, shell_output("#{bin}/archivebox version")
end
end