Code Monkey home page Code Monkey logo

pytodotxt's Introduction

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()

Contribution

Any contribution is appreciated! Report bugs in issues or via email to the authors.

The source code can be found on vonshednob.cc and on PyPi.

Pull requests through github are no longer supported, but patches and code discussions via email are most welcome! If you don't quite know how to do that, have a look at this blog article that gives detailed instructions how to work without github.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.