Release 0.1.0

This commit is contained in:
Mike Dvorkin
2010-08-26 21:00:30 -07:00
parent 282dd19f40
commit 580514644f

221
README.md
View File

@@ -1,11 +1,11 @@
## Welcome to Pit ## ## Welcome to Pit ##
Pit is simple command line project manager. I wrote it because I use Git a lot Pit is a command-line project manager that integrates with Git. I wrote it
and needed similar command like tool for tracking my tasks. Besides, after years because I needed a command-line tool for tracking tasks. Besides, after
of Ruby and JavaScript programming I somewhat missed plain C. years of Ruby and JavaScript programming I missed plain C.
### Installing Pit ### ### Installing Pit ###
It is implemented in C and compiles down to single executable file. It has been Pit is implemented in C and compiles down to a single executable file. It
tested to compile on Mac OS Leopard, Ubuntu, and RedHat Linux. has been tested to compile on Mac OS Leopard, Ubuntu, and RedHat Linux.
$ git clone git://github.com/michaeldv/pit.git $ git clone git://github.com/michaeldv/pit.git
$ cd pit $ cd pit
@@ -18,25 +18,26 @@ tested to compile on Mac OS Leopard, Ubuntu, and RedHat Linux.
0.1.0 0.1.0
### Basic Concepts ### ### Basic Concepts ###
Basic Pit entities are projects, tasks, and notes. A project can have many Basic Pit entities are projects, tasks, and notes. One project can have
tasks, and a task can have many notes. Each entity has a number of attributes. multiple tasks, and a task can have multiple notes. Each entity has a number
For example, a project has name and status, a task has name, status, priority, of attributes. For example, project has name and status, task has name,
date, and time, and within a note there is a message body. All attributes status, priority, date, and time, and within note there is message body.
except name and message body are optional and can be omitted. All attributes except name and message body are optional and can be omitted.
The attributes have no semantic meaning and their values are not interpreted The attributes have no semantic meaning, and do not have a pre-defined set
by Pit. For example, the time attribute could be used as projected time, time of values. For example, depending on the particular need, the time attribute
spend on the task, or time left to finish the task. could be used as projected time in weeks, hours spent on the task, or days
left to finish the task.
Pit tries to maintain a notion "current" project, task, or note. For example, Pit tries to maintain a notion of "current" project, task, or note. When you
when you create a new project it becomes current. If you create a task and create new project, it automatically becomes current. If you do not specify
omit its project number the task will automatically be associated with current project number when creating a task, the new task will be associated with
project. the current project.
### Pit Commands ### ### Pit Commands ###
Pit commands are as follows: Pit commands are as follows:
init Create empty Pit database or reinitialize an existing one init Create an empty Pit database or re-initialize an existing one
project Create, search, and manage Pit projects project Create, search, and manage Pit projects
task Create, search, and manage Pit tasks task Create, search, and manage Pit tasks
note Create, search, and manage Pit notes note Create, search, and manage Pit notes
@@ -45,95 +46,11 @@ Pit commands are as follows:
help Show help information about Pit help Show help information about Pit
version Show Pit version number version Show Pit version number
All commands might be shortened as long as they remain unambiguous. For more All commands may be shortened, as long as they remain unambiguous. For more
information on a specific command run: information on a specific command run:
$ pit help <command> $ pit help <command>
### Sample Pit session ###
$ pit init
Created empty /Users/mike/.pit
$ pit project -c "My very first project"
created project 1: My very first project (status: active)
$ pit p -c "My second project" -s backlog
created project 2: My second project (status: backlog)
$ pit p
1: (mike) |active | My very first project (0 tasks)
* 2: (mike) |backlog| My second project (0 tasks)
$ pit p -e 1 -s current
updated project 1: My very first project (status: current)
$ pit p
* 1: (mike) |current| My very first project (0 tasks)
2: (mike) |backlog| My second project (0 tasks)
$ pit task -c "My very first task"
created task 1: My very first task (status: open, priority: normal, project: 1)
$ pit t -c "My second task" -s new -p high
created task 2: My second task (status: new, priority: high, project: 1)
$ pit t -c "My third task" -p low -t 4:00
created task 3: My third task (status: open, priority: low, time: 4:00, project: 1)
$ pit p
* 1: (mike) |current| My very first project (3 tasks)
2: (mike) |backlog| My second project (0 tasks)
$ pit t
1: (mike) |open| |normal| My very first task (0 notes)
2: (mike) |new | |high | My second task (0 notes)
* 3: (mike) |open| |low | 4:00 My third task (0 notes)
$ pit t -e -s new
updated task 3: My third task (status: new)
$ pit t -e 1 -d 10/10
updated task 1: My very first task (date: Oct 10, 2010)
* 1: (mike) |open| |normal| Oct 10, 2010 My very first task (0 notes)
2: (mike) |new | |high | My second task (0 notes)
3: (mike) |new | |low | 4:00 My third task (0 notes)
$ pit n -c "Sample note for task #1"
created note 1: Sample note for task #1 (task 1)
$ pit t -q -s new
2: (mike) |new| |high| My second task (0 notes)
3: (mike) |new| |low | 4:00 My third task (0 notes)
$ pit t -m -p 2
moved task 1: from project 1 to project 2
$ pit p 2
1: (mike) |current| My very first project (2 tasks)
* 2: (mike) |backlog| My second project (1 task)
$ pit p -d
deleted note 1: Sample note for task #1 (task 1)
deleted task 1: My very first task with 1 note (project: 2)
deleted project 2: My second project with 1 task
$ pit log
Aug 22, 2010 14:30 (mike): Initialized pit
Aug 22, 2010 14:31 (mike): created project 1: My very first project (status: active)
Aug 22, 2010 14:31 (mike): created project 2: My second project (status: backlog)
Aug 22, 2010 14:31 (mike): updated project 1: My very first project (status: current)
Aug 22, 2010 14:31 (mike): created task 1: My very first task (status: open, priority: normal, project: 1)
Aug 22, 2010 14:31 (mike): created task 2: My second task (status: new, priority: high, project: 1)
Aug 22, 2010 14:31 (mike): created task 3: My third task (status: open, priority: low, time: 4:00, project: 1)
Aug 22, 2010 14:32 (mike): updated task 3: My third task (status: new)
Aug 22, 2010 14:32 (mike): updated task 1: My very first task (date: Oct 10, 2010)
Aug 22, 2010 14:32 (mike): created note 1: Sample note for task #1 (task 1)
Aug 22, 2010 14:33 (mike): moved task 1: from project 1 to project 2
Aug 22, 2010 14:33 (mike): deleted note 1: Sample note for task #1 (task 1)
Aug 22, 2010 14:33 (mike): deleted task 1: My very first task with 1 note (project: 2)
Aug 22, 2010 14:33 (mike): deleted project 2: My second project with 1 task
### Git Integration ### ### Git Integration ###
Pit distribution comes with tools/commit-msg file. Copy this file to Pit distribution comes with tools/commit-msg file. Copy this file to
.git/hooks/commit-msg and make it executable: .git/hooks/commit-msg and make it executable:
@@ -141,10 +58,10 @@ Pit distribution comes with tools/commit-msg file. Copy this file to
$ cp ~/pit/tools/commit-msg .git/hooks $ cp ~/pit/tools/commit-msg .git/hooks
$ chmod +x .git/hooks/commit-msg $ chmod +x .git/hooks/commit-msg
Create git branch using task number as a branch name. Now every time commit to the branch Create git branch using task number as a branch name. Now on every commit to
the hook will prompt you to update task status. The hook appends Pit task number to the the branch the hook will prompt you to update task status. The hook appends
commit message, updates Pit task status, and creates task note with the commit massage. Pit task number to the commit message, updates Pit task status, and creates
For example: task note with the commit massage. For example:
$ git checkout -b 2 $ git checkout -b 2
Switched to a new branch '2' Switched to a new branch '2'
@@ -166,6 +83,7 @@ For example:
create mode 100644 README create mode 100644 README
### Tips ### ### Tips ###
A few tips to get you going:
# Changing default Pit file name: define PITFILE environment variable. # Changing default Pit file name: define PITFILE environment variable.
$ pit init $ pit init
@@ -173,7 +91,7 @@ For example:
$ export PITFILE="~/pit.db" $ export PITFILE="~/pit.db"
$ pit init $ pit init
Created empty /Users/mdvorkin/pit.db Created empty /Users/mike/pit.db
# Displaying last 10 lines of pit log in reverse order: # Displaying last 10 lines of pit log in reverse order:
$ pit log|tail -10|sed -n '1!G;h;$p' $ pit log|tail -10|sed -n '1!G;h;$p'
@@ -181,6 +99,93 @@ For example:
# Displaying tasks within certain date range: # Displaying tasks within certain date range:
$ pit task -q -d "Jan 1" -D "Sep 1" $ pit task -q -d "Jan 1" -D "Sep 1"
# Displaying tasks with certain time range:
$ pit task -q -t 0:30 -T 8:00
### Sample Pit session ###
$ pit init
Created empty /Users/mike/.pit
$ pit project -c "My very first project"
created project 1: My very first project (status: active)
$ pit project -c "My second project" -s backlog
created project 2: My second project (status: backlog)
$ pit project
1: (mike) |active | My very first project (0 tasks)
* 2: (mike) |backlog| My second project (0 tasks)
$ pit project -e 1 -s current
updated project 1: My very first project (status: current)
$ pit project
* 1: (mike) |current| My very first project (0 tasks)
2: (mike) |backlog| My second project (0 tasks)
$ pit task -c "My very first task"
created task 1: My very first task (status: open, priority: normal, project: 1)
$ pit task -c "My second task" -s new -p high
created task 2: My second task (status: new, priority: high, project: 1)
$ pit task -c "My third task" -p low -t 4:00
created task 3: My third task (status: open, priority: low, time: 4:00, project: 1)
$ pit p
* 1: (mike) |current| My very first project (3 tasks)
2: (mike) |backlog| My second project (0 tasks)
$ pit t
1: (mike) |open| |normal| My very first task (0 notes)
2: (mike) |new | |high | My second task (0 notes)
* 3: (mike) |open| |low | 4:00 My third task (0 notes)
$ pit task -e -s new
updated task 3: My third task (status: new)
$ pit task -e 1 -d 10/10
updated task 1: My very first task (date: Oct 10, 2010)
* 1: (mike) |open| |normal| Oct 10, 2010 My very first task (0 notes)
2: (mike) |new | |high | My second task (0 notes)
3: (mike) |new | |low | 4:00 My third task (0 notes)
$ pit note -c "Sample note for task #1"
created note 1: Sample note for task #1 (task 1)
$ pit task -q -s new
2: (mike) |new| |high| My second task (0 notes)
3: (mike) |new| |low | 4:00 My third task (0 notes)
$ pit task -m -p 2
moved task 1: from project 1 to project 2
$ pit project 2
1: (mike) |current| My very first project (2 tasks)
* 2: (mike) |backlog| My second project (1 task)
$ pit project -d
deleted note 1: Sample note for task #1 (task 1)
deleted task 1: My very first task with 1 note (project: 2)
deleted project 2: My second project with 1 task
$ pit log
Aug 22, 2010 14:30 (mike): Initialized pit
Aug 22, 2010 14:31 (mike): created project 1: My very first project (status: active)
Aug 22, 2010 14:31 (mike): created project 2: My second project (status: backlog)
Aug 22, 2010 14:31 (mike): updated project 1: My very first project (status: current)
Aug 22, 2010 14:31 (mike): created task 1: My very first task (status: open, priority: normal, project: 1)
Aug 22, 2010 14:31 (mike): created task 2: My second task (status: new, priority: high, project: 1)
Aug 22, 2010 14:31 (mike): created task 3: My third task (status: open, priority: low, time: 4:00, project: 1)
Aug 22, 2010 14:32 (mike): updated task 3: My third task (status: new)
Aug 22, 2010 14:32 (mike): updated task 1: My very first task (date: Oct 10, 2010)
Aug 22, 2010 14:32 (mike): created note 1: Sample note for task #1 (task 1)
Aug 22, 2010 14:33 (mike): moved task 1: from project 1 to project 2
Aug 22, 2010 14:33 (mike): deleted note 1: Sample note for task #1 (task 1)
Aug 22, 2010 14:33 (mike): deleted task 1: My very first task with 1 note (project: 2)
Aug 22, 2010 14:33 (mike): deleted project 2: My second project with 1 task
### License ### ### License ###
Copyright (c) 2010 Michael Dvorkin Copyright (c) 2010 Michael Dvorkin