get rid of porg dependency, use orgparse directly
This commit is contained in:
parent
62e1bdc39a
commit
a6e5908e6d
8 changed files with 101 additions and 54 deletions
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue