worque 0.2.0 → 0.3.0
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 +4 -4
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +32 -13
- data/lib/worque/cli.rb +1 -0
- data/lib/worque/command/todo/action.rb +5 -0
- data/lib/worque/command/todo/options.rb +2 -0
- data/lib/worque/utils/command.rb +2 -2
- data/lib/worque/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60562e0093e4654d851b4a146635ca10bb1f2e83
|
4
|
+
data.tar.gz: a4abe01f360163aa79eb65ba6f9121b3e75cbd40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abf92f4bf7c691efc18a48f581d14d8ddec88b8fcce0df37ddd74cd7ccf8bae9fcc0c7a0bf618dd85ea666a93886d3866b0dd8b9428e9bd89ba91da25ce66405
|
7
|
+
data.tar.gz: c2a90283eb97d211cd01e991e7ffc21d6261612f30178aa081270d81caa5ee01a0c1780c55197c8b7ac54e42cb7f0c5ac66a5b668fa4891e3caded9bd3d21efd
|
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -26,11 +26,6 @@ Install it by
|
|
26
26
|
|
27
27
|
$ gem install worque
|
28
28
|
|
29
|
-
Or, if you're using RVM and want the command available system-wide while keeping it in its own gemset
|
30
|
-
|
31
|
-
$ rvm default@worque --create do gem install worque
|
32
|
-
$ rvm wrapper default@worque --no-prefix worque
|
33
|
-
|
34
29
|
## Quick start guide
|
35
30
|
|
36
31
|
### CLI
|
@@ -75,13 +70,36 @@ worque todo --for=yesterday
|
|
75
70
|
# This will jump back to Friday's note if it's Monday today!
|
76
71
|
```
|
77
72
|
|
78
|
-
|
73
|
+
If you live in the future
|
79
74
|
|
80
75
|
```sh
|
81
76
|
worque todo --for=tomorrow
|
82
77
|
# ~/notes/checklist-2016-07-20.md
|
83
78
|
```
|
84
79
|
|
80
|
+
If you want to start from a default template
|
81
|
+
|
82
|
+
```sh
|
83
|
+
echo <<-EOF
|
84
|
+
List of things I need to do
|
85
|
+
|
86
|
+
* ......
|
87
|
+
* ...
|
88
|
+
|
89
|
+
Happy hacking
|
90
|
+
EOF >> /path/to/my/template
|
91
|
+
|
92
|
+
worque todo --template-path=/path/to/my/template
|
93
|
+
# ~/notes/checklist-2016-07-18.md
|
94
|
+
cat ~/notes/checklist-2016-07-18.md
|
95
|
+
> List of things I need to do
|
96
|
+
>
|
97
|
+
> * ......
|
98
|
+
> * ...
|
99
|
+
>
|
100
|
+
> Happy hacking
|
101
|
+
```
|
102
|
+
|
85
103
|
If you're kind of nerd and you have no life. You would rather work over the weekend than hanging out with folks, so you should enable the **hardcore** mode which will stop skipping weekend for you.
|
86
104
|
|
87
105
|
```sh
|
@@ -101,20 +119,21 @@ vim $(worque todo --for yesterday)
|
|
101
119
|
cat $(worque todo --for=yesterday) | grep pending
|
102
120
|
```
|
103
121
|
|
104
|
-
Personally I
|
105
|
-
file when I type `today`
|
122
|
+
Personally I like to create a shell function `today` like this, so vim will automatically open the file when I type `today`
|
106
123
|
|
107
124
|
```sh
|
108
|
-
|
109
|
-
|
125
|
+
today () { vim $(worque todo); }
|
126
|
+
ytd () { vim $(worque todo --for=yesterday); }
|
110
127
|
```
|
111
128
|
|
112
129
|
#### `worque push`
|
113
130
|
|
114
|
-
Please remember to add
|
131
|
+
Please remember to add your [slack api token](https://api.slack.com/docs/oauth-test-tokens) to your `~/.worquerc`
|
115
132
|
|
116
|
-
```
|
117
|
-
|
133
|
+
```json
|
134
|
+
{
|
135
|
+
"token": "very-$3Cr3T"
|
136
|
+
}
|
118
137
|
```
|
119
138
|
|
120
139
|
Then the note for today will be automatically posted to the channel specified.
|
data/lib/worque/cli.rb
CHANGED
@@ -20,6 +20,11 @@ module Worque
|
|
20
20
|
Worque::Utils::Command.touch f
|
21
21
|
end
|
22
22
|
|
23
|
+
if options.template_path && File.read(notes_file_path) == ""
|
24
|
+
template = File.read(File.expand_path(options.template_path))
|
25
|
+
Worque::Utils::Command.append_text(notes_file_path, template)
|
26
|
+
end
|
27
|
+
|
23
28
|
if options.append_task
|
24
29
|
Worque::Utils::Command.append_text(notes_file_path, options.append_task)
|
25
30
|
end
|
@@ -8,12 +8,14 @@ module Worque
|
|
8
8
|
attr_accessor :for
|
9
9
|
attr_accessor :append_task
|
10
10
|
attr_writer :skip_weekend
|
11
|
+
attr_reader :template_path
|
11
12
|
|
12
13
|
def initialize(opts)
|
13
14
|
@path = opts[:path]
|
14
15
|
@skip_weekend = opts[:skip_weekend]
|
15
16
|
@for = opts[:for]
|
16
17
|
@append_task = opts[:append_task]
|
18
|
+
@template_path = opts.fetch(:template_path, nil)
|
17
19
|
end
|
18
20
|
|
19
21
|
def skip_weekend?
|
data/lib/worque/utils/command.rb
CHANGED
data/lib/worque/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: worque
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cam Huynh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -102,7 +102,7 @@ executables:
|
|
102
102
|
extensions: []
|
103
103
|
extra_rdoc_files: []
|
104
104
|
files:
|
105
|
-
- LICENSE
|
105
|
+
- LICENSE
|
106
106
|
- README.md
|
107
107
|
- bin/console
|
108
108
|
- bin/worque
|
@@ -117,7 +117,7 @@ files:
|
|
117
117
|
- lib/worque/utils/command.rb
|
118
118
|
- lib/worque/utils/slack.rb
|
119
119
|
- lib/worque/version.rb
|
120
|
-
homepage: https://github.com/
|
120
|
+
homepage: https://github.com/qcam/worque
|
121
121
|
licenses:
|
122
122
|
- MIT
|
123
123
|
metadata:
|
@@ -128,9 +128,9 @@ require_paths:
|
|
128
128
|
- lib
|
129
129
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- - "
|
131
|
+
- - "~>"
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: '0'
|
133
|
+
version: '2.0'
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - ">="
|
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.
|
141
|
+
rubygems_version: 2.5.2
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: Manage your daily working list
|