initial; add stackexchange
This commit is contained in:
parent
9ecc149193
commit
052a500c13
3 changed files with 20 additions and 0 deletions
6
__init__.py
Normal file
6
__init__.py
Normal 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
0
py.typed
Normal file
14
stackexchange.py
Normal file
14
stackexchange.py
Normal 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')
|
Loading…
Add table
Reference in a new issue