weekly_planner 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 36b78f27f5cd1cfe7a2c177d99e4460d88b4ceee
4
+ data.tar.gz: ebddc614dc6e33093903e61b7fcf71b8c141ff01
5
+ SHA512:
6
+ metadata.gz: 6f378c76f9d5add5b0c2426ce5df660a69307d32398be9f1f43f8bb0e367c2d301f2639d8bff3237421e6a2594be96b67dd6cb0a9a614ae546e5f720ed3795ae
7
+ data.tar.gz: 6b3d239d06aad399fdc4941aae82d84af49647ca5509c822b4d0200aad6c7e37cf0b4355745d40c61e74ace2b2a50e28a76bffb360825ccb918f026fcbd8bfc6
checksums.yaml.gz.sig ADDED
Binary file
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: weekly_planner.rb
4
+
5
+ require 'date'
6
+ require 'dynarex'
7
+
8
+
9
+ class WeeklyPlanner
10
+
11
+ attr_reader :to_s
12
+
13
+ def initialize(filename='weekly-planner.txt', path: '.')
14
+
15
+ @filename, @path = filename, path
16
+
17
+ if File.exists? File.join(path, filename) then
18
+ @to_s = File.read File.join(path, filename)
19
+ else
20
+ @to_s = create()
21
+ end
22
+ end
23
+
24
+ def dx()
25
+ end
26
+
27
+ def save(filename=@filename)
28
+ s = File.basename(filename) + "\n" + @to_s.lines[1..-1].join
29
+ File.write File.join(@path, filename), s
30
+ end
31
+
32
+ private
33
+
34
+ def create()
35
+
36
+ d = DateTime.now
37
+
38
+ def ordinal(n)
39
+ n.to_s + ( (10...20).include?(n) ? 'th' : \
40
+ %w{ th st nd rd th th th th th th }[n % 10] )
41
+ end
42
+
43
+ a = []
44
+ a << "%s, %s %s" % [Date::DAYNAMES[d.wday], ordinal(d.day),
45
+ Date::ABBR_MONTHNAMES[d.month]]
46
+ a += (d+1).upto(d+6).map {|date| Date::ABBR_DAYNAMES[date.wday] }
47
+
48
+ a2 = a.map {|x| "%s\n%s" % [x, '-' * x.length]}
49
+ s = File.basename(@filename) + "\n==================\n\n%s\n\n" %
50
+ [a2.join("\n\n")]
51
+ end
52
+
53
+ def parse()
54
+ end
55
+ end
data.tar.gz.sig ADDED
Binary file
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: weekly_planner
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
+ YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
+ 8ixkARkWAmV1MB4XDTE1MTIwNjIyMDc1NVoXDTE2MTIwNTIyMDc1NVowSDESMBAG
16
+ A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
+ EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
+ ggEBAMeWNQV4PHtuWCyQVAIKVZRjgixBGRPF8wh118QdqAXeLaLOVY8PYjvbr5Nc
19
+ d7+o/uQDhdV70FCqcZUH/1tLWg3LNQI62MdEZbcCet23erb8z2Jjxq5Xdz94zW/x
20
+ zFTcT7XGj8VzsrL3YeO8e1x+ML/64/+5vC5PX0phdcrNmv42qulafH0InvHnaPPd
21
+ hvrPQ0dvh7dGJT0o6z19DK5fKgaMtmrFzIwlkT6XYsSLLr82JFse06O/sspCmJPh
22
+ 0jrteKvYanpnTFOCbJl+9enD6W0plVfi0rsXshIXpFMdZfQlfkUxQxX9hcGV5MOQ
23
+ ODN1OFCcyMRuJ5hbi/CNgUhbmh0CAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
+ DwQEAwIEsDAdBgNVHQ4EFgQUXqVZmK0cjWJ9aA7NFYjocP1sBZswJgYDVR0RBB8w
25
+ HYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1h
26
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAsy/R7cmp
27
+ POscBeMsgK8dZ9ghr5E1c3v2Gevo4xG6l8SXb8pIJ08XYEiIk/M4DI+chKdUcz8P
28
+ IAPZC535o0A+FUBaLepebMHsStuRl8hV0/xU1FtKMsH7MUIDmiC0H7QpjdVuRfwv
29
+ sjWXtNeOt8fCSC546/gJDtrG3POxgIA5Q+gKiP1zBXEnT7DXaNQMK94NdcaT3+I3
30
+ 7TsnRJ55zR6C5kaJHCkhmHjC3CpeNsS9FzraZoVQIwXgh0IF/FdRGuuknsQ0rfX1
31
+ z7gNRJqGU+m6WOC+EaEcNkm4WwRqy2Il3J8DydaFl+h20aqjFe1k7KgLU8qy8jyU
32
+ FlTqE0DQzwY5Dg==
33
+ -----END CERTIFICATE-----
34
+ date: 2015-12-06 00:00:00.000000000 Z
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: dynarex
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - "~>"
41
+ - !ruby/object:Gem::Version
42
+ version: '1.5'
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: 1.5.43
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: '1.5'
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 1.5.43
56
+ description:
57
+ email: james@r0bertson.co.uk
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - lib/weekly_planner.rb
63
+ homepage: https://github.com/jrobertson/weekly_planner
64
+ licenses:
65
+ - MIT
66
+ metadata: {}
67
+ post_install_message:
68
+ rdoc_options: []
69
+ require_paths:
70
+ - lib
71
+ required_ruby_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ requirements: []
82
+ rubyforge_project:
83
+ rubygems_version: 2.4.8
84
+ signing_key:
85
+ specification_version: 4
86
+ summary: The weekly_planner gem primarily creates a weekly-planner.txt template file
87
+ test_files: []
metadata.gz.sig ADDED
@@ -0,0 +1,3 @@
1
+ �#�ɱ�g�^Ed�ы��g�}ے\���r<C�+�- gd�-gKL��(TF�K�ቁ0�+D�B�s�[�r���u���^�
2
+ #8��\kOw�V3c��Jw��wK��떥�G���#9��4Z�М�[24��P~�Ъb�s��so�#*�i����H�����d�uQO��Z�x`�W����Fc��=�_�
3
+ ��Pg�j�