flow_note 0.0.1
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
- data/bin/flow +5 -0
- data/lib/flow_note.rb +38 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a6a0c1b84ff2ee9ee392b5f7996158a09e98b5ba50e0d91b37bb6c5e759e09d0
|
4
|
+
data.tar.gz: 00d752d217b23fe315cb0b161b8ff31306920dc32a62e7f784b1e46e84709630
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 509a4a6a515c41ac23e075a0d2f711a76dd5da9ae52b95653fb550afb7c60633955ce8d66ed829c6f83bcbfc8df1720c972c5598659c81c1e07c10f8dcf36512
|
7
|
+
data.tar.gz: c9bd39f7c410f04983625eb5c5fdb916f77f9e169af8e70c899179706eda75256ab91fd7cbdfa86678eac30d0ee594cab1147e7f21ce0cb26302e13d37ec0137
|
data/bin/flow
ADDED
data/lib/flow_note.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'thor'
|
2
|
+
require 'launchy'
|
3
|
+
|
4
|
+
class FlowNote < Thor
|
5
|
+
FLOW_DIR=ENV['FLOW_DIR']
|
6
|
+
|
7
|
+
desc 'note BODY', 'Record a note'
|
8
|
+
def note(*body)
|
9
|
+
File.open("#{FLOW_DIR}/#{Time.now.strftime("%Y-%m-%d")}.md", 'a') do |f|
|
10
|
+
f.write "[#{Time.now} | #{body.join(' ')}]"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "show", "View your notes"
|
15
|
+
def show
|
16
|
+
build
|
17
|
+
Launchy.open("file://#{FLOW_DIR}/show.html")
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def build
|
23
|
+
notes = Dir.glob("#{FLOW_DIR}/*.md").sort[0..99]
|
24
|
+
|
25
|
+
buffer = StringIO.new
|
26
|
+
buffer << "<html><head><link rel='stylesheet' type='text/css' href='style.css'></head><body>"
|
27
|
+
notes.each do |note|
|
28
|
+
buffer << '<div class="note"><p>'
|
29
|
+
buffer << File.read(note)
|
30
|
+
buffer << '</p></div>'
|
31
|
+
end
|
32
|
+
buffer << '</body></html>'
|
33
|
+
|
34
|
+
File.open("#{FLOW_DIR}/show.html", 'w') do |f|
|
35
|
+
f.write buffer.string
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: flow_note
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sam Lachance
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.20.3
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.20.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: launchy
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.4'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 2.4.3
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.4'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 2.4.3
|
47
|
+
description: CLI note taking app
|
48
|
+
email: sam@samlachance.com
|
49
|
+
executables:
|
50
|
+
- flow
|
51
|
+
extensions: []
|
52
|
+
extra_rdoc_files: []
|
53
|
+
files:
|
54
|
+
- bin/flow
|
55
|
+
- lib/flow_note.rb
|
56
|
+
homepage: https://samlachance.com
|
57
|
+
licenses:
|
58
|
+
- MIT
|
59
|
+
metadata: {}
|
60
|
+
post_install_message:
|
61
|
+
rdoc_options: []
|
62
|
+
require_paths:
|
63
|
+
- lib
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
requirements: []
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 2.7.3
|
77
|
+
signing_key:
|
78
|
+
specification_version: 4
|
79
|
+
summary: Flow
|
80
|
+
test_files: []
|