todo-curses 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c166d1f63bb69288c9fc8fd9202604bb530b720
4
- data.tar.gz: e6e0d39da19c4ee576932c0ea29be00db4f49bf9
3
+ metadata.gz: 364b06f70215a62401102eb261da618bb3266e55
4
+ data.tar.gz: c714802c916233c242d6de543b9fa23d5bb968bb
5
5
  SHA512:
6
- metadata.gz: 5e714b8dfd48b0227b65e723bbda437c01897d449131a05f345bfaa56d23ea9cb809556909f1a255858c9f0757371d5b09d0a997dd18c507cf0910547cca3b7a
7
- data.tar.gz: a4fab4f33b115301b4a49999515f90a84a2c1a75e4b33c713e2f74755f065b5d8c0c9a58881298d90b3b66a0aa7f502cdc8719fe9d15a971cb813cf1eae53b2e
6
+ metadata.gz: e7b253fd3d83971f390fa44d1d4587d63eda1496246a0a6bddc939533f393edfc1182f6cb6384db45b4538ef6cdb0f4a918b3697bae8b9d0033d4d9a6dde9a92
7
+ data.tar.gz: 1afe50ddf112f801d31ac13afdcff4f2bad559bf76d8a571f968fac4847e3eec1453c5d66765e611b4621c200687dec453f5da6d603c8aab4d07c5b5c1df7f36
data/.gitignore CHANGED
@@ -3,3 +3,4 @@ todo.txt.bak
3
3
  done.txt
4
4
  log.txt
5
5
  *.gem
6
+ results.html
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,34 @@
1
+ # Contributing
2
+
3
+ If you find this app useful, please consider contributing to its
4
+ development. There are plenty of wish-list features in the
5
+ [bug tracker][bugtracker].
6
+
7
+ To get started, fork the repo, have a look around, and try building
8
+ the gem:
9
+
10
+ gem build todo-curses.gemspec
11
+
12
+ This should succeed.
13
+
14
+ Then, [find an issue][bugtracker] (or log one) and add a comment saying that
15
+ you'd like to work on it.
16
+ (So that we don't end up with duplicate effort.)
17
+
18
+ ## Developing
19
+
20
+ To make life a little easier, I've set up some Rake tasks.
21
+ If you create a `todo.txt.bak` file, you can run `rake reset`, which
22
+ will copy it into `todo.txt`. Then you can run `rake` and it will
23
+ open the app on this file.
24
+
25
+ ## Submitting
26
+
27
+ Once it looks good, write up a [good commit message][commit].
28
+ Push to your fork and submit a pull request. Be sure to mention
29
+ the issue number you were working on in the bug tracker so that
30
+ they're linked up.
31
+
32
+ [bugtracker]: https://github.com/lorentrogers/jekylljournal/issues
33
+ [commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
34
+
data/Gemfile CHANGED
@@ -1,7 +1,2 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
-
4
- gem 'rake', '~> 11.1', '>= 11.1.2'
5
- gem 'gli', '~> 2.13', '>= 2.13.4'
6
- gem 'ncursesw', '~> 1.4', '>= 1.4.9'
7
-
data/Gemfile.lock CHANGED
@@ -1,8 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- todo-curses (0.0.3)
5
- gli (= 2.13.4)
4
+ todo-curses (0.0.4)
5
+ methadone (~> 1.9, >= 1.9.2)
6
+ ncursesw (~> 1.4, >= 1.4.9)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
@@ -14,6 +15,7 @@ GEM
14
15
  ffi (~> 1.9.10)
15
16
  rspec-expectations (>= 2.99)
16
17
  thor (~> 0.19)
18
+ ast (2.2.0)
17
19
  builder (3.2.2)
18
20
  childprocess (0.5.9)
19
21
  ffi (~> 1.0, >= 1.0.11)
@@ -32,29 +34,46 @@ GEM
32
34
  diff-lcs (1.2.5)
33
35
  ffi (1.9.10)
34
36
  gherkin (3.2.0)
35
- gli (2.13.4)
36
37
  json (1.8.3)
38
+ methadone (1.9.2)
39
+ bundler
37
40
  multi_json (1.11.2)
38
41
  multi_test (0.1.2)
39
42
  ncursesw (1.4.9)
40
- rake (11.1.2)
43
+ parser (2.3.0.7)
44
+ ast (~> 2.2)
45
+ power_assert (0.2.7)
46
+ powerpack (0.1.1)
47
+ rainbow (2.1.0)
48
+ rake (10.5.0)
41
49
  rdoc (4.2.2)
42
50
  json (~> 1.4)
43
51
  rspec-expectations (3.4.0)
44
52
  diff-lcs (>= 1.2.0, < 2.0)
45
53
  rspec-support (~> 3.4.0)
46
54
  rspec-support (3.4.1)
55
+ rubocop (0.39.0)
56
+ parser (>= 2.3.0.7, < 3.0)
57
+ powerpack (~> 0.1)
58
+ rainbow (>= 1.99.1, < 3.0)
59
+ ruby-progressbar (~> 1.7)
60
+ unicode-display_width (~> 1.0, >= 1.0.1)
61
+ ruby-progressbar (1.7.5)
62
+ test-unit (3.1.8)
63
+ power_assert
47
64
  thor (0.19.1)
65
+ unicode-display_width (1.0.2)
48
66
 
49
67
  PLATFORMS
50
68
  ruby
51
69
 
52
70
  DEPENDENCIES
53
- aruba
54
- gli (~> 2.13, >= 2.13.4)
55
- ncursesw (~> 1.4, >= 1.4.9)
56
- rake (~> 11.1, >= 11.1.2)
57
- rdoc
71
+ aruba (~> 0.14.1)
72
+ bundler (~> 1.11)
73
+ rake (~> 10.0)
74
+ rdoc (~> 4.2, >= 4.2.2)
75
+ rubocop (~> 0.39.0)
76
+ test-unit (~> 3.1, >= 3.1.8)
58
77
  todo-curses!
59
78
 
60
79
  BUNDLED WITH
data/README.md ADDED
@@ -0,0 +1,120 @@
1
+ # TodoCurses
2
+
3
+ A curses-based application for managing todo.txt files.
4
+
5
+ ![Todo-Curses demo screen capture](
6
+ https://raw.githubusercontent.com/lorentrogers/todo-curses/master/images/todo-curses-demo.gif)
7
+
8
+ A lot of the features are based on how
9
+ [todotxt.net](todotxt.net)
10
+ handles things. I really liked the overall design of the application,
11
+ just not the fact that it didn't run in my linux terminal. To solve
12
+ this, I decided to roll my own using Ruby and Ncurses. There was already
13
+ a robust library for handling todo.txt files, and Ncurses was something
14
+ I'd been meaning to learn for a while.
15
+
16
+ No doubt there's a ton of nasty code in here. I'm sure there's a lot
17
+ that can be refactored; pull requests welcome!
18
+
19
+ ![Gem Version](https://badge.fury.io/rb/todo-curses.svg)
20
+
21
+ [Gem available on Rubygems.org](https://rubygems.org/gems/todo-curses)
22
+
23
+ [Source on github.com](https://github.com/lorentrogers/todo-curses)
24
+
25
+ ## Installation
26
+
27
+ Grab the gem:
28
+
29
+ gem install todo-curses
30
+
31
+ Then you'll probably want to make an alias in your .\*rc file. Here's
32
+ mine:
33
+
34
+ alias tt#"todo-curses list \~/dev/todo/todo.txt"
35
+
36
+ ## Current features
37
+
38
+ - Open todo.txt files and view a scrollable list of items
39
+ - Move to the next item with `j`
40
+ - Move to the prev item with `k`
41
+ - Create new items with `n`
42
+ - Toggle done / not done state with `x`
43
+ - Move priority down with `shift+j`
44
+ - Move priority up with `shift+k`
45
+ - Completed tasks are archived to done.txt on exit
46
+
47
+ ## Planned features
48
+
49
+ - Safer file handling (confirmations, errors, etc.)
50
+ - Use ctrl instead of shift for priority change
51
+ - Color code priorities
52
+ - Add a spacer between priority groups
53
+ - Priority view with `ctrl+1`
54
+ - Project view with `ctrl+2`
55
+ - Strip out application wrapper; not needed
56
+ - Prep for release as a gem
57
+ - If no argument is given, open the default file. Default tbd.
58
+
59
+ ## Ideas for later
60
+
61
+ - Shift+J: Cycle through displays (Priority, project, etc.)
62
+ - F: filter tasks (free-text, one filter condition per line)
63
+ - T: append text to selected tasks
64
+ - O or Ctrl+O: open todo.txt file
65
+ - C or Ctrl+N: new todo.txt file
66
+
67
+ ## Things not included
68
+
69
+ - A: archive tasks
70
+ - Ctrl+C: copy task to clipboard
71
+ - Ctrl+Shift+C: copy task to edit field
72
+ - Win+Alt+T: hide/unhide windows
73
+ - 0: clear filter
74
+ - 1-9: apply numbered filter preset
75
+
76
+ ## Keyboard shortcut ideas
77
+
78
+ - N: new task
79
+ - J: next task
80
+ - K: prev task
81
+ - X: toggle task completion
82
+ - D or Del or Backspace: delete task (with confirmation)
83
+ - E or F2: update task
84
+ - I: set priority
85
+ - . or F5: reload tasks from file
86
+ - ?: show help
87
+ - Shift+K: increase priority
88
+ - Shift+J: decrease priority
89
+ - Alt+Left/Right: clear priority
90
+ - Ctrl+Alt+Up: increase due date by 1 day
91
+ - Ctrl+Alt+Down: decrease due date by 1 day
92
+ - Ctrl+Alt+Left/Right: remove due date
93
+
94
+ ## Development
95
+
96
+ To release a new version, update
97
+ the version number in `version.rb`, and then run
98
+ `bundle exec rake release`, which will create a git tag for the version,
99
+ push git commits and tags, and push the `.gem`
100
+ file to [rubygems.org](https://rubygems.org).
101
+ After checking out the repo, run `bin/setup` to install dependencies.
102
+ You can also run `bin/console` for an interactive prompt that
103
+ will allow you to experiment.
104
+
105
+ To install this gem onto your local machine, run `bundle exec rake install`.
106
+
107
+ ## License
108
+
109
+ This program is free software: you can redistribute it and/or modify
110
+ it under the terms of the GNU General Public License as published by
111
+ the Free Software Foundation, either version 3 of the License, or
112
+ (at your option) any later version.
113
+
114
+ This program is distributed in the hope that it will be useful,
115
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
116
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
117
+ GNU General Public License for more details.
118
+
119
+ You should have received a copy of the GNU General Public License
120
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
data/README.rdoc CHANGED
@@ -1,101 +1,19 @@
1
- = TODO-Curses
1
+ = todo-curses - DESCRIBE YOUR GEM
2
2
 
3
- This is a super crude first pass at a terminal application for
4
- todo.txt files. A lot of the features are based on how
5
- {todotxt.net}[todotxt.net] handles things. I really liked the overall
6
- design of the application, just not the fact that it didn't run in my
7
- linux terminal. To solve this, I decided to roll my own using Ruby and
8
- Ncurses. There was already a pretty robust library for handling todo.txt
9
- files, and Ncurses was something I'd been meaning to learn for a while.
3
+ Author:: YOUR NAME (YOUR EMAIL)
4
+ Copyright:: Copyright (c) 2016 YOUR NAME
10
5
 
11
- No doubt there's a ton of nasty code in here. Please help me along if you're
12
- interested. I'm sure there's a lot that can be refactored.
13
6
 
14
- {<img src="https://badge.fury.io/rb/todo-curses.svg" alt="Gem Version" />}[https://badge.fury.io/rb/todo-curses]
7
+ DESCRIBE YOUR GEM HERE
15
8
 
16
- {Gem available on Rubygems.org}[https://rubygems.org/gems/todo-curses]
9
+ == Links
17
10
 
18
- {Source on github.com}[https://github.com/lorentrogers/todo-curses]
11
+ * {Source on Github}[LINK TO GITHUB]
12
+ * RDoc[LINK TO RDOC.INFO]
19
13
 
20
- == Installation
14
+ == Install
21
15
 
22
- Grab the gem:
16
+ == Examples
23
17
 
24
- gem install todo-curses
18
+ == Contributing
25
19
 
26
- Then you'll probably want to make an alias in your .*rc file. Here's mine:
27
-
28
- alias tt="todo-curses list ~/dev/todo/todo.txt"
29
-
30
- == Current features
31
-
32
- - Open todo.txt files and view a scrollable list of items
33
- - Move to the next item with `j`
34
- - Move to the prev item with `k`
35
- - Create new items with `n`
36
- - Toggle done / not done state with `x`
37
- - Move priority down with `shift+j`
38
- - Move priority up with `shift+k`
39
- - Completed tasks are archived to done.txt on exit
40
-
41
- == Planned features
42
-
43
- - Safer file handling (confirmations, errors, etc.)
44
- - Use ctrl instead of shift for priority change
45
- - Color code priorities
46
- - Add a spacer between priority groups
47
- - Priority view with `ctrl+1`
48
- - Project view with `ctrl+2`
49
- - Strip out application wrapper; not needed
50
- - Prep for release as a gem
51
- - If no argument is given, open the default file. Default tbd.
52
-
53
- == Ideas for later
54
-
55
- Shift+J: Cycle through displays (Priority, project, etc.)
56
- F: filter tasks (free-text, one filter condition per line)
57
- T: append text to selected tasks
58
- O or Ctrl+O: open todo.txt file
59
- C or Ctrl+N: new todo.txt file
60
-
61
- == Things not included
62
-
63
- A: archive tasks
64
- Ctrl+C: copy task to clipboard
65
- Ctrl+Shift+C: copy task to edit field
66
- Win+Alt+T: hide/unhide windows
67
- 0: clear filter
68
- 1-9: apply numbered filter preset
69
-
70
- == Keyboard shortcut ideas
71
-
72
- N: new task
73
- J: next task
74
- K: prev task
75
- X: toggle task completion
76
- D or Del or Backspace: delete task (with confirmation)
77
- E or F2: update task
78
- I: set priority
79
- . or F5: reload tasks from file
80
- ?: show help
81
- Shift+K: increase priority
82
- Shift+J: decrease priority
83
- Alt+Left/Right: clear priority
84
- Ctrl+Alt+Up: increase due date by 1 day
85
- Ctrl+Alt+Down: decrease due date by 1 day
86
- Ctrl+Alt+Left/Right: remove due date
87
-
88
- == License
89
-
90
- This program is free software: you can redistribute it and/or modify
91
- it under the terms of the GNU General Public License as published by
92
- the Free Software Foundation, either version 3 of the License, or
93
- (at your option) any later version.
94
-
95
- This program is distributed in the hope that it will be useful,
96
- but WITHOUT ANY WARRANTY; without even the implied warranty of
97
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
98
- GNU General Public License for more details.
99
-
100
- You should have received a copy of the GNU General Public License
101
- along with this program. If not, see <http://www.gnu.org/licenses/>.
data/Rakefile CHANGED
@@ -1,44 +1,81 @@
1
+ def dump_load_path
2
+ puts $LOAD_PATH.join("\n")
3
+ found = nil
4
+ $LOAD_PATH.each do |path|
5
+ if File.exists?(File.join(path,"rspec"))
6
+ puts "Found rspec in #{path}"
7
+ if File.exists?(File.join(path,"rspec","core"))
8
+ puts "Found core"
9
+ if File.exists?(File.join(path,"rspec","core","rake_task"))
10
+ puts "Found rake_task"
11
+ found = path
12
+ else
13
+ puts "!! no rake_task"
14
+ end
15
+ else
16
+ puts "!!! no core"
17
+ end
18
+ end
19
+ end
20
+ if found.nil?
21
+ puts "Didn't find rspec/core/rake_task anywhere"
22
+ else
23
+ puts "Found in #{path}"
24
+ end
25
+ end
26
+ require 'bundler'
1
27
  require 'rake/clean'
2
- require 'rubygems'
3
- require 'rubygems/package_task'
4
- require 'rdoc/task'
28
+
29
+ require 'rake/testtask'
30
+ require 'rubocop/rake_task'
31
+
5
32
  require 'cucumber'
6
33
  require 'cucumber/rake/task'
7
- Rake::RDocTask.new do |rd|
8
- rd.main = "README.rdoc"
9
- rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
10
- rd.title = 'Your application title'
11
- end
34
+ gem 'rdoc' # we need the installed RDoc gem, not the system one
35
+ require 'rdoc/task'
36
+
37
+ include Rake::DSL
38
+
39
+ Bundler::GemHelper.install_tasks
12
40
 
13
- spec = eval(File.read('todo.gemspec'))
14
41
 
15
- Gem::PackageTask.new(spec) do |pkg|
42
+ Rake::TestTask.new do |t|
43
+ t.pattern = 'test/tc_*.rb'
16
44
  end
45
+
46
+
17
47
  CUKE_RESULTS = 'results.html'
18
48
  CLEAN << CUKE_RESULTS
19
- desc 'Run features'
20
49
  Cucumber::Rake::Task.new(:features) do |t|
21
- opts = "features --format html -o #{CUKE_RESULTS} --format progress -x"
22
- opts += " --tags #{ENV['TAGS']}" if ENV['TAGS']
23
- t.cucumber_opts = opts
50
+ t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty --no-source -x"
24
51
  t.fork = false
25
52
  end
26
53
 
27
- desc 'Run features tagged as work-in-progress (@wip)'
28
- Cucumber::Rake::Task.new('features:wip') do |t|
29
- tag_opts = ' --tags ~@pending'
30
- tag_opts = ' --tags @wip'
31
- t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format pretty -x -s#{tag_opts}"
32
- t.fork = false
33
- end
54
+ Rake::RDocTask.new do |rd|
34
55
 
35
- task :cucumber => :features
36
- task 'cucumber:wip' => 'features:wip'
37
- task :wip => 'features:wip'
38
- require 'rake/testtask'
39
- Rake::TestTask.new do |t|
40
- t.libs << "test"
41
- t.test_files = FileList['test/*_test.rb']
56
+ rd.main = "README.rdoc"
57
+
58
+ rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
42
59
  end
43
60
 
44
61
  task :default => [:test,:features]
62
+
63
+ # Run the test application
64
+ desc 'run'
65
+ task :run do
66
+ sh 'bundle exec bin/todo-curses list todo.txt'
67
+ end
68
+
69
+ # Reset the testing todo.txt file, if you have one.
70
+ desc 'reset'
71
+ task :reset do
72
+ sh 'cp todo.txt.bak todo.txt'
73
+ end
74
+
75
+ # Easy way to rubocop the project
76
+ desc 'Lint Ruby'
77
+ RuboCop::RakeTask.new(:rubocop) do |t|
78
+ t.patterns = ['bin/**/*.rb', 'lib/**/*.rb']
79
+ end
80
+
81
+ task default: :run