rb-dayone 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +5 -0
- data/README.md +7 -3
- data/bin/dayone +22 -0
- data/lib/rb-dayone.rb +3 -1
- data/rb-dayone.gemspec +1 -1
- data/spec/entry_spec.rb +1 -1
- data/version.txt +1 -1
- metadata +2 -2
data/History.rdoc
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 0.1.7 /
|
2
|
+
|
3
|
+
* The dayone binary can now add entries to your journal
|
4
|
+
* [FIXED] Managed to break the gem's include in 0.1.6, and because I'm a terrible amateur at all this, didn't pick up on it.
|
5
|
+
|
1
6
|
== 0.1.6 / 2012-08-13
|
2
7
|
|
3
8
|
* Updated documentation so YARD would generate nice rdocs
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# rb-dayone
|
2
2
|
|
3
|
-
A means to create DayOne entries in ruby.
|
3
|
+
A means to create DayOne entries in ruby. Also, my first public ruby gem!
|
4
4
|
|
5
5
|
Examples
|
6
6
|
--------
|
@@ -22,6 +22,10 @@ When you're ready to save your entry, just run the `create!` method:
|
|
22
22
|
|
23
23
|
e.create!
|
24
24
|
|
25
|
+
Alternatively, run from the command line:
|
26
|
+
|
27
|
+
dayone add --text "#Hello, world" --starred
|
28
|
+
|
25
29
|
Install
|
26
30
|
-------
|
27
31
|
|
@@ -32,12 +36,12 @@ Author
|
|
32
36
|
|
33
37
|
Original author: Jan-Yves Ruzicka
|
34
38
|
|
35
|
-
|
39
|
+
To do
|
36
40
|
-------
|
37
41
|
|
38
42
|
* Image support
|
39
43
|
* Location support?
|
40
|
-
* Auto-
|
44
|
+
* Auto-journal detection
|
41
45
|
|
42
46
|
License
|
43
47
|
-------
|
data/bin/dayone
CHANGED
@@ -35,4 +35,26 @@ command :set do |c|
|
|
35
35
|
exit 1
|
36
36
|
end
|
37
37
|
end
|
38
|
+
end
|
39
|
+
|
40
|
+
command :add do |c|
|
41
|
+
c.syntax = "add [--text=\"Entry text\"] [--starred]"
|
42
|
+
c.description = "Add an entry to your DayOne journal."
|
43
|
+
c.summary = <<-end
|
44
|
+
Add an entry to your DayOne journal. By default will add an unstarred entry - use the --starred flag to change this.
|
45
|
+
|
46
|
+
If you don't specify the --text tag, it will read text from STDIN and use this as the journal entry.
|
47
|
+
end
|
48
|
+
|
49
|
+
c.option "--text STRING", String, "Specify the journal entry text. If not specified, will read from STDIN"
|
50
|
+
c.option "--starred", "Mark the entry starrd"
|
51
|
+
|
52
|
+
c.action do |args, opts|
|
53
|
+
require 'rb-dayone'
|
54
|
+
entry_text = opts.text || $stdin.read.strip
|
55
|
+
starred = opts.starred
|
56
|
+
|
57
|
+
entry = DayOne::Entry.new entry_text, starred:starred
|
58
|
+
entry.create!
|
59
|
+
end
|
38
60
|
end
|
data/lib/rb-dayone.rb
CHANGED
data/rb-dayone.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
#{'-'*80}
|
21
21
|
Thank you for installing rb-dayone!
|
22
22
|
|
23
|
-
To finish setup, run `dayone
|
23
|
+
To finish setup, run `dayone set location <location>` to specify where your DayOne journal is stored.
|
24
24
|
#{'-'*80}
|
25
25
|
end
|
26
26
|
|
data/spec/entry_spec.rb
CHANGED
data/version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rb-dayone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -54,7 +54,7 @@ post_install_message: ! '-------------------------------------------------------
|
|
54
54
|
Thank you for installing rb-dayone!
|
55
55
|
|
56
56
|
|
57
|
-
To finish setup, run `dayone
|
57
|
+
To finish setup, run `dayone set location <location>` to specify where your DayOne
|
58
58
|
journal is stored.
|
59
59
|
|
60
60
|
--------------------------------------------------------------------------------
|