Compare commits
No commits in common. "2196c13b147536ea546fb10c92f0dc63fae320e1" and "b126e178b119f999bd2e0d286d4c8e0b37e1709d" have entirely different histories.
2196c13b14
...
b126e178b1
@ -5,9 +5,8 @@ from datetime import datetime
|
||||
from typing import List
|
||||
|
||||
import org_rw
|
||||
from org_rw import OrgTime, OrgDoc
|
||||
from org_rw import OrgTime
|
||||
|
||||
EXTENSIONS = ( ".org", ".org.txt" )
|
||||
|
||||
def is_today(ot: OrgTime):
|
||||
now = datetime.now()
|
||||
@ -38,19 +37,17 @@ class Agenda:
|
||||
|
||||
|
||||
class DocumentManager:
|
||||
docs: list[OrgDoc]
|
||||
|
||||
def __init__(self, base_path: os.PathLike):
|
||||
self.base_path = base_path
|
||||
def __init__(self, basepath):
|
||||
self.basepath = basepath
|
||||
|
||||
def load(self):
|
||||
top = os.path.abspath(self.base_path)
|
||||
top = os.path.abspath(self.basepath)
|
||||
|
||||
docs = []
|
||||
|
||||
for root, dirs, files in os.walk(top):
|
||||
for name in files:
|
||||
if all(map(lambda ext: not name.endswith(ext), EXTENSIONS)):
|
||||
if ".org" not in name:
|
||||
continue
|
||||
|
||||
path = os.path.join(root, name)
|
||||
|
Loading…
Reference in New Issue
Block a user