mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 14:44:29 -04:00
small easter eggs
Some checks are pending
CodeQL / Analyze (python) (push) Waiting to run
Build Debian package / build (push) Waiting to run
Build Docker image / buildx (push) Waiting to run
Build Homebrew package / build (push) Waiting to run
Build GitHub Pages website / build (push) Waiting to run
Build GitHub Pages website / deploy (push) Blocked by required conditions
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Run tests / python_tests (ubuntu-22.04, 3.11) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
Some checks are pending
CodeQL / Analyze (python) (push) Waiting to run
Build Debian package / build (push) Waiting to run
Build Docker image / buildx (push) Waiting to run
Build Homebrew package / build (push) Waiting to run
Build GitHub Pages website / build (push) Waiting to run
Build GitHub Pages website / deploy (push) Blocked by required conditions
Run linters / lint (push) Waiting to run
Build Pip package / build (push) Waiting to run
Run tests / python_tests (ubuntu-22.04, 3.11) (push) Waiting to run
Run tests / docker_tests (push) Waiting to run
This commit is contained in:
parent
95043e5a07
commit
968adf64da
5 changed files with 77 additions and 5 deletions
|
@ -1,3 +1,20 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
#
|
||||||
|
# █████╗ ██████╗ ██████╗██╗ ██╗██╗██╗ ██╗███████╗██████╗ ██████╗ ██╗ ██╗
|
||||||
|
# ██╔══██╗██╔══██╗██╔════╝██║ ██║██║██║ ██║██╔════╝██╔══██╗██╔═══██╗╚██╗██╔╝
|
||||||
|
# ███████║██████╔╝██║ ███████║██║██║ ██║█████╗ ██████╔╝██║ ██║ ╚███╔╝
|
||||||
|
# ██╔══██║██╔══██╗██║ ██╔══██║██║╚██╗ ██╔╝██╔══╝ ██╔══██╗██║ ██║ ██╔██╗
|
||||||
|
# ██║ ██║██║ ██║╚██████╗██║ ██║██║ ╚████╔╝ ███████╗██████╔╝╚██████╔╝██╔╝ ██╗
|
||||||
|
# ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚══════╝╚═════╝ ╚═════╝ ╚═╝ ╚═╝
|
||||||
|
# Welcome to the ArchiveBox source code! Thanks for checking it out!
|
||||||
|
#
|
||||||
|
# "We are swimming upstream against a great torrent of disorganization.
|
||||||
|
# In this, our main obligation is to establish arbitrary enclaves of order and system.
|
||||||
|
# It is the greatest possible victory to be, to continue to be, and to have been.
|
||||||
|
# No defeat can deprive us of the success of having existed for some moment of time
|
||||||
|
# in a universe that seems indifferent to us."
|
||||||
|
# --Norber Weiner
|
||||||
|
|
||||||
__package__ = 'archivebox'
|
__package__ = 'archivebox'
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -13,9 +30,9 @@ ARCHIVE_DIR = DATA_DIR / 'archive' # archivebox snapshot da
|
||||||
if str(PACKAGE_DIR) not in sys.path:
|
if str(PACKAGE_DIR) not in sys.path:
|
||||||
sys.path.append(str(PACKAGE_DIR))
|
sys.path.append(str(PACKAGE_DIR))
|
||||||
|
|
||||||
|
from .config.constants import CONSTANTS, VERSION # noqa
|
||||||
|
|
||||||
from .config.constants import CONSTANTS, VERSION, PACKAGE_DIR, DATA_DIR, ARCHIVE_DIR # noqa
|
os.environ['ARCHIVEBOX_PACKAGE_DIR'] = str(PACKAGE_DIR)
|
||||||
|
|
||||||
os.environ['ARCHIVEBOX_DATA_DIR'] = str(DATA_DIR)
|
os.environ['ARCHIVEBOX_DATA_DIR'] = str(DATA_DIR)
|
||||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'core.settings'
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'core.settings'
|
||||||
|
|
||||||
|
@ -23,11 +40,54 @@ os.environ['DJANGO_SETTINGS_MODULE'] = 'core.settings'
|
||||||
from .monkey_patches import * # noqa
|
from .monkey_patches import * # noqa
|
||||||
# print('DONE INSTALLING MONKEY PATCHES')
|
# print('DONE INSTALLING MONKEY PATCHES')
|
||||||
|
|
||||||
# print('LOADING VENDOR LIBRARIES')
|
# print('LOADING VENDORED LIBRARIES')
|
||||||
from .vendor import load_vendored_libs # noqa
|
from .vendor import load_vendored_libs # noqa
|
||||||
load_vendored_libs()
|
load_vendored_libs()
|
||||||
# print('DONE LOADING VENDOR LIBRARIES')
|
# print('DONE LOADING VENDORED LIBRARIES')
|
||||||
|
|
||||||
__version__ = VERSION
|
__version__ = VERSION
|
||||||
__author__ = 'Nick Sweeting'
|
__author__ = 'Nick Sweeting'
|
||||||
__license__ = 'MIT'
|
__license__ = 'MIT'
|
||||||
|
|
||||||
|
# ██████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
# ██████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
# ██████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
# ██████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
# ██████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
# ██████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
# ██████████████████████████████████████████████████████████████████████████████████████████████████
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ████████████████████████████████████ ██
|
||||||
|
# ██ ██ █████████████████████████ █ ██
|
||||||
|
# ██ ██ █████████████████████████ █ ██
|
||||||
|
# ██ ██ █████████████████████████ █ ██
|
||||||
|
# ██ ██ █████████████████████████ █ ██
|
||||||
|
# ██ ██ █████████████████████████ █ ██
|
||||||
|
# ██ ██ █████████████████████████ █ ██
|
||||||
|
# ██ ██ █████████████████████████ █ ██
|
||||||
|
# ██ ██ █████████████████████████ █ ██
|
||||||
|
# ██ ██ █████████████████████████ █ ██
|
||||||
|
# ██ ████████████████████████████████████ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██████████████████████████████████████████ ██
|
||||||
|
# ██ ██████████████████████████████████████████ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ██ ██
|
||||||
|
# ████████████████████████████████████████████████████████████████████████████████
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# _ _ _ ____
|
||||||
|
# / \ _ __ ___| |__ (_)_ _____| __ ) _____ __
|
||||||
|
# / _ \ | '__/ __| '_ \| \ \ / / _ \ _ \ / _ \ \/ /
|
||||||
|
# / ___ \| | | (__| | | | |\ V / __/ |_) | (_) > <
|
||||||
|
# /_/ \_\_| \___|_| |_|_| \_/ \___|____/ \___/_/\_\
|
||||||
|
|
||||||
|
|
||||||
__package__ = 'archivebox'
|
__package__ = 'archivebox'
|
||||||
|
|
||||||
|
import archivebox # noqa
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from .cli import main
|
from .cli import main
|
||||||
|
|
|
@ -49,8 +49,8 @@ SUBCOMMAND_MODULES = {
|
||||||
'version': 'archivebox_version' ,
|
'version': 'archivebox_version' ,
|
||||||
|
|
||||||
'init': 'archivebox_init',
|
'init': 'archivebox_init',
|
||||||
'config': 'archivebox_config',
|
|
||||||
'install': 'archivebox_install',
|
'install': 'archivebox_install',
|
||||||
|
'config': 'archivebox_config',
|
||||||
|
|
||||||
'add': 'archivebox_add',
|
'add': 'archivebox_add',
|
||||||
'remove': 'archivebox_remove',
|
'remove': 'archivebox_remove',
|
||||||
|
|
|
@ -43,15 +43,18 @@ USER_PLUGIN_DIRS = {
|
||||||
'user_plugins': DATA_DIR / 'user_plugins',
|
'user_plugins': DATA_DIR / 'user_plugins',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Discover ArchiveBox plugins
|
||||||
BUILTIN_PLUGINS = abx.get_plugins_in_dirs(BUILTIN_PLUGIN_DIRS)
|
BUILTIN_PLUGINS = abx.get_plugins_in_dirs(BUILTIN_PLUGIN_DIRS)
|
||||||
PIP_PLUGINS = abx.get_pip_installed_plugins(group='archivebox')
|
PIP_PLUGINS = abx.get_pip_installed_plugins(group='archivebox')
|
||||||
USER_PLUGINS = abx.get_plugins_in_dirs(USER_PLUGIN_DIRS)
|
USER_PLUGINS = abx.get_plugins_in_dirs(USER_PLUGIN_DIRS)
|
||||||
ALL_PLUGINS = {**BUILTIN_PLUGINS, **PIP_PLUGINS, **USER_PLUGINS}
|
ALL_PLUGINS = {**BUILTIN_PLUGINS, **PIP_PLUGINS, **USER_PLUGINS}
|
||||||
|
|
||||||
|
# Load ArchiveBox plugins
|
||||||
PLUGIN_MANAGER = abx.pm
|
PLUGIN_MANAGER = abx.pm
|
||||||
PLUGINS = abx.archivebox.load_archivebox_plugins(PLUGIN_MANAGER, ALL_PLUGINS)
|
PLUGINS = abx.archivebox.load_archivebox_plugins(PLUGIN_MANAGER, ALL_PLUGINS)
|
||||||
HOOKS = abx.archivebox.use.get_HOOKS(PLUGINS)
|
HOOKS = abx.archivebox.use.get_HOOKS(PLUGINS)
|
||||||
|
|
||||||
|
# Load ArchiveBox config from plugins
|
||||||
CONFIGS = abx.archivebox.use.get_CONFIGS()
|
CONFIGS = abx.archivebox.use.get_CONFIGS()
|
||||||
FLAT_CONFIG = abx.archivebox.use.get_FLAT_CONFIG()
|
FLAT_CONFIG = abx.archivebox.use.get_FLAT_CONFIG()
|
||||||
BINPROVIDERS = abx.archivebox.use.get_BINPROVIDERS()
|
BINPROVIDERS = abx.archivebox.use.get_BINPROVIDERS()
|
||||||
|
|
|
@ -70,6 +70,7 @@ prompt-toolkit==3.0.48; python_version == "3.11"
|
||||||
psutil==6.0.0; python_version == "3.11"
|
psutil==6.0.0; python_version == "3.11"
|
||||||
ptyprocess==0.7.0; (sys_platform != "win32" and sys_platform != "emscripten") and python_version == "3.11"
|
ptyprocess==0.7.0; (sys_platform != "win32" and sys_platform != "emscripten") and python_version == "3.11"
|
||||||
pure-eval==0.2.3; python_version == "3.11"
|
pure-eval==0.2.3; python_version == "3.11"
|
||||||
|
py-machineid==0.6.0; python_version == "3.11"
|
||||||
pyasn1==0.6.1; python_version == "3.11"
|
pyasn1==0.6.1; python_version == "3.11"
|
||||||
pyasn1-modules==0.4.1; python_version == "3.11"
|
pyasn1-modules==0.4.1; python_version == "3.11"
|
||||||
pycparser==2.22; platform_python_implementation != "PyPy" and python_version == "3.11" or implementation_name != "cpython" and python_version == "3.11"
|
pycparser==2.22; platform_python_implementation != "PyPy" and python_version == "3.11" or implementation_name != "cpython" and python_version == "3.11"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue