@@ -351,6 +411,8 @@ Description:
### Setup the dev environment
+ First, install the system dependencies from the "Bare Metal" section above.
+ Then you can clone the ArchiveBox repo and install
```python3
git clone https://github.com/pirate/ArchiveBox
cd ArchiveBox
@@ -442,9 +504,7 @@ Classifier: Topic :: System :: Recovery Tools
Classifier: Topic :: Sociology :: History
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
-Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
-Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
diff --git a/archivebox.egg-info/SOURCES.txt b/archivebox.egg-info/SOURCES.txt
index 5c78bd8c..eee55cc5 100644
--- a/archivebox.egg-info/SOURCES.txt
+++ b/archivebox.egg-info/SOURCES.txt
@@ -6,6 +6,8 @@ archivebox/LICENSE
archivebox/README.md
archivebox/__init__.py
archivebox/__main__.py
+archivebox/config.py
+archivebox/config_stubs.py
archivebox/logging_util.py
archivebox/main.py
archivebox/manage.py
@@ -35,8 +37,6 @@ archivebox/cli/archivebox_status.py
archivebox/cli/archivebox_update.py
archivebox/cli/archivebox_version.py
archivebox/cli/tests.py
-archivebox/config/__init__.py
-archivebox/config/stubs.py
archivebox/core/__init__.py
archivebox/core/admin.py
archivebox/core/apps.py
@@ -46,6 +46,7 @@ archivebox/core/settings.py
archivebox/core/tests.py
archivebox/core/urls.py
archivebox/core/utils.py
+archivebox/core/utils_taggit.py
archivebox/core/views.py
archivebox/core/welcome_message.py
archivebox/core/wsgi.py
@@ -55,6 +56,7 @@ archivebox/core/migrations/0002_auto_20200625_1521.py
archivebox/core/migrations/0003_auto_20200630_1034.py
archivebox/core/migrations/0004_auto_20200713_1552.py
archivebox/core/migrations/0005_auto_20200728_0326.py
+archivebox/core/migrations/0006_auto_20201012_1520.py
archivebox/core/migrations/__init__.py
archivebox/extractors/__init__.py
archivebox/extractors/archive_org.py
@@ -86,6 +88,7 @@ archivebox/parsers/netscape_html.py
archivebox/parsers/pinboard_rss.py
archivebox/parsers/pocket_html.py
archivebox/parsers/shaarli_rss.py
+archivebox/parsers/wallabag_atom.py
archivebox/themes/admin/actions_as_select.html
archivebox/themes/admin/app_index.html
archivebox/themes/admin/base.html
diff --git a/archivebox/logging_util.py b/archivebox/logging_util.py
index fa74992e..a43d31c9 100644
--- a/archivebox/logging_util.py
+++ b/archivebox/logging_util.py
@@ -22,6 +22,7 @@ from .config import (
ANSI,
IS_TTY,
TERM_WIDTH,
+ SHOW_PROGRESS,
SOURCES_DIR_NAME,
stderr,
)
@@ -82,7 +83,6 @@ class TimedProgress:
"""Show a progress bar and measure elapsed time until .end() is called"""
def __init__(self, seconds, prefix=''):
- from .config import SHOW_PROGRESS
self.SHOW_PROGRESS = SHOW_PROGRESS
if self.SHOW_PROGRESS:
self.p = Process(target=progress_bar, args=(seconds, prefix))
@@ -461,6 +461,9 @@ def printable_folders(folders: Dict[str, Optional["Link"]],
html: bool=False,
csv: Optional[str]=None,
with_headers: bool=False) -> str:
+
+ from .index.json import MAIN_INDEX_HEADER
+
links = folders.values()
if json:
from .index.json import to_json
diff --git a/archivebox/main.py b/archivebox/main.py
index eec9adfa..44ee6b14 100644
--- a/archivebox/main.py
+++ b/archivebox/main.py
@@ -225,11 +225,14 @@ def version(quiet: bool=False,
for name, folder in EXTERNAL_LOCATIONS.items():
print(printable_folder_status(name, folder))
+ print()
if DATA_LOCATIONS['OUTPUT_DIR']['is_valid']:
- print()
print('{white}[i] Data locations:{reset}'.format(**ANSI))
for name, folder in DATA_LOCATIONS.items():
print(printable_folder_status(name, folder))
+ else:
+ print()
+ print('{white}[i] Data locations:{reset}'.format(**ANSI))
print()
check_dependencies()
diff --git a/setup.py b/setup.py
index db83e9bf..b250a491 100755
--- a/setup.py
+++ b/setup.py
@@ -1,77 +1,48 @@
-# import sys
import json
import setuptools
from pathlib import Path
-# from subprocess import check_call
-# from setuptools.command.install import install
-# from setuptools.command.develop import develop
-# from setuptools.command.egg_info import egg_info
PKG_NAME = "archivebox"
+DESCRIPTION = "The self-hosted internet archive."
+LICENSE = "MIT"
+AUTHOR = "Nick Sweeting"
+AUTHOR_EMAIL="git@nicksweeting.com"
REPO_URL = "https://github.com/pirate/ArchiveBox"
-REPO_DIR = Path(__file__).parent.resolve()
-PYTHON_DIR = REPO_DIR / PKG_NAME
-README = (PYTHON_DIR / "README.md").read_text()
-VERSION = json.loads((PYTHON_DIR / "package.json").read_text().strip())['version']
+PROJECT_URLS = {
+ "Source": f"{REPO_URL}",
+ "Documentation": f"{REPO_URL}/wiki",
+ "Bug Tracker": f"{REPO_URL}/issues",
+ "Changelog": f"{REPO_URL}/wiki/Changelog",
+ "Roadmap": f"{REPO_URL}/wiki/Roadmap",
+ "Community": f"{REPO_URL}/wiki/Web-Archiving-Community",
+ "Donate": f"{REPO_URL}/wiki/Donations",
+}
+
+ROOT_DIR = Path(__file__).parent.resolve()
+PACKAGE_DIR = ROOT_DIR / PKG_NAME
+
+README = (PACKAGE_DIR / "README.md").read_text()
+VERSION = json.loads((PACKAGE_DIR / "package.json").read_text().strip())['version']
# To see when setup.py gets called (uncomment for debugging):
-
# import sys
-# print(PYTHON_DIR, f" (v{VERSION})")
+# print(PACKAGE_DIR, f" (v{VERSION})")
# print('>', sys.executable, *sys.argv)
-# Sketchy way to install npm dependencies as a pip post-install script
-
-# def setup_js():
-# if sys.platform.lower() not in ('darwin', 'linux'):
-# sys.stderr.write('[!] Warning: ArchiveBox is not officially supported on this platform.\n')
-
-# sys.stderr.write(f'[+] Installing ArchiveBox npm package (PYTHON_DIR={PYTHON_DIR})...\n')
-# try:
-# check_call(f'npm install -g "{REPO_DIR}"', shell=True)
-# sys.stderr.write('[√] Automatically installed npm dependencies.\n')
-# except Exception as err:
-# sys.stderr.write(f'[!] Failed to auto-install npm dependencies: {err}\n')
-# sys.stderr.write(' Install NPM/npm using your system package manager, then run:\n')
-# sys.stderr.write(' npm install -g "git+https://github.com/pirate/ArchiveBox.git\n')
-
-
-# class CustomInstallCommand(install):
-# def run(self):
-# super().run()
-# setup_js()
-
-# class CustomDevelopCommand(develop):
-# def run(self):
-# super().run()
-# setup_js()
-
-# class CustomEggInfoCommand(egg_info):
-# def run(self):
-# super().run()
-# setup_js()
setuptools.setup(
name=PKG_NAME,
version=VERSION,
- license="MIT",
- author="Nick Sweeting",
- author_email="git@nicksweeting.com",
- description="The self-hosted internet archive.",
+ license=LICENSE,
+ author=AUTHOR,
+ author_email=AUTHOR_EMAIL,
+ description=DESCRIPTION,
long_description=README,
long_description_content_type="text/markdown",
url=REPO_URL,
- project_urls={
- "Source": f"{REPO_URL}",
- "Documentation": f"{REPO_URL}/wiki",
- "Bug Tracker": f"{REPO_URL}/issues",
- "Changelog": f"{REPO_URL}/wiki/Changelog",
- "Roadmap": f"{REPO_URL}/wiki/Roadmap",
- "Community": f"{REPO_URL}/wiki/Web-Archiving-Community",
- "Donate": f"{REPO_URL}/wiki/Donations",
- },
+ project_urls=PROJECT_URLS,
python_requires=">=3.7",
install_requires=[
"requests==2.24.0",
@@ -111,18 +82,13 @@ setuptools.setup(
# 'redis': ['redis', 'django-redis'],
# 'pywb': ['pywb', 'redis'],
},
- packages=['archivebox'],
+ packages=[PKG_NAME],
include_package_data=True, # see MANIFEST.in
entry_points={
"console_scripts": [
f"{PKG_NAME} = {PKG_NAME}.cli:main",
],
},
- # cmdclass={
- # 'install': CustomInstallCommand,
- # 'develop': CustomDevelopCommand,
- # 'egg_info': CustomEggInfoCommand,
- # },
classifiers=[
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
@@ -136,9 +102,7 @@ setuptools.setup(
"Topic :: Sociology :: History",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Indexing/Search",
- "Topic :: Internet :: WWW/HTTP :: WSGI",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
- "Topic :: Internet :: WWW/HTTP :: WSGI :: Server",
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",