Giter VIP home page Giter VIP logo

todo.txt-python's Introduction

todo.py

Build Status

A port of the popular todo.txt-cli project from bash to python.

Dependencies

This only requires GitPython if you want to have todo.py also manage a git repository which tracks the related files. Running the script once will give you the URL to download it. Please note that GitPython is written for git --version 1.7.2+.

If you're on Windows and running the script out of cmd.exe, install colorama for 'termcolor' support.

Installation

From the repo

If you want to install the copy locally (i.e. to a personal directory) you can simply download one of the packages and run the install.sh script.

Be sure to run ./install.sh -h first. You can decide where you would like the script installed (the default is $HOME/bin/) and where you would like an alias for the script, e.g., t or tpy, written (the default is $HOME/.bashrc).

Using pypi

If you would prefer a system-wide installation, you can use install todo.py from PyPi like so:

$ pip install todo.py

Be aware that making a system-wide installation will not automattically create an alias for your use. You will have to edit either your .bashrc or .bash_profile (or respective shell configuration filse) to include something along the lines of:

alias t='$HOME/bin/todo.py'

Hacking

Enjoy, contribute, and feel free to clone. I'm doing this blind [1] as best as possible for fun.

Important Information


[1]By blind, I mean without looking at the source of the original todo.txt-cli project. I'm working solely from my experiences with the script and experimenting with the functionality while adding things I should probably write as patches and send upstream... I'll wait to finish my version of the project first though.

todo.txt-python's People

Contributors

jvstein avatar kalafut avatar sigmavirus24 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

Watchers

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

todo.txt-python's Issues

Can't get actions / plugins to work

Hey,

first of all thanks for porting todo.txt!
I like the concept and plan to write some actions myself but currently I can't get them to run ( I used the master branch).

config script:

# === EDIT FILE LOCATIONS BELOW ===

# Your todo.txt directory
export TODO_DIR="$HOME/.todo"

# Your todo/done/report.txt locations
export TODO_FILE="$TODO_DIR/todo.txt"
export DONE_FILE="$TODO_DIR/done.txt"
export REPORT_FILE="$TODO_DIR/report.txt"
export TMP_FILE="$TODO_DIR/todo.tmp"
export USE_GIT=False  # or 1

# You can customize your actions directory location
#export TODO_ACTIONS_DIR="$HOME/.todo.actions.d"
export TODO_ACTIONS_DIR="$TODO_DIR/.todo.actions.d"

I copied the plug-ins from bash todo.txt into $TODO_DIR/.todo.actions.d and made them
executable. But I can't use them and they don't show up if I run todo.py -h same holds true for your mstave.py. As far as I can tell load_actions() is not executed.

Best,
Immanuel

Archive

I use my todo.txt file with the android application. If I complete a task on my phone and then list it in todo.py it shows up with the propper X in front of the line. I don't see a way to archive this with todo.py.

install.sh does not work from alternate location

When executing install.sh line 67 and line 69 assume the current directory is the same as the file todo.py resulting in a file not found error.

Proposed changes:

#!/bin/bash
INSTALL_DIR=$HOME/bin
ALIAS_FILE=$HOME/.bashrc
THIS_SCRIPT=$(readlink -f $0) # Added to get full path to install.sh
CODE_DIR=$(dirname $THIS_SCRIPT) # Added to get full dirname of install.sh
prog="[""$(basename $THIS_SCRIPT)""] "

and

echo $prog"Copying todo.py to $INSTALL_DIR/todo.py"
if [[ ! -f $INSTALL_DIR/todo.py ]] ; then
    # addition of full path via CODE_DIR variable
    cp ${CODE_DIR}/todo.py $INSTALL_DIR
else
    # addition of full path via CODE_DIR variable
    cp -u ${CODE_DIR}/todo.py $INSTALL_DIR
fi

Thoughts?

windows paths in config files striped to their drive letter when parsed

the regexp that pulls variable out of config files does not work if there are windows paths, thus preventing proper use of todo.py on windows

strip_re = re.compile('\w+\s([A-Za-z_$="./01]+).*')

as you can see that match group is missing the \ and : characters so windows paths get reduced to the drive letter when they are pulled out.

a fixed line looks like

strip_re = re.compile('\w+\s([A-Za-z_$="./01\\\\:]+).*')

this fix let todo.py work properly for me.

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.