move config into dedicated global app

This commit is contained in:
Nick Sweeting 2024-09-30 15:59:05 -07:00
parent ee7f73bd7b
commit 3e5b6ddeae
No known key found for this signature in database
79 changed files with 494 additions and 525 deletions

View file

@ -10,7 +10,7 @@ from datetime import datetime, timezone
from django.db.models import QuerySet
from ..config import (
from ..config.legacy import (
SAVE_ALLOWLIST_PTN,
SAVE_DENYLIST_PTN,
)

View file

@ -12,7 +12,7 @@ from ..util import (
is_static_file,
dedupe,
)
from ..config import (
from ..config.legacy import (
TIMEOUT,
CURL_ARGS,
CURL_EXTRA_ARGS,
@ -24,6 +24,7 @@ from ..config import (
)
from ..logging_util import TimedProgress
def get_output_path():
return 'archive.org.txt'

View file

@ -11,7 +11,7 @@ from ..util import (
domain,
dedupe,
)
from ..config import CONFIG
from ..config.legacy import CONFIG
from ..logging_util import TimedProgress

View file

@ -14,7 +14,7 @@ from ..util import (
without_query,
without_fragment,
)
from ..config import CONFIG
from ..config.legacy import CONFIG
from ..logging_util import TimedProgress

View file

@ -11,7 +11,7 @@ from ..util import (
get_headers,
dedupe,
)
from ..config import (
from ..config.legacy import (
TIMEOUT,
CURL_BINARY,
CURL_ARGS,

View file

@ -1,13 +1,12 @@
__package__ = 'archivebox.extractors'
import archivebox
from html.parser import HTMLParser
import io
from pathlib import Path
from typing import Optional
from ..config import (
from archivebox.config import VERSION
from ..config.legacy import (
SAVE_HTMLTOTEXT,
TIMEOUT,
)
@ -154,7 +153,7 @@ def save_htmltotext(link: Link, out_dir: Optional[Path]=None, timeout: int=TIMEO
return ArchiveResult(
cmd=cmd,
pwd=str(out_dir),
cmd_version=archivebox.__version__,
cmd_version=VERSION,
output=output,
status=status,
index_texts=[extracted_text] if extracted_text else [],

View file

@ -13,7 +13,7 @@ from ..util import (
is_static_file,
dedupe,
)
from ..config import (
from ..config.legacy import (
TIMEOUT,
SAVE_MERCURY,
DEPENDENCIES,

View file

@ -12,7 +12,7 @@ from ..util import (
htmldecode,
dedupe,
)
from ..config import (
from ..config.legacy import (
TIMEOUT,
CHECK_SSL_VALIDITY,
SAVE_TITLE,

View file

@ -17,7 +17,7 @@ from ..util import (
urldecode,
dedupe,
)
from ..config import (
from ..config.legacy import (
WGET_ARGS,
WGET_EXTRA_ARGS,
TIMEOUT,