diff options
-rw-r--r-- | README.md | 1 | ||||
-rwxr-xr-x | notagain | 2 | ||||
-rwxr-xr-x | notyet | 6 | ||||
-rwxr-xr-x | ny2html | 3 |
4 files changed, 7 insertions, 5 deletions
diff --git a/README.md b/README.md index 08697ee..56432cd 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Tasks can have four different states, represented by the first non-whitespace character of the line: * Open tasks: `-` +* Started tasks (waiting for / assigned to other people): `*` * Maybe tasks: `?` * Finished tasks: `x` * WONTFIX tasks (tasks you decided not to do): `X` diff --git a/notagain b/notagain index 6c474c8..faa40b4 100755 --- a/notagain +++ b/notagain @@ -10,7 +10,7 @@ def parse(io, filename=nil) todos = [Entry.new(-1, "/", "", nil, [])] while line = io.gets - if line =~ /\A(?:\s*(?:#|\/\/)\s)?(\s*)([-xX?])\s+(.*)/ + if line =~ /\A(?:\s*(?:#|\/\/)\s)?(\s*)([-xX?*])\s+(.*)/ force = nil i, state, desc = $1.size, $2, $3 diff --git a/notyet b/notyet index 76d345f..5b8b894 100755 --- a/notyet +++ b/notyet @@ -82,7 +82,7 @@ class Entry < Struct.new(:depth, :state, :desc, :file, :line, :children) end def force(state) - self.state = state unless "xX?".index(self.state) + self.state = state unless "xX?*".index(self.state) children.each { |c| c.force(state) } end @@ -139,7 +139,7 @@ def parse(io, filename=nil) fname, lineno = filename, io.lineno end - if line =~ /\A(?:\s*(?:#|\/\/)\s)?(\s*)([-xX?])\s+(.*)/ + if line =~ /\A(?:\s*(?:#|\/\/)\s)?(\s*)([-xX?*])\s+(.*)/ i, state, desc = $1.size, $2, $3 while i <= todos.last.depth todos.pop @@ -235,7 +235,7 @@ t.stat t.filter(ARGV) if count_only - puts "#{t.count("xX")}/#{t.count("-xX")}" + puts "#{t.count("xX")}/#{t.count("-xX*")}" exit end diff --git a/ny2html b/ny2html index 8bf7279..e23a08f 100755 --- a/ny2html +++ b/ny2html @@ -10,7 +10,7 @@ def parse(io, filename=nil) todos = [Entry.new(-1, "/", "", [])] while line = io.gets - if line =~ /\A(?:\s*(?:#|\/\/)\s)?(\s*)([-xX?])\s+(.*)/ + if line =~ /\A(?:\s*(?:#|\/\/)\s)?(\s*)([-xX?*])\s+(.*)/ i, state, desc = $1.size, $2, $3 while i <= todos.last.depth todos.pop @@ -32,6 +32,7 @@ def render(e) when "x"; puts "☑" when "X"; puts "☒" when "?"; puts "?" # or 2370 + when "*"; puts "⊞" end puts e.desc.sub(/(^\s*)\(([A-Z])\)/) { $1 + "<b>" + [$2.ord + 9333].pack("U") + "</b>" }. gsub(/(?<=\s)@\w+/, '<i>\&</i>') |