Giter Site home page Giter Site logo

td-cli's Introduction

Icon



  

td-cli is a command line todo manager,
where you can organize and manage your todos across multiple projects

gif

Installation

td-cli only works for python 3, so it needs to be installed with pip3

pip3 install td-cli

Windows 10

In order to use the interactive mode on Windows, you'll have to install windows-curses

pip install windows-curses

In addition to that, Windows Terminal is recommended for better UX.

Getting started

Run td --help to see possible commands.

Here are some to get you started:

  • Run td to list all your todos.

  • Run td add "my new awesome todo" to add a new todo.

  • Run td <id> complete to complete your todo. You don't have to specify the whole id, a substring will do. It'll fetch the first one that it finds in the same order as when you list your todos.

Note that global is a preserved group name where you can list all your global groups. You can always set it as the default with:

td group global preset

API

Check out the api.

Configuring

The location of your todos and your configuration will depend on these environment variables (in this order):

  1. TD_CLI_HOME: determines where your todo.db and todo.cfg file will live
  2. XDG_CONFIG_HOME: a fallback if $TD_CLI_HOME is not set
  3. HOME: a fallback if $XDG_CONFIG_HOME is not set. If $HOME is used; all files will be transformed to a dotfile, i.e.~/.todo.db and ~/.todo.cfg.

Database name

Your database instance will be located in in the before-mentioned configuration directory. By default the database will be named todo.

You can change your database name by specifying database_name in your $TD_CLI_HOME/.todo.cfg file:

[settings]
database_name: something_else

This results in a database instance at $TD_CLI_HOME/.something_else.db

Format

You can specify your preferred format of your todo's details via the format config keyword:

format: md

This would result in the .md (Markdown) file extension when editing a todo. This allows you to use the power of your editor to e.g. syntax highlight the details, and etc.

Editor

When editing a todo, td <id> edit, you can both specify the todo's name and the todo's details via options (see td <id> edit --help). If no option is specified, your todo will be opened in vi by default (your environement EDITOR will override this) where you can edit the todo's details. You can change the default editor by updating your config:

[settings]
editor: nvim

Only list uncompleted todos

When listing todos, by default td-cli will list both completed and uncompleted todos. If you want to only list uncompleted todos by default, then you can apply the completed config:

[settings]
completed: 0

Group

When listing todos, you have the option of specifying what group to list from:

td -g my-group
# or
td g my-group

If no group is provided, td will list from the current default group. You can globally set the default group with:

td g my-group preset

However, there's an option to set the default group per git project (this is not possible from the root config $TD_CLI_HOME/.todo.cfg). In any root of your projects, you can create a .td.cfg config file to specify what group to default on (this will override the global default group):

[settings]
group: my-group

If you run td within your git project, td will default to my-group.

I recommend globally ignoring .td.cfg in ~/.gitignore.

td-cli's People

Contributors

darrikonn avatar dependabot[bot] avatar tomasdanjonsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

td-cli's Issues

[Feature Request] Tasks in Markdown

Have you considered enabling Markdown format for the tasks in edit mode?

When I started using the tool, I limited myself to using single line descriptions of the tasks. As I used the tool, I came up with a system that works best for me. My use case expanded to using indicative titles for the first line and a full-blown numbered task list underneath it that are a bunch of smaller tasks that contribute to complete the broader task defined.

A recursive task completion engine for the items defined within a task would be good but I'm guessing that's not where the project is headed. Markdown support would assist though. I could use strikethroughs for example! I currently retort to adding a "Complete" tag at the beginning of a bullet that tells me it's done.

Interactive td-cli quits after resume pushing any arrow button

If I do this:

  1. Run td -i
  2. Suspend with ^Z
  3. Resume with fg
  4. Press arrow down button ↓ to select next entry

– then td-cli simply quits and I need to restart it.

Not sure if this is an effect of my setup, would be glad if someone could verify / try to reproduce.

feat: :sparkles: Be able to use the command line command 'edit' when in interactive mode

When using td-cli from the command line, one can edit a td item by running:

td <id> edit

which opens the item in $EDITOR which allows the item to have multiple lines and container much more information.

However, when using interactive mode, there is no similar functionality. The EDIT command only allows to edit the first line of a td item.

My feature request would be to add that ability to interactive mode.

Two small tweaks for the new interactive mode.

Thanks for implementing my suggested features in #1.

Tried it and loved it, great addition.

There are however two small things I noticed.

  • Can't add anymore when I deleted everything, the option goes away, there is only recover and quit.
  • Can't start interactive mode if there are no todo's

I think everything else is fine

Toggle completed/uncompleted tasks in the interactive mode

It would be nice to be able to toggle completed/uncompleted tasks in the interactive mode. The current setup leads you to delete completed tasks to get them out of the mode. I know you can hide them with a flag, but it would be nice to be able to do it in the mode.

Sort TD list - [feature request]

I would find it very useful to be able to sort my ToDo list alphabetically. I usually organize my todolist with a project prefix. I'm wondering how I would go about filtering or sorting the db query if possible...

Unicode support

Installed td-cli in virtual env with pip3 install td-cli:

# pip3 list
Package    Version
---------- -------
pip        21.0.1
setuptools 56.0.0
td-cli     2.0.1
wheel      0.36.2

Not able to enter e.g. German umlaut (e.g. ä as in my name, Tobi Schäfer):

image

Not to mention emoji et al.

OSError when piping

When piping the output of td, a call to os.get_terminal_size() raises an OSError that is never caucht:

image
image

Demonstration with a little snippet:

import os
print("foo")
print(os.get_terminal_size())

This works fine when running the script, but running python example.py | grep foo throws:

Traceback (most recent call last):
  File "/tmp/example.py", line 5, in <module>
    print(os.get_terminal_size())
foo
OSError: [Errno 25] Inappropriate ioctl for device

This looks quite easy to solve, so I already forked and will start working on it asap.
FYI, I am trying to display my todos in conky, using this project to convert ansi color codes to conky color commands by piping td into ansito -, and give that to conky to display as text.

Document --interactive in --help

The version of td-cli in Ubuntu focal's repository does not show the interactive flag in the help command, unless you run td --interactive --help

Due date management?

I'm curious as to how due dates could be managed with td-cli? Do you foresee a need to have due dates added in td-cli?

Sync with Google Tasks api

Have you thought about syncing with Google Tasks api?

That would make this perfect to have a backend like that.

Just my two cents.

Really nice tool.

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.