zoi 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +7 -2
- data/README.adoc +15 -8
- data/lib/zoi/cli.rb +9 -0
- data/lib/zoi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16c4626ef7751aeebc5de4ca21e43ee40f74db06e9b0afc885ef8f7da70f38ea
|
4
|
+
data.tar.gz: 1c59a8d91bf0ea8a70e70faff929525ed255ddf91548e8973fa662057c1ae1f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d599df9fab552398bfa4022a540fe5af4b6d6f87ae606758562e66aa7e6f1a26f69b28b059fc9d4449a4f8d0c39a91a0554d39d89d2f37a034aa56dc94e1ac18
|
7
|
+
data.tar.gz: d70f7e0232ebecc595227821f1b2d3ea05828430595e1ca287c33c4c880bdbe4ba12ac8c1adf0440335a1ac55574c5c96404253c857195622cd38946c953e4da
|
data/CHANGELOG.adoc
CHANGED
@@ -1,9 +1,14 @@
|
|
1
|
-
== 0.1.1 (
|
1
|
+
== 0.1.1 (September 11, 2021)
|
2
|
+
|
3
|
+
=== Enhancements
|
4
|
+
* Add `root` command https://github.com/9sako6/zoi/pull/8[#8]
|
5
|
+
|
6
|
+
== 0.1.1 (July 29, 2021)
|
2
7
|
|
3
8
|
=== Bug Fixes
|
4
9
|
* Fix load error of 'pathname' library https://github.com/9sako6/zoi/pull/3[#3]
|
5
10
|
|
6
|
-
== 0.1.0 (July
|
11
|
+
== 0.1.0 (July 29, 2021)
|
7
12
|
|
8
13
|
=== Enhancements
|
9
14
|
* Add basic commands https://github.com/9sako6/zoi/pull/2[#2]
|
data/README.adoc
CHANGED
@@ -6,10 +6,10 @@ zoi - Manage snippets
|
|
6
6
|
|
7
7
|
== DESCRIPTION
|
8
8
|
|
9
|
-
|
9
|
+
‘zoi' provides a way to organize snippets. When you create a new file by `create` command, zoi makes the file under ~/zoi. When you execute `open` command, zoi create a new file and open it with your editor. If you want to list all files or all directory in ~/zoi, use `list` command.
|
10
10
|
|
11
11
|
[verse]
|
12
|
-
zoi
|
12
|
+
zoi create ruby/foo.rb
|
13
13
|
# ~/zoi/ruby/foo.rb is created.
|
14
14
|
|
15
15
|
== SYNOPSIS
|
@@ -25,10 +25,12 @@ zoi help
|
|
25
25
|
|
26
26
|
create::
|
27
27
|
Create a new file under zoi root directory. If the file already exists, the file isn't created. +
|
28
|
-
In all cases, the full path of the file is printed to stdout.
|
28
|
+
In all cases, the full path of the file is printed to stdout. +
|
29
|
+
For example: `zoi create memo/20210101.md`
|
29
30
|
|
30
31
|
open::
|
31
|
-
Execute `create` command and open the file with the editor specified by `$EDITOR`.
|
32
|
+
Execute `create` command and open the file with the editor specified by `$EDITOR`. To open a file, set `$EDITOR`. +
|
33
|
+
For example: `EDITOR=code zoi open memo/20210101.md`
|
32
34
|
|
33
35
|
list::
|
34
36
|
List all files under zoi root directory. +
|
@@ -46,13 +48,18 @@ help::
|
|
46
48
|
|
47
49
|
== EXAMPLES
|
48
50
|
|
49
|
-
Open today's memo file in VSCode.
|
50
|
-
|
51
|
+
* Open today's memo file in VSCode.
|
52
|
+
+
|
51
53
|
[verse]
|
52
|
-
|
53
|
-
|
54
|
+
date "+%Y%m%d.adoc" | EDITOR=code zoi open
|
55
|
+
+
|
54
56
|
A new file ~/zoi/20210727.adoc is created and is opend in VSCode.
|
55
57
|
|
58
|
+
* Change directories
|
59
|
+
+
|
60
|
+
[verse]
|
61
|
+
cd $(zoi list -d | fzf)
|
62
|
+
|
56
63
|
== AUTHOR
|
57
64
|
|
58
65
|
https://github.com/9sako6[9sako6]
|
data/lib/zoi/cli.rb
CHANGED
@@ -36,6 +36,15 @@ module Zoi
|
|
36
36
|
puts(Find.find(root_path).select { |path| only_directory ? File.directory?(path) : File.file?(path) })
|
37
37
|
end
|
38
38
|
|
39
|
+
desc 'root', 'Print zoi root directory.'
|
40
|
+
def root_command
|
41
|
+
puts root_path
|
42
|
+
end
|
43
|
+
|
44
|
+
# NOTE: Resolve the following error.
|
45
|
+
# `"root" is a Thor reserved word and cannot be defined as command`
|
46
|
+
map 'root' => 'root_command'
|
47
|
+
|
39
48
|
no_tasks do
|
40
49
|
def editor
|
41
50
|
@editor ||= ENV['EDITOR']
|
data/lib/zoi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zoi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- 9sako6
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: management snippets
|
14
14
|
email:
|