mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-10 06:34:16 +00:00
fix missing imports
This commit is contained in:
parent
e6830284c5
commit
df593dea0a
3 changed files with 10 additions and 3 deletions
|
@ -24,6 +24,7 @@ from ..config import (
|
|||
TERM_WIDTH,
|
||||
OUTPUT_DIR,
|
||||
HTML_INDEX_FILENAME,
|
||||
stderr,
|
||||
)
|
||||
|
||||
|
||||
|
@ -160,6 +161,7 @@ def log_parsing_started(source_file: str):
|
|||
**ANSI,
|
||||
))
|
||||
|
||||
|
||||
def log_parsing_finished(num_parsed: int, num_new_links: int, parser_name: str):
|
||||
end_ts = datetime.now()
|
||||
_LAST_RUN_STATS.parse_end_ts = end_ts
|
||||
|
@ -178,14 +180,17 @@ def log_indexing_process_started(num_links: int):
|
|||
**ANSI,
|
||||
))
|
||||
|
||||
|
||||
def log_indexing_process_finished():
|
||||
end_ts = datetime.now()
|
||||
_LAST_RUN_STATS.index_end_ts = end_ts
|
||||
|
||||
|
||||
def log_indexing_started(out_path: str):
|
||||
if IS_TTY:
|
||||
sys.stdout.write(f' > {out_path}')
|
||||
|
||||
|
||||
def log_indexing_finished(out_path: str):
|
||||
print(f'\r √ {out_path}')
|
||||
|
||||
|
|
|
@ -25,10 +25,12 @@ class Snapshot(models.Model):
|
|||
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f'[{self.timestamp}] {self.url[:64]} ({self.title[:64]})'
|
||||
title = self.title or '-'
|
||||
return f'[{self.timestamp}] {self.url[:64]} ({title[:64]})'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f'[{self.timestamp}] {self.url[:64]} ({self.title[:64]})'
|
||||
title = self.title or '-'
|
||||
return f'[{self.timestamp}] {self.url[:64]} ({title[:64]})'
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, info: dict):
|
||||
|
|
|
@ -7,7 +7,7 @@ from typing import Optional
|
|||
from datetime import datetime
|
||||
|
||||
from ..index.schema import Link, ArchiveResult, ArchiveOutput, ArchiveError
|
||||
from ..system import run
|
||||
from ..system import run, chmod_file
|
||||
from ..util import (
|
||||
enforce_types,
|
||||
is_static_file,
|
||||
|
|
Loading…
Reference in a new issue