daily_reflection 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 +7 -0
- checksums.yaml.gz.sig +0 -0
- data/lib/daily_reflection.rb +83 -0
- data.tar.gz.sig +3 -0
- metadata +93 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b39e08fabbe50427fafbb996dc511e55c8e87706426f5fa864450e3d51dc661b
|
4
|
+
data.tar.gz: 5797bfb0cc4f6e9e4c8cc826fa5b60e2797ba3e696dfadf09b7fbafc6791c9d0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0a8e9e9870bc420ac8ca3c60fd032d5c576b1b5597232848b5a6b38d611fa0a027093e6b204246b4f62f5b4f082442a831f865206bb4e99ac4902195e1fcbce7
|
7
|
+
data.tar.gz: 9dc874e37240175906e97cc9818d247180abbadb4163aa85bc03bfc58ac97f5f5cc38413ec1ac66b00775bfd1cd1727dccee8be87b8a6c633a75b51fba8d5d18
|
checksums.yaml.gz.sig
ADDED
Binary file
|
@@ -0,0 +1,83 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# file: daily_reflection.rb
|
4
|
+
|
5
|
+
require 'wiki_md'
|
6
|
+
|
7
|
+
|
8
|
+
class DailyReflection < WikiMd
|
9
|
+
|
10
|
+
attr_accessor :date
|
11
|
+
|
12
|
+
def initialize(s, debug: false, date: Date.today,
|
13
|
+
title: 'My Daily Reflection')
|
14
|
+
|
15
|
+
@date = date
|
16
|
+
super(s, order: 'descending', debug: debug, title: title)
|
17
|
+
|
18
|
+
# if the section for today doesn't exist create it
|
19
|
+
|
20
|
+
create_day() unless found_today()
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
def add_entry(s)
|
25
|
+
|
26
|
+
create_day() unless found_today()
|
27
|
+
|
28
|
+
rx = @dxsx.dx.all.first
|
29
|
+
lines = rx.x.lines
|
30
|
+
lines.insert -3, s + "\n"
|
31
|
+
rx.x = lines.join
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
def find_today()
|
36
|
+
self.find @date.strftime("%-d %b %Y")
|
37
|
+
end
|
38
|
+
|
39
|
+
alias found_today find_today
|
40
|
+
|
41
|
+
def create_day()
|
42
|
+
|
43
|
+
date = @date.strftime("%-d %b %Y")
|
44
|
+
self.create_section "# %s\n\n\n+ %s" % [date, @date.year]
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
def today()
|
49
|
+
|
50
|
+
rx = @dxsx.dx.all.first
|
51
|
+
|
52
|
+
def rx.body()
|
53
|
+
x.lines[1..-2].join.strip
|
54
|
+
end
|
55
|
+
|
56
|
+
def rx.body=(s)
|
57
|
+
text_entry = "%s\n\n%s\n\n%s" % [self.heading, s, self.footer]
|
58
|
+
self.x = text_entry
|
59
|
+
end
|
60
|
+
|
61
|
+
def rx.footer()
|
62
|
+
x.lines.last.chomp
|
63
|
+
end
|
64
|
+
|
65
|
+
def rx.footer=(s)
|
66
|
+
a = x.lines
|
67
|
+
a[-1] = s
|
68
|
+
self.x = a.join
|
69
|
+
end
|
70
|
+
|
71
|
+
def rx.heading()
|
72
|
+
x.lines.first.chomp
|
73
|
+
end
|
74
|
+
|
75
|
+
def rx.tags()
|
76
|
+
footer[1..-1].strip.split
|
77
|
+
end
|
78
|
+
|
79
|
+
rx
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
data.tar.gz.sig
ADDED
@@ -0,0 +1,3 @@
|
|
1
|
+
{��!"�Cn���.fM����E����8F�pv4G�y����I:��zx�����|�{��NU1#y����}3�4Vى��ݬB��3��m���ɉf�p�Y�9�9�;b溍��R�i%�&�)�mk�B��y�U%��rT���Z��;�� �nSP�E��p�b�nRH�g�4~?�V)�9��D��)-�/�B�8^&�&A���lN�bz߫O�?��!�U8���V`�vg3b6��~C�)���^:�6s����,_S� ��D_7j�h�u
|
2
|
+
�$�}�,�w5�j��"TJg)7� '�&շKc�h�Xeh���ό���u�_� <�N"?�=�獱�L��^��Cu�j�j����梿
|
3
|
+
HJSќr��㟭Й>�
|
metadata
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: daily_reflection
|
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
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkwMTA0MTk0MjUxWhcN
|
15
|
+
MjAwMTA0MTk0MjUxWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDf7QjY
|
17
|
+
mabikGCcSndRFpnp3DAZWudwVXASoHUdZrqVBu9U6muVPQ+5KkXidyTsBvNvcToz
|
18
|
+
p5EI8fYPg8o5ekLlH6oGES0NrlMx0+4i2WhvoZbapo19J4Q7I6Lh9tqZNXA26ARk
|
19
|
+
p5mpN9qbsPJLgJ7TV70GxMNMER4G4ngRcV8ApAuIsQhMZPb0RnshMyvHfkzezu8w
|
20
|
+
b26K2ZlqXBEm4MwbHGucY++fv2U9mV2ez6kOM9wBVvmcR3PHHRSNZRWsiCrtiTYJ
|
21
|
+
SA2pqwNIC4xQFdiUuc9Wj1YDeLZSCYOV8JDwlyzcE6Q9CEtXYi77gssAFsFkWblD
|
22
|
+
pZiuJ/V8gGGc01izoyze6S7OyK/sp9egPgoR1J4cNEYN/vX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000 Z
|
39
|
+
dependencies:
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: wiki_md
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0.6'
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 0.6.0
|
50
|
+
type: :runtime
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0.6'
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 0.6.0
|
60
|
+
description:
|
61
|
+
email: james@jamesrobertson.eu
|
62
|
+
executables: []
|
63
|
+
extensions: []
|
64
|
+
extra_rdoc_files: []
|
65
|
+
files:
|
66
|
+
- lib/daily_reflection.rb
|
67
|
+
homepage: https://github.com/jrobertson/daily_reflection
|
68
|
+
licenses:
|
69
|
+
- MIT
|
70
|
+
metadata: {}
|
71
|
+
post_install_message:
|
72
|
+
rdoc_options: []
|
73
|
+
require_paths:
|
74
|
+
- lib
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
requirements: []
|
86
|
+
rubyforge_project:
|
87
|
+
rubygems_version: 2.7.6
|
88
|
+
signing_key:
|
89
|
+
specification_version: 4
|
90
|
+
summary: Used to keep a personal journal of things worth reflecting upon on a daily
|
91
|
+
basis. Entries are retrieved and stored in a markdown file with date headings created
|
92
|
+
in reverse chronological order.
|
93
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|