my.notes.orgmode: move to my.orgmode

This commit is contained in:
Dima Gerasimov 2020-10-11 09:49:32 +01:00 committed by karlicoss
parent 649537deca
commit 1ded99c61c
3 changed files with 8 additions and 8 deletions

View file

@ -8,7 +8,7 @@ from typing import NamedTuple, Iterator
from ..core import LazyLogger
from ..core.error import Res, set_error_datetime, extract_error_datetime
from ..notes import orgmode
from .. import orgmode
from my.config import weight as config

View file

@ -6,9 +6,9 @@ from glob import glob
from typing import List, Sequence, Iterator
from pathlib import Path
from ..common import PathIsh
from .core import PathIsh
from my.config import orgmode as config
from my.config import orgmode as user_config
from porg import Org
@ -25,9 +25,9 @@ def _org_files_in(ppp: Path, archived: bool=False) -> Iterator[Path]:
yield from ppp.rglob('*.org_archive')
def org_files(roots=config.roots, archived: bool=False) -> Iterator[Path]:
def org_files(roots=user_config.roots, archived: bool=False) -> Iterator[Path]:
# TODO rename to 'paths'? use get_files?
for p in config.roots:
for p in roots:
yield from _org_files_in(Path(p), archived=archived)
@ -56,4 +56,4 @@ class PorgAll:
def query():
return PorgAll(roots=config.roots)
return PorgAll(roots=user_config.roots)

View file

@ -1,7 +1,7 @@
import my.notes.orgmode as orgmode
from my import orgmode
def test():
def test() -> None:
# meh
results = list(orgmode.query().query_all(lambda x: x.with_tag('python')))
assert len(results) > 5