my.stackexchange: use GDPR data for votes

This commit is contained in:
Dima Gerasimov 2020-12-04 18:41:16 +00:00 committed by karlicoss
parent ddea816a49
commit 63c825ab81
3 changed files with 98 additions and 2 deletions

View file

@ -5,10 +5,19 @@ REQUIRES = [
'git+https://github.com/karlicoss/stexport',
]
# TODO use GDPR?
### config
from my.config import stackexchange as user_config
from ..core import dataclass, PathIsh, make_config
@dataclass
class stackexchange(user_config):
'''
Uses [[https://github.com/karlicoss/stexport][stexport]] outputs
'''
export_path: PathIsh # path to GDPR zip file
config = make_config(stackexchange)
###
from stexport import dal
from my.config import stackexchange as config
# todo lru cache?
@ -18,6 +27,7 @@ def _dal() -> dal.DAL:
return dal.DAL(inputs)
# TODO not sure if should keep the sites separate.. probably easier to filter after than merge
def site(name: str) -> dal.SiteDAL:
return _dal().site_dal(name)