initial; add stackexchange

This commit is contained in:
Dima Gerasimov 2019-09-17 21:32:02 +04:00
parent 9ecc149193
commit 052a500c13
3 changed files with 20 additions and 0 deletions

6
__init__.py Normal file
View file

@ -0,0 +1,6 @@
# TODO just eval setup file to populate paths etc?
# TODO note sure if it would
import my_configuration
paths = my_configuration.paths # type: ignore

0
py.typed Normal file
View file

14
stackexchange.py Normal file
View file

@ -0,0 +1,14 @@
from functools import lru_cache
from . import paths
@lru_cache()
def stexport():
from kython import import_file
stexport_model = import_file(paths.stexport.repo / 'model.py')
return stexport_model
def get_data():
sources = [max(paths.stexport.export_dir.glob('*.json'))]
return stexport().Model(sources).site_model('stackoverflow')