Skip to content

RallypointOne/TodoFiles.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI Docs Build Stable Docs Dev Docs

TodoFiles.jl

A Julia package for reading and writing the Todo.txt format. Parses todo.txt lines into structured objects with direct access to priorities, dates, contexts, projects, and metadata.

Installation

using Pkg
Pkg.add("TodoFiles")

Usage

using TodoFiles, Dates

# Parse a task
t = parse_todo("(A) 2024-01-15 Call Mom @phone +Family due:2024-01-20")
t.priority    # 'A'
t.contexts    # ["phone"]
t.projects    # ["Family"]
t.metadata    # Dict("due" => "2024-01-20")

# Construct a task (tags are auto-extracted from the description)
t = Todo("Buy groceries @store +Errands"; priority='B', creation_date=Date(2024, 1, 15))

# Write back to Todo.txt format
write_todo(t)  # "(B) 2024-01-15 Buy groceries @store +Errands"

# File I/O
write_todos("todo.txt", [t])
todos = read_todos("todo.txt")

About

Todo.txt format for Julia

Resources

License

Stars

Watchers

Forks

Contributors

Languages