get rid of porg dependency, use orgparse directly

This commit is contained in:
Dima Gerasimov 2020-11-06 04:04:05 +00:00 committed by karlicoss
parent 62e1bdc39a
commit a6e5908e6d
8 changed files with 101 additions and 54 deletions

View file

@ -6,9 +6,9 @@ def setup_notes_path(notes: Path) -> None:
from my.cfg import config
class user_config:
roots = [notes]
paths = [notes]
config.orgmode = user_config # type: ignore[misc,assignment]
# TODO FIXME ugh. this belongs to tz provider or global config or someting
# TODO ugh. this belongs to tz provider or global config or someting
import pytz
class user_config_2:
default_timezone = pytz.timezone('Europe/London')

View file

@ -1,7 +1,7 @@
from my import orgmode
from my.core.orgmode import collect
def test() -> None:
# meh
results = list(orgmode.query().query_all(lambda x: x.with_tag('python')))
results = list(orgmode.query().collect_all(lambda n: [n] if 'python' in n.tags else []))
assert len(results) > 5