ememo 0.1.8 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dede73f4554893f7c86e93fcace9f46cdd5a0e400a48f0bba9fa6b90b247a1a4
4
- data.tar.gz: 370969e099cbb3cf7f4f2c7df8394d732b870bd7ebe06e281bb9875cb5b07950
3
+ metadata.gz: 6545661137c4a142895358a1b7f68be26bad4272c89cb79395b370edd0a5f374
4
+ data.tar.gz: '087ad9cc671dfea8e2ecd0b69e13caef9c9b55c80c7484c93e8794059c58ce86'
5
5
  SHA512:
6
- metadata.gz: a612d30f432a03bdc4fafcf69e3bf931a6a6a02e0fb03431a5135a7f52cd2c65fcf16dccacea769fca69dacc2070aae6325f84ff2324d6cd5e62aa4a4f11ebd6
7
- data.tar.gz: 663834f3dd486413f6817fd84dc02e6d07894211dc994eab279ac4c9a8869b336a548aebd39f8b1c8cbe626e9158c377aaee0c6c4e0922d2f13d6cc348503236
6
+ metadata.gz: b2fc5d6ee9c9e33cd3b28e800eb0cccee725e0ca397a304b8091f9e39dfb4382e4ebfb855b254ab0e6700ad8add32bc919afa4c4891b4dd252b8821d6f8f9ea9
7
+ data.tar.gz: c6d7450843d17dd4e666c2fcefe4993f426799b399d3a7f1e79ca30bc995a3ce0ec2b89df76946da64368c6db73c77c1520fc3350c4c998ca5cc7f8080c03496
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ememo (0.1.8)
4
+ ememo (0.2.0)
5
5
  tomlrb
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -73,15 +73,19 @@ $ memo p todo -n p
73
73
  # copy to clipboard
74
74
  $ memo p todo -n p -c
75
75
  $ memo p todo -n p -copy
76
+
77
+ # preview config
78
+ $ memo p c
79
+ $ memo p config
76
80
  ```
77
81
 
78
82
  ### List
79
83
  ```bash
80
- # list of ~/.memo/mymemo/memo.md
84
+ # list of ~/.memo/mymemo
81
85
  $ memo l
82
86
  $ memo list
83
87
 
84
- # list ~/.memo/project1/todo.md
88
+ # list ~/.memo/project1
85
89
  $ memo l -n project1
86
90
 
87
91
  # all
@@ -136,7 +140,7 @@ ext = "md"
136
140
  root = "~/.memo"
137
141
  editor = "vim"
138
142
  # pbcopy = "pbcopy"
139
- # pbcopy = "xsel --clipboard --input"
143
+ pbcopy = "xsel --clipboard --input"
140
144
  preview = "bat"
141
145
  fuzzy_finder = "fzf --preview 'bat --color=always {}'"
142
146
  default_filename = "memo"
@@ -17,7 +17,7 @@ module Memo
17
17
 
18
18
  if input.nil?
19
19
  puts Error::Unknown.new.to_s
20
- puts Usage::Help.new.to_s
20
+ puts Memo::Usage.new.to_s
21
21
  return
22
22
  end
23
23
 
@@ -5,7 +5,7 @@ module Memo
5
5
  def initialize(*); end
6
6
 
7
7
  def call
8
- puts Usage::Help.new.to_s
8
+ puts Memo::Usage.new.to_s
9
9
  end
10
10
  end
11
11
  end
@@ -18,15 +18,19 @@ module Memo
18
18
 
19
19
  path = case filename
20
20
  when "today", "t"
21
- @today.fullpath
21
+ "#{@config.root}/#{@today.fullpath}"
22
+ when "config", "c"
23
+ @config.path
22
24
  else
23
- Memo::File.new(
25
+ p = Memo::File.new(
24
26
  filename,
25
27
  @options.namespace,
26
28
  ).fullpath
29
+
30
+ "#{@config.root}/#{p}"
27
31
  end
28
32
 
29
- cmd ="#{@config.preview} #{@config.root}/#{path}"
33
+ cmd ="#{@config.preview} #{path}"
30
34
  if @options.copy?
31
35
  @os.exec "#{cmd} | (#{@config.pbcopy})"
32
36
  end
@@ -0,0 +1,50 @@
1
+ module Memo
2
+ class Usage
3
+ def to_s
4
+ <<~TEXT
5
+ EASY EDIT MEMO
6
+
7
+ USAGE
8
+ - Config
9
+ You can edit basic config and register aliases
10
+
11
+ $ memo c
12
+ $ memo config
13
+
14
+ - Edit
15
+ $ memo e
16
+ $ memo edit
17
+ $ memo edit todo
18
+ $ memo edit todo -n project1
19
+ $ memo edit todo -n p # use namespace_alias
20
+
21
+ - Preview
22
+ $ memo p
23
+ $ memo preview
24
+ $ memo p todo
25
+ $ memo p todo -n project1
26
+ $ memo p todo -n p # use namespace_alias
27
+
28
+ - Today
29
+ # edit
30
+ $ memo t
31
+ $ memo today
32
+
33
+ # preview
34
+ $ memo preview today
35
+ $ memo p t
36
+
37
+ - Fuzzy
38
+ $ memo fuzzy
39
+ $ memo f
40
+
41
+ - Custom Command
42
+ $ memo todo # use command_alias
43
+
44
+ - Confirm Alias
45
+ $ memo a
46
+ $ memo alias
47
+ TEXT
48
+ end
49
+ end
50
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Memo
4
- VERSION = "0.1.8"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ememo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuma Ishikawa
@@ -58,14 +58,11 @@ files:
58
58
  - lib/memo/cli/command/today.rb
59
59
  - lib/memo/cli/config/config.rb
60
60
  - lib/memo/cli/error/error.rb
61
- - lib/memo/cli/usage/config.rb
62
- - lib/memo/cli/usage/help.rb
63
- - lib/memo/cli/usage/new.rb
64
- - lib/memo/cli/usage/preview.rb
65
61
  - lib/memo/os/os.rb
66
62
  - lib/memo/value/default.rb
67
63
  - lib/memo/value/file.rb
68
64
  - lib/memo/value/today.rb
65
+ - lib/memo/value/usage.rb
69
66
  - lib/memo/version.rb
70
67
  - memo.gemspec
71
68
  homepage: https://github.com/YumaFuu/ememo
@@ -1,13 +0,0 @@
1
- module Memo
2
- class Cli
3
- module Usage
4
- class Config
5
- def to_s
6
- <<~TEXT
7
- $ memo config
8
- TEXT
9
- end
10
- end
11
- end
12
- end
13
- end
@@ -1,50 +0,0 @@
1
- module Memo
2
- class Cli
3
- module Usage
4
- class Help
5
- def to_s
6
- <<~TEXT
7
- EASY EDIT MEMO
8
-
9
- USAGE
10
- - Config
11
- You can edit basic config and register aliases
12
-
13
- $ memo c
14
- $ memo config
15
-
16
- - Edit
17
- $ memo e
18
- $ memo edit
19
- $ memo edit todo
20
- $ memo edit todo -n project1
21
- $ memo edit todo -n p # use namespace_alias
22
-
23
- - Preview
24
- $ memo p
25
- $ memo preview
26
- $ memo p todo
27
- $ memo p todo -n project1
28
- $ memo p todo -n p # use namespace_alias
29
-
30
- - Today
31
- # edit
32
- $ memo t
33
- $ memo today
34
-
35
- # preview
36
- $ memo preview today
37
- $ memo p t
38
-
39
- - Fuzzy
40
- $ memo fuzzy
41
- $ memo f
42
-
43
- - Custom Command
44
- $ memo todo # use command_alias
45
- TEXT
46
- end
47
- end
48
- end
49
- end
50
- end
@@ -1,21 +0,0 @@
1
- module Memo
2
- class Cli
3
- module Usage
4
- class New
5
- def initialize(err:)
6
- @err = err
7
- end
8
-
9
- def to_s
10
- <<~TEXT
11
- #{@err}
12
-
13
- usage:
14
- $ memo new new-memo
15
- $ memo n new-memo
16
- TEXT
17
- end
18
- end
19
- end
20
- end
21
- end
@@ -1,20 +0,0 @@
1
- module Memo
2
- class Cli
3
- module Usage
4
- class Preview
5
- def initialize(err:)
6
- @err = err.to_s
7
- end
8
-
9
- def to_s
10
- <<~TEXT
11
- #{@err}
12
-
13
- usage:
14
- $ memo preview my-memo
15
- TEXT
16
- end
17
- end
18
- end
19
- end
20
- end