Compare commits
63 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a6ff81e28 | ||
|
|
0b3d9109de | ||
|
|
ad40ef0f18 | ||
|
|
31216fe365 | ||
|
|
7f5c8fb3e1 | ||
|
|
3e7b60abcd | ||
|
|
cc3e5f73aa | ||
|
|
52604ebf78 | ||
|
|
bbe153b9bb | ||
|
|
ec54a032cb | ||
|
|
758cdc5551 | ||
|
|
02dc030225 | ||
|
|
7b769b2eea | ||
|
|
39ee9ab045 | ||
|
|
1e5902d0e2 | ||
|
|
3df7497287 | ||
|
|
07bb979d43 | ||
|
|
7e04849a4f | ||
|
|
f8b2646b92 | ||
|
|
02980ae7ee | ||
|
|
12bbf8fe67 | ||
|
|
ab78607506 | ||
|
|
6be78ca5fa | ||
|
|
9ab77253db | ||
|
|
cf3c5312bf | ||
|
|
37a7bb0e8a | ||
|
|
ed8e8e24d9 | ||
|
|
d6f00ca42f | ||
|
|
a03a3bf66b | ||
|
|
448cecb91d | ||
|
|
ee59233c36 | ||
|
|
f55f5e8b5f | ||
|
|
d508ed9dee | ||
|
|
62f3313ff9 | ||
|
|
6bc374c5f2 | ||
|
|
87959a8aa8 | ||
|
|
3e9d40ebd7 | ||
|
|
6bc05000d9 | ||
|
|
717f052f13 | ||
|
|
4ee8c332ed | ||
|
|
88caf44e9e | ||
|
|
db66767170 | ||
|
|
f8f8e83c40 | ||
|
|
2648bb047c | ||
|
|
bbff2d13bb | ||
|
|
e4c7979888 | ||
|
|
47c7ba75b3 | ||
|
|
2bd2e9f7bd | ||
|
|
f37cedc7ca | ||
|
|
7b2c9f080a | ||
|
|
98646a575a | ||
|
|
e6649e6293 | ||
|
|
eb61752708 | ||
|
|
5683490c0e | ||
|
|
20e6892775 | ||
|
|
fd9b002ce1 | ||
|
|
7736e6b4fa | ||
|
|
586abe8282 | ||
|
|
7bd6696540 | ||
|
|
b5a03cfee5 | ||
|
|
d7b9f87994 | ||
|
|
959598416f | ||
|
|
25c6505007 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
VERSION-FILE
|
||||||
38
GEN-VERSION-FILE
Executable file
38
GEN-VERSION-FILE
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Based on git's GIT-VERSION-GEN.
|
||||||
|
|
||||||
|
VF=VERSION-FILE
|
||||||
|
DEF_VER=v2.2
|
||||||
|
|
||||||
|
LF='
|
||||||
|
'
|
||||||
|
|
||||||
|
if test -d .git -o -f .git &&
|
||||||
|
VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
|
||||||
|
case "$VN" in
|
||||||
|
*$LF*) (exit 1) ;;
|
||||||
|
v[0-9]*)
|
||||||
|
git update-index -q --refresh
|
||||||
|
test -z "$(git diff-index --name-only HEAD --)" ||
|
||||||
|
VN="$VN-dirty" ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
VN=$(echo "$VN" | sed -e 's/-/./g');
|
||||||
|
else
|
||||||
|
VN="$DEF_VER"
|
||||||
|
fi
|
||||||
|
|
||||||
|
VN=$(expr "$VN" : v*'\(.*\)')
|
||||||
|
|
||||||
|
if test -r $VF
|
||||||
|
then
|
||||||
|
VC=$(sed -e 's/^VERSION=//' <$VF)
|
||||||
|
else
|
||||||
|
VC=unset
|
||||||
|
fi
|
||||||
|
test "$VN" = "$VC" || {
|
||||||
|
echo >&2 "VERSION=$VN"
|
||||||
|
echo "VERSION=$VN" >$VF
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
34
Makefile
Normal file
34
Makefile
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
#
|
||||||
|
# Makefile for todo.txt
|
||||||
|
#
|
||||||
|
|
||||||
|
# Dynamically detect/generate version file as necessary
|
||||||
|
# This file will define a variable called VERSION.
|
||||||
|
.PHONY: .FORCE-VERSION-FILE
|
||||||
|
VERSION-FILE: .FORCE-VERSION-FILE
|
||||||
|
@./GEN-VERSION-FILE
|
||||||
|
-include VERSION-FILE
|
||||||
|
|
||||||
|
# Maybe this will include the version in it.
|
||||||
|
todo.sh: VERSION-FILE
|
||||||
|
|
||||||
|
# For packaging
|
||||||
|
DISTFILES := todo.cfg
|
||||||
|
|
||||||
|
DISTNAME=todo.txt_cli-$(VERSION)
|
||||||
|
dist: $(DISTFILES) todo.sh
|
||||||
|
mkdir -p $(DISTNAME)
|
||||||
|
cp -f $(DISTFILES) $(DISTNAME)/
|
||||||
|
sed -e 's/@DEV_VERSION@/'$(VERSION)'/' todo.sh > $(DISTNAME)/todo.sh
|
||||||
|
tar cf $(DISTNAME).tar $(DISTNAME)/
|
||||||
|
gzip -f -9 $(DISTNAME).tar
|
||||||
|
zip -9r $(DISTNAME).zip $(DISTNAME)/
|
||||||
|
rm -r $(DISTNAME)
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -f $(DISTNAME).tar.gz $(DISTNAME).zip
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
|
test:
|
||||||
|
@echo "TBD!"
|
||||||
119
README
119
README
@@ -1,111 +1,8 @@
|
|||||||
Usage: todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description]
|
TODO.TXT Command Line Interface
|
||||||
|
Latest version: http://github.com/ginatrapani/todo.txt-cli/tree/master
|
||||||
Actions:
|
First release: 5/11/2006
|
||||||
add "THING I NEED TO DO +project @context"
|
Conceived and released by: Gina Trapani (http://ginatrapani.org)
|
||||||
a "THING I NEED TO DO +project @context"
|
Contributors: http://github.com/ginatrapani/todo.txt-cli/network
|
||||||
Adds THING I NEED TO DO to your todo.txt file on its own line.
|
License: GPL, http://www.gnu.org/copyleft/gpl.html
|
||||||
Project and context notation optional.
|
More information and mailing list at http://todotxt.com
|
||||||
Quotes optional.
|
To submit patches, fork the repository at http://github.com/ginatrapani/todo.txt-cli/tree/master
|
||||||
|
|
||||||
addto DEST "TEXT TO ADD"
|
|
||||||
Adds a line of text to any file located in the todo.txt directory.
|
|
||||||
For example, addto inbox.txt "decide about vacation"
|
|
||||||
|
|
||||||
append NUMBER "TEXT TO APPEND"
|
|
||||||
app NUMBER "TEXT TO APPEND"
|
|
||||||
Adds TEXT TO APPEND to the end of the todo on line NUMBER.
|
|
||||||
Quotes optional.
|
|
||||||
|
|
||||||
archive
|
|
||||||
Moves done items from todo.txt to done.txt and removes blank lines.
|
|
||||||
|
|
||||||
del NUMBER [TERM]
|
|
||||||
rm NUMBER [TERM]
|
|
||||||
Deletes the item on line NUMBER in todo.txt.
|
|
||||||
If term specified, deletes only the term from the line.
|
|
||||||
|
|
||||||
depri NUMBER
|
|
||||||
dp NUMBER
|
|
||||||
Deprioritizes (removes the priority) from the item
|
|
||||||
on line NUMBER in todo.txt.
|
|
||||||
|
|
||||||
do NUMBER
|
|
||||||
Marks item on line NUMBER as done in todo.txt.
|
|
||||||
|
|
||||||
list [TERM...]
|
|
||||||
ls [TERM...]
|
|
||||||
Displays all todo's that contain TERM(s) sorted by priority with line
|
|
||||||
numbers. If no TERM specified, lists entire todo.txt.
|
|
||||||
|
|
||||||
listall [TERM...]
|
|
||||||
lsa [TERM...]
|
|
||||||
Displays all the lines in todo.txt AND done.txt that contain TERM(s)
|
|
||||||
sorted by priority with line numbers. If no TERM specified, lists
|
|
||||||
entire todo.txt AND done.txt concatenated and sorted.
|
|
||||||
|
|
||||||
listcon
|
|
||||||
lsc
|
|
||||||
Lists all the task contexts that start with the @ sign in todo.txt.
|
|
||||||
|
|
||||||
listfile SRC [TERM...]
|
|
||||||
lf SRC [TERM...]
|
|
||||||
Displays all the lines in SRC file located in the todo.txt directory,
|
|
||||||
sorted by priority with line numbers. If TERM specified, lists
|
|
||||||
all lines that contain TERM in SRC file.
|
|
||||||
|
|
||||||
listpri [PRIORITY]
|
|
||||||
lsp [PRIORITY]
|
|
||||||
Displays all items prioritized PRIORITY.
|
|
||||||
If no PRIORITY specified, lists all prioritized items.
|
|
||||||
|
|
||||||
listproj
|
|
||||||
lsprj
|
|
||||||
Lists all the projects that start with the + sign in todo.txt.
|
|
||||||
|
|
||||||
move NUMBER DEST [SRC]
|
|
||||||
mv NUMBER DEST [SRC]
|
|
||||||
Moves a line from source text file (SRC) to destination text file (DEST).
|
|
||||||
Both source and destination file must be located in the directory defined
|
|
||||||
in the configuration directory. When SRC is not defined
|
|
||||||
it's by default todo.txt.
|
|
||||||
|
|
||||||
prepend NUMBER "TEXT TO PREPEND"
|
|
||||||
prep NUMBER "TEXT TO PREPEND"
|
|
||||||
Adds TEXT TO PREPEND to the beginning of the todo on line NUMBER.
|
|
||||||
Quotes optional.
|
|
||||||
|
|
||||||
pri NUMBER PRIORITY
|
|
||||||
p NUMBER PRIORITY
|
|
||||||
Adds PRIORITY to todo on line NUMBER. If the item is already
|
|
||||||
prioritized, replaces current priority with new PRIORITY.
|
|
||||||
PRIORITY must be an uppercase letter between A and Z.
|
|
||||||
|
|
||||||
replace NUMBER "UPDATED TODO"
|
|
||||||
Replaces todo on line NUMBER with UPDATED TODO.
|
|
||||||
|
|
||||||
report
|
|
||||||
Adds the number of open todo's and closed done's to report.txt.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-d CONFIG_FILE
|
|
||||||
Use a configuration file other than the default ~/todo.cfg
|
|
||||||
-f
|
|
||||||
Forces actions without confirmation or interactive input
|
|
||||||
-h
|
|
||||||
Display this help message
|
|
||||||
-p
|
|
||||||
Plain mode turns off colors
|
|
||||||
-a
|
|
||||||
Don't auto-archive tasks automatically on completion
|
|
||||||
-n
|
|
||||||
Don't preserve line numbers; automatically remove blank lines
|
|
||||||
on task deletion
|
|
||||||
-t
|
|
||||||
Prepend the current date to a task automatically
|
|
||||||
when it's added.
|
|
||||||
-v
|
|
||||||
Verbose mode turns on confirmation messages
|
|
||||||
-V
|
|
||||||
Displays version, license and credits
|
|
||||||
|
|||||||
56
todo.cfg
56
todo.cfg
@@ -1,41 +1,41 @@
|
|||||||
# === EDIT FILE LOCATIONS BELOW ===
|
# === EDIT FILE LOCATIONS BELOW ===
|
||||||
|
|
||||||
# Your todo.txt directory
|
# Your todo.txt directory
|
||||||
#TODO_DIR="/Users/gina/Documents/todo"
|
#export TODO_DIR="/Users/gina/Documents/todo"
|
||||||
TODO_DIR="C:/Documents and Settings/gina/My Documents"
|
export TODO_DIR="C:/Documents and Settings/gina/My Documents"
|
||||||
|
|
||||||
# Your todo/done/report.txt locations
|
# Your todo/done/report.txt locations
|
||||||
TODO_FILE="$TODO_DIR/todo.txt"
|
export TODO_FILE="$TODO_DIR/todo.txt"
|
||||||
DONE_FILE="$TODO_DIR/done.txt"
|
export DONE_FILE="$TODO_DIR/done.txt"
|
||||||
REPORT_FILE="$TODO_DIR/report.txt"
|
export REPORT_FILE="$TODO_DIR/report.txt"
|
||||||
TMP_FILE="$TODO_DIR/todo.tmp"
|
export TMP_FILE="$TODO_DIR/todo.tmp"
|
||||||
|
|
||||||
# == EDIT FILE LOCATIONS ABOVE ===
|
# == EDIT FILE LOCATIONS ABOVE ===
|
||||||
|
|
||||||
# === COLOR MAP ===
|
# === COLOR MAP ===
|
||||||
|
|
||||||
NONE=''
|
export NONE=''
|
||||||
BLACK='\\033[0;30m'
|
export BLACK='\\033[0;30m'
|
||||||
RED='\\033[0;31m'
|
export RED='\\033[0;31m'
|
||||||
GREEN='\\033[0;32m'
|
export GREEN='\\033[0;32m'
|
||||||
BROWN='\\033[0;33m'
|
export BROWN='\\033[0;33m'
|
||||||
BLUE='\\033[0;34m'
|
export BLUE='\\033[0;34m'
|
||||||
PURPLE='\\033[0;35m'
|
export PURPLE='\\033[0;35m'
|
||||||
CYAN='\\033[0;36m'
|
export CYAN='\\033[0;36m'
|
||||||
LIGHT_GREY='\\033[0;37m'
|
export LIGHT_GREY='\\033[0;37m'
|
||||||
DARK_GREY='\\033[1;30m'
|
export DARK_GREY='\\033[1;30m'
|
||||||
LIGHT_RED='\\033[1;31m'
|
export LIGHT_RED='\\033[1;31m'
|
||||||
LIGHT_GREEN='\\033[1;32m'
|
export LIGHT_GREEN='\\033[1;32m'
|
||||||
YELLOW='\\033[1;33m'
|
export YELLOW='\\033[1;33m'
|
||||||
LIGHT_BLUE='\\033[1;34m'
|
export LIGHT_BLUE='\\033[1;34m'
|
||||||
LIGHT_PURPLE='\\033[1;35m'
|
export LIGHT_PURPLE='\\033[1;35m'
|
||||||
LIGHT_CYAN='\\033[1;36m'
|
export LIGHT_CYAN='\\033[1;36m'
|
||||||
WHITE='\\033[1;37m'
|
export WHITE='\\033[1;37m'
|
||||||
DEFAULT='\\033[0m'
|
export DEFAULT='\\033[0m'
|
||||||
|
|
||||||
# === PRIORITY COLORS ===
|
# === PRIORITY COLORS ===
|
||||||
|
|
||||||
PRI_A=$YELLOW # color for A priority
|
export PRI_A=$YELLOW # color for A priority
|
||||||
PRI_B=$GREEN # color for B priority
|
export PRI_B=$GREEN # color for B priority
|
||||||
PRI_C=$LIGHT_BLUE # color for C priority
|
export PRI_C=$LIGHT_BLUE # color for C priority
|
||||||
PRI_X=$WHITE # color for rest of them
|
export PRI_X=$WHITE # color for rest of them
|
||||||
|
|||||||
Reference in New Issue
Block a user