clean up and org

This commit is contained in:
buenosairesam
2025-05-08 23:40:54 -03:00
parent 0b9f23fafd
commit 242928d502
11 changed files with 197 additions and 96 deletions

23
dmapp/dmcore/task.py Normal file
View File

@@ -0,0 +1,23 @@
task_file = "/home/mariano/LETRAS/org/task/main"
def extract(line):
if line.rstrip().endswith("*"):
pipe_index = line.find("|")
if pipe_index != -1 and len(line) > pipe_index + 8:
value = line[pipe_index + 1 : pipe_index + 9]
return value
return None
def read_and_extract(file_path):
with open(file_path, "r") as file:
for line in file:
value = extract(line)
if value:
return value
return None
def current():
return read_and_extract(task_file)