Skip to content

Commit

Permalink
changed name to j
Browse files Browse the repository at this point in the history
Signed-off-by: Akash Manohar J <akash@akash.im>
  • Loading branch information
HashNuke committed Feb 21, 2011
1 parent 6779a6d commit 9c05a3b
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 40 deletions.
16 changes: 8 additions & 8 deletions README.md
@@ -1,7 +1,7 @@
t - task manager
j - task manager
=================

t is a simple command-line task manager written in Ruby. Inspired by [t-](http://www.penzba.co.uk/t-/t-.html?HN1) which was written in Python.
j is a simple command-line task manager written in Ruby. Inspired by [t-](http://www.penzba.co.uk/t-/t-.html?HN1) which was written in Python.

Install:
--------
Expand All @@ -12,15 +12,15 @@ Usage:
-------

* List todo tasks
t
j
* List all tasks
t -a
j -a
* List done tasks
t -d
j -d
* Mark a task as done
t -m <key>
j -m <key>
* Remove a task
t -r <key>
j -r <key>
* Clear task list
t -c
j -c

20 changes: 20 additions & 0 deletions bin/j
@@ -0,0 +1,20 @@
#! /usr/bin/env ruby
require 'rainbow'
require File.expand_path('../lib/j', File.dirname(__FILE__))


j = J.new

if ARGV.count == 0
j.listTasks
elsif ARGV.count == 1
j.listTasks(:done) if ARGV[0] == "-d"
j.listTasks(:all) if ARGV[0] == "-a"
j.clearList if ARGV[0]=="-c"
elsif ARGV.count == 2 and ARGV.first == "-m"
j.markTask ARGV[1]
elsif ARGV.count == 2 and ARGV.first == "-r"
j.deleteTask ARGV[1]
else
j.addTask ARGV.join(" ")
end
20 changes: 0 additions & 20 deletions bin/t

This file was deleted.

12 changes: 6 additions & 6 deletions how-does-it-work.md
@@ -1,22 +1,22 @@
HowItWorks
---------------

Checks for a .t.list file in $HOME
Checks for a .todo file in $HOME
if not present create it

* list (todo) tasks (t)
* list (todo) tasks (j)
get the contents of the file by line and push to an array
and print each todo task in the format: <key> | <status> | <task>
Option -a to list all tasks
Option -b to list done tasks only
Option -d to list done tasks only

* create task (t <string>)
* create task (j <string>)
just append the new task to the file in this format
<key> | <status> | <task>

* Mark as done (t -m <key>)
* Mark as done (j -m <key>)
find dump tasks to array, delete that particular task and write back
show message. Else show error

* clear list (t -c)
* clear list (j -c)
delete the .t.list file
8 changes: 4 additions & 4 deletions t.gemspec → j.gemspec
@@ -1,12 +1,12 @@
Gem::Specification.new do |s|
s.name = "t"
s.version = "0.4"
s.name = "j"
s.version = "0.4.1"
s.platform = Gem::Platform::RUBY
s.authors = ["Akash Manohar"]
s.email = ["akash@akash.im"]
s.homepage = "http://akash.im"
s.summary = "T task manager - v" + s.version.to_s
s.description = %q{T is a simple command-line task manager. Inspired by t- task manager which is written in python}
s.summary = "J task manager - v" + s.version.to_s
s.description = %q{J is a simple command-line task manager. Inspired by t- task manager which is written in python}

s.add_dependency "rainbow", "~> 1.1.1"

Expand Down
4 changes: 2 additions & 2 deletions lib/t.rb → lib/j.rb
@@ -1,9 +1,9 @@
require 'etc'

class T
class J
def initialize
userHome = Etc.getpwuid.dir
@tFilePath = userHome << '/' << ".t.list"
@tFilePath = userHome << '/' << ".todo"

end

Expand Down

0 comments on commit 9c05a3b

Please sign in to comment.