Library to access todo.txt-like task lists
Project description
pytodotxt
A tiny library to access todo.txt-like task lists.
Installation
To install pytodotxt, you can follow these steps to clone the repository, and install the program.
pip install pytodotxt
That’s all there is to do.
Documentation
You can find the full documentation at https://vonshednob.cc/pytodotxt/doc/.
Example usage
Here’s an example how to open a todo.txt file and print the description of all tasks that are not marked as completed:
import pytodotxt
todotxt = pytodotxt.TodoTxt('todo.txt')
todotxt.parse()
for task in todotxt.tasks:
if not task.is_completed:
print(task.description)
Here is how you add a new task to an existing todo.txt file:
import datetime
import pytodotxt
todotxt = pytodotxt.TodoTxt('todo.txt')
todotxt.parse()
task = pytodotxt.Task()
task.parse('This is a new task')
task.creation_date = datetime.date.today()
todotxt.tasks.append(task)
todotxt.save()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytodotxt-2.0.0.post1.tar.gz
(105.7 kB
view details)
Built Distribution
File details
Details for the file pytodotxt-2.0.0.post1.tar.gz
.
File metadata
- Download URL: pytodotxt-2.0.0.post1.tar.gz
- Upload date:
- Size: 105.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdbdfc17840b18903d37784d1c58c49fdd8127323d9b6234e3992a74eea80310 |
|
MD5 | 06408001ad2c94b74912449ff4dcde97 |
|
BLAKE2b-256 | beb7dad26d5ec8ff4c0e6ed37414f5d5de53c3d9ceab67e077606e5a1ed44ea0 |
File details
Details for the file pytodotxt-2.0.0.post1-py3-none-any.whl
.
File metadata
- Download URL: pytodotxt-2.0.0.post1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.1.dev0+g94f810c.d20240510 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f1ed5b5799d04a9773c59741264755b86bc96164a7ab3580f02451e0d07fffa |
|
MD5 | cfb46761395bd53016facc5640da23a5 |
|
BLAKE2b-256 | f414a6efb5da4a15a4fd6f4492cca5bef2932bd9c096d7dc46c2becf4c95e834 |