HPI/my/github/all.py
Dima Gerasimov a267aeec5b github: add config templates + docs
- ghexport: use export_path (export_dir is still supported)
2020-06-01 23:33:34 +01:00

21 lines
528 B
Python

"""
Unified Github data (merged from GDPR export and periodic API updates)
"""
from . import gdpr, ghexport
from .common import merge_events, Results
def events() -> Results:
yield from merge_events(
gdpr.events(),
ghexport.events(),
)
# todo hmm. not sure, maybe should be named sorted_events or something..
# also, not great that it's in all.py... think of a better way...
def get_events() -> Results:
from ..core.error import sort_res_by
return sort_res_by(events(), key=lambda e: e.dt)