sculd 0.0.2 → 0.0.3

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.
Files changed (7) hide show
  1. data/CHANGES +3 -1
  2. data/Gemfile +2 -1
  3. data/VERSION +1 -1
  4. data/bin/dates +19 -3
  5. data/lib/sculd/manager.rb +0 -1
  6. data/sculd.gemspec +8 -5
  7. metadata +27 -16
data/CHANGES CHANGED
@@ -1,8 +1,10 @@
1
1
  = sdrt changelog
2
2
 
3
3
  == Master (for 0.0.3)
4
+ * Options -s, -t, -i is made into bin/dates command.
5
+ * Use /usr/bin/env ruby in bin/dates, alternatively to /usr/bin/ruby.
4
6
 
5
- == Version 0.0.2
7
+ == Version 0.0.2 [2012-11-19] released
6
8
  * Dates are changed to be shown in colors.
7
9
  * Dates which has no plan shows '(no plan)'
8
10
 
data/Gemfile CHANGED
@@ -8,8 +8,9 @@ source "http://rubygems.org"
8
8
  group :development do
9
9
  gem "rspec", "~> 2.12.0"
10
10
  gem "rdoc", "~> 3.12"
11
- gem "bundler", "~> 1.2.1"
11
+ gem "bundler", "~> 1.3.5"
12
12
  gem "jeweler", "~> 1.8.4"
13
13
  gem "simplecov", ">= 0"
14
14
  gem "highline", ">= 1.6.15"
15
+ gem "psych", ">= 0"
15
16
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/bin/dates CHANGED
@@ -1,10 +1,21 @@
1
- #! /usr/bin/ruby
1
+ #! /usr/bin/env ruby
2
2
  # coding: utf-8
3
3
 
4
4
  require "date"
5
5
  require "pp"
6
+ require "optparse"
7
+
8
+ ## option analysis
9
+ OPTIONS = {}
10
+ op = OptionParser.new
11
+ op.on("-t time", "--time=val", "Time indication."){|v| OPTIONS[:time] = v}
12
+ op.on("-s string", "--string=val", "String just after DateTime."){|v| OPTIONS[:string] = v}
13
+ op.on("-i num", "--indent=num", "Indicate number of spaces at the beginning."){|v| OPTIONS[:indent] = v.to_i}
14
+ op.parse!(ARGV)
15
+ OPTIONS[:time] ||= ""
16
+ OPTIONS[:string] ||= ""
17
+ OPTIONS[:indent] ||= 0
6
18
 
7
- #WEEKDAYS = %w(日 月 火 水 木 金 土)
8
19
  WEEKDAYS = %w(Sun Mon Tue Wed Thu Fri Sat)
9
20
  TODAY = DateTime.now
10
21
 
@@ -13,6 +24,9 @@ unless ARGV.size == 2
13
24
  puts " e.g., dates 2012-01-26 2012-02-29"
14
25
  puts " e.g., dates 1-26 2-29"
15
26
  puts " e.g., dates '' 29"
27
+ puts " e.g., dates 2012-01-26 2012-02-29 -t 12:30"
28
+ puts " e.g., dates 2012-01-26 2012-02-29 -s '@ string'"
29
+ puts " e.g., dates 2012-01-26 2012-02-29 -i 2"
16
30
  exit
17
31
  end
18
32
 
@@ -35,7 +49,9 @@ end
35
49
  #p from_date, to_date
36
50
  current = from_date
37
51
  while (current <= to_date)
38
- puts current.strftime("[%Y-%m-%d (#{WEEKDAYS[current.wday]})]")
52
+ str = " " * OPTIONS[:indent]
53
+ str += current.strftime("[%Y-%m-%d #{OPTIONS[:time]} (#{WEEKDAYS[current.wday]})]#{OPTIONS[:string]}").sub(" ", " ")
54
+ puts str
39
55
  current += 1
40
56
  end
41
57
 
@@ -7,7 +7,6 @@ require "sculd.rb"
7
7
  require "rubygems"
8
8
  gem "highline"
9
9
  require "highline"
10
- #require "/home/ippei/devel/sculd/lib/sculd.rb"
11
10
 
12
11
  #
13
12
  #
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "sculd"
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["ippei94da"]
12
- s.date = "2012-11-19"
12
+ s.date = "2013-04-18"
13
13
  s.description = "Schedule management system using 'howm' like format. Plans, i.e., schedule(@), reminder(-), deadline(!), and tood(+), make events and tasks. Command 'sculd' can output events on each date and tasks with high priority. "
14
14
  s.email = "ippei94da@gmail.com"
15
15
  s.executables = ["dates", "sculd"]
@@ -65,25 +65,28 @@ Gem::Specification.new do |s|
65
65
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
66
66
  s.add_development_dependency(%q<rspec>, ["~> 2.12.0"])
67
67
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
68
- s.add_development_dependency(%q<bundler>, ["~> 1.2.1"])
68
+ s.add_development_dependency(%q<bundler>, ["~> 1.3.5"])
69
69
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
70
70
  s.add_development_dependency(%q<simplecov>, [">= 0"])
71
71
  s.add_development_dependency(%q<highline>, [">= 1.6.15"])
72
+ s.add_development_dependency(%q<psych>, [">= 0"])
72
73
  else
73
74
  s.add_dependency(%q<rspec>, ["~> 2.12.0"])
74
75
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
75
- s.add_dependency(%q<bundler>, ["~> 1.2.1"])
76
+ s.add_dependency(%q<bundler>, ["~> 1.3.5"])
76
77
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
77
78
  s.add_dependency(%q<simplecov>, [">= 0"])
78
79
  s.add_dependency(%q<highline>, [">= 1.6.15"])
80
+ s.add_dependency(%q<psych>, [">= 0"])
79
81
  end
80
82
  else
81
83
  s.add_dependency(%q<rspec>, ["~> 2.12.0"])
82
84
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
83
- s.add_dependency(%q<bundler>, ["~> 1.2.1"])
85
+ s.add_dependency(%q<bundler>, ["~> 1.3.5"])
84
86
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
85
87
  s.add_dependency(%q<simplecov>, [">= 0"])
86
88
  s.add_dependency(%q<highline>, [">= 1.6.15"])
89
+ s.add_dependency(%q<psych>, [">= 0"])
87
90
  end
88
91
  end
89
92
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sculd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-19 00:00:00.000000000 Z
12
+ date: 2013-04-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &75099820 !ruby/object:Gem::Requirement
16
+ requirement: &81543840 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.12.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *75099820
24
+ version_requirements: *81543840
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rdoc
27
- requirement: &75099330 !ruby/object:Gem::Requirement
27
+ requirement: &81542780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,21 +32,21 @@ dependencies:
32
32
  version: '3.12'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *75099330
35
+ version_requirements: *81542780
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
38
- requirement: &75098960 !ruby/object:Gem::Requirement
38
+ requirement: &81557840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: 1.2.1
43
+ version: 1.3.5
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *75098960
46
+ version_requirements: *81557840
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: jeweler
49
- requirement: &75098570 !ruby/object:Gem::Requirement
49
+ requirement: &81555870 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.8.4
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *75098570
57
+ version_requirements: *81555870
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: simplecov
60
- requirement: &75096840 !ruby/object:Gem::Requirement
60
+ requirement: &81553970 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *75096840
68
+ version_requirements: *81553970
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: highline
71
- requirement: &74600910 !ruby/object:Gem::Requirement
71
+ requirement: &81552290 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,18 @@ dependencies:
76
76
  version: 1.6.15
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *74600910
79
+ version_requirements: *81552290
80
+ - !ruby/object:Gem::Dependency
81
+ name: psych
82
+ requirement: &81550640 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *81550640
80
91
  description: ! 'Schedule management system using ''howm'' like format. Plans, i.e.,
81
92
  schedule(@), reminder(-), deadline(!), and tood(+), make events and tasks. Command
82
93
  ''sculd'' can output events on each date and tasks with high priority. '
@@ -138,7 +149,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
149
  version: '0'
139
150
  segments:
140
151
  - 0
141
- hash: -143096045
152
+ hash: -261038947
142
153
  required_rubygems_version: !ruby/object:Gem::Requirement
143
154
  none: false
144
155
  requirements: