add config for pdfannots and ext path
This commit is contained in:
parent
184d2eeb94
commit
f94c9ab997
1 changed files with 5 additions and 3 deletions
|
@ -15,19 +15,21 @@ from kython import import_file
|
||||||
from kython.klogging import setup_logzero
|
from kython.klogging import setup_logzero
|
||||||
|
|
||||||
|
|
||||||
from annotations_crawler_config import ROOT_PATHS, is_handled
|
from ..ext.pdfannots import pdfannots # type: ignore
|
||||||
pdfannots = import_file('/L/soft/pdfannots/pdfannots.py')
|
|
||||||
|
from .private import ROOT_PATHS, is_handled
|
||||||
|
|
||||||
|
|
||||||
def get_logger():
|
def get_logger():
|
||||||
return logging.getLogger('annotation-crawler')
|
return logging.getLogger('annotation-crawler')
|
||||||
|
|
||||||
|
|
||||||
def get_pdfs():
|
def get_pdfs() -> List[Path]:
|
||||||
pdfs = itertools.chain.from_iterable(Path(p).glob('**/*.pdf') for p in ROOT_PATHS)
|
pdfs = itertools.chain.from_iterable(Path(p).glob('**/*.pdf') for p in ROOT_PATHS)
|
||||||
return list(sorted(pdfs))
|
return list(sorted(pdfs))
|
||||||
|
|
||||||
|
|
||||||
|
# TODO cachew?
|
||||||
class Result(NamedTuple):
|
class Result(NamedTuple):
|
||||||
path: Path
|
path: Path
|
||||||
annotations: List
|
annotations: List
|
||||||
|
|
Loading…
Add table
Reference in a new issue