move is_todo to orger
This commit is contained in:
parent
c2ddc683c1
commit
194b8ad1fc
1 changed files with 2 additions and 14 deletions
|
@ -59,25 +59,13 @@ def get_pages() -> List[Page]:
|
||||||
return pages
|
return pages
|
||||||
|
|
||||||
|
|
||||||
# TODO is it even necessary?
|
def get_highlights():
|
||||||
def get_entries():
|
|
||||||
return list(_iter())
|
return list(_iter())
|
||||||
|
|
||||||
|
|
||||||
def get_todos():
|
|
||||||
def is_todo(e: Annotation) -> bool:
|
|
||||||
if any(t.lower() == 'todo' for t in e.tags):
|
|
||||||
return True
|
|
||||||
if e.text is None:
|
|
||||||
return False
|
|
||||||
return e.text.lstrip().lower().startswith('todo')
|
|
||||||
return list(filter(is_todo, get_entries()))
|
|
||||||
|
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
get_pages()
|
get_pages()
|
||||||
get_todos()
|
get_highlights()
|
||||||
get_entries()
|
|
||||||
|
|
||||||
|
|
||||||
def _main():
|
def _main():
|
||||||
|
|
Loading…
Add table
Reference in a new issue