use my.config instead of mycfg; minor cleanups and docstrings

This commit is contained in:
Dima Gerasimov 2020-04-12 00:18:48 +01:00 committed by karlicoss
parent f31ff71e6f
commit e5b3a1e91e
37 changed files with 142 additions and 110 deletions

View file

@ -5,7 +5,7 @@ Module for Feedbin RSS reader
from .common import listify
from ._rss import Subscription
from mycfg import paths
from my.config import feedbin as config
import json
from pathlib import Path
@ -27,7 +27,8 @@ def parse_file(f: Path):
def get_states() -> Dict[datetime, List[Subscription]]:
res = {}
for f in sorted(Path(paths.feedbin.export_dir).glob('*.json')):
# TODO use get_files
for f in sorted(Path(config.export_dir).glob('*.json')):
dts = f.stem.split('_')[-1]
dt = isoparse(dts)
subs = parse_file(f)