diff --git a/doc/example_config/my/config/__init__.py b/doc/example_config/my/config/__init__.py index f93155c..abffd62 100644 --- a/doc/example_config/my/config/__init__.py +++ b/doc/example_config/my/config/__init__.py @@ -2,8 +2,12 @@ Feel free to remove this if you don't need it/add your own custom settings and use them """ +from my.core import Paths + class hypothesis: - from my.core import Paths # expects outputs from https://github.com/karlicoss/hypexport # (it's just the standard Hypothes.is export format) export_path: Paths = '/path/to/hypothesis/data' + +class instapaper: + export_path: Paths = '' diff --git a/my/instapaper.py b/my/instapaper.py index e051c81..1ab62c2 100644 --- a/my/instapaper.py +++ b/my/instapaper.py @@ -6,9 +6,8 @@ REQUIRES = [ ] from dataclasses import dataclass -from typing import Optional -from .core import Paths, PathIsh +from .core import Paths from my.config import instapaper as user_config @@ -54,6 +53,12 @@ def pages() -> Iterable[Page]: return _dal().pages() +def stats(): + from .core import stat + return stat(pages) + +### misc + # TODO dunno, move this to private? def is_todo(hl: Highlight) -> bool: note = hl.note or '' diff --git a/tox.ini b/tox.ini index 1df1034..a5da275 100644 --- a/tox.ini +++ b/tox.ini @@ -32,7 +32,11 @@ commands = # TODO ugh. somehow, user installed (editable??) packages leak into this environment?? pip install -e .[testing] .[optional] pip install git+https://github.com/karlicoss/hypexport - python3 -m mypy -p my.hypothesis {posargs} + pip install git+https://github.com/karlicoss/instapexport + # todo I guess use a script... + python3 -m mypy -p my.hypothesis \ + -p my.instapaper \ + {posargs} # ideally, keep core modules only here