enr 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/TODO.md +62 -0
  3. data/exe/enr +11 -0
  4. data/lib/enr/version.rb +1 -1
  5. metadata +6 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cda4dac639e331c7289bf3cf37d1c237bf8cf9262a03104a5e4f059552293962
4
- data.tar.gz: 0a15d5986c7841f5182243482d45c9d9b268594312c148e91c1e4772e392e759
3
+ metadata.gz: bdbf96431acd4b32440daf4ce94eaf9d86e35f21be2d23ffac629005e8439739
4
+ data.tar.gz: f382edbf5fffb4dce012969f76eba7f2f7e028044e7567bddcd80f24bd5c246d
5
5
  SHA512:
6
- metadata.gz: a70d0cff5d11d894ec99fb327b41014dd900c69576da1ca4abf067d9abe637f6352781ac4759bd46cd9769d5e2b9e0b0ea6c2f216c86d58b348765456a1b3639
7
- data.tar.gz: 7130beacd41a3d2bee9518c467770d71a4b126e56adb1417ca27a040bf05dd6459e3b43db3f960758b5b3f7e43a1aae4609f7963304ecc45cb7f72a06253c2cb
6
+ metadata.gz: 51ea68becd10425107969172ebd29a59f379ac3deecfc0f6ff135e34c3f4c026a3a6b935d7e496e7031108fee9d23662c8678a08a869200f02c788ee278855f9
7
+ data.tar.gz: 3469578c0ef23b54289f9107e833ac9b8e9a6da3425ffd4e73aa792d81468175532a75588b19d010c47e95f6cd9aa9bf216a71af4659b93efdf4bf7286674df1
data/TODO.md ADDED
@@ -0,0 +1,62 @@
1
+ # TODOes, planned things or future features
2
+
3
+ - CRUD extension by extra arguments or options
4
+ - Search notes
5
+ - Operate attachments
6
+
7
+ ### Read ENML from GUID
8
+
9
+ #### Read attachments
10
+
11
+ ```console
12
+ $ enr get GUID ATTACHMENT-NAME
13
+ ```
14
+
15
+ ### Create note from ENML file
16
+
17
+ #### With metadata
18
+
19
+ ```console
20
+ $ enr post --title=TITLE --notebook=NOTEBOOK-NAME --url=URL --tags=TAG1,TAG2 INPUT-PATH
21
+ ```
22
+
23
+ ### Update existing note from ENML file
24
+
25
+ #### With metadata
26
+
27
+ ```console
28
+ $ enr put --notebook=NOTEBOOK-NAME --url=URL --tags=TAG1,TAG2 GUID INPUT-PATH
29
+ ```
30
+
31
+ #### Only metadata
32
+
33
+ ```console
34
+ $ enr put --notebook=NOTEBOOK-NAME --url=URL --tags=TAG1,TAG2 GUID
35
+ ```
36
+
37
+ ### Search notes
38
+
39
+ ```console
40
+ $ enr ls SEARCH-PHRASE1 SEARCH-PHRASE2 ...
41
+ <only GUIDs>
42
+
43
+ $ enr ls -l SEARCH-PHRASE1 SEARCH-PHRASE2 ...
44
+ <GUIDs and titles>
45
+ ```
46
+
47
+ or
48
+
49
+ ```console
50
+ $ enr search SEARCH-PHRASE1 SEARCH-PHRASE2 ...
51
+ <GUIDs and titles>
52
+
53
+ $ enr search --only-guid SEARCH-PHRASE1 SEARCH-PHRASE2 ...
54
+ <only GUIDs>
55
+ ```
56
+
57
+ ### List attachments
58
+
59
+ ```console
60
+ $ enr ls-attachments GUID
61
+ $ enr ls-attachments -l GUID
62
+ ```
data/exe/enr CHANGED
@@ -8,6 +8,10 @@ require "enr"
8
8
 
9
9
  module Enr
10
10
  class << self
11
+ def debug?
12
+ return ENV.fetch("ENR_DEBUG", "").length > 0
13
+ end
14
+
11
15
  def token
12
16
  return ENV.fetch("ENR_TOKEN")
13
17
  end
@@ -50,6 +54,13 @@ module Enr::Cli
50
54
  exit(1)
51
55
  end
52
56
  sub_command_class.(rest_argv)
57
+ rescue SystemExit
58
+ raise
59
+ rescue Exception => e
60
+ $stderr.puts(e.inspect)
61
+ raise if Enr.debug?
62
+
63
+ exit(1)
53
64
  end
54
65
  end
55
66
  end
data/lib/enr/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Enr
4
- VERSION = "0.0.0"
4
+ VERSION = "0.0.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuya.Nishida.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-04 00:00:00.000000000 Z
11
+ date: 2024-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -62,12 +62,14 @@ files:
62
62
  - LICENSE.txt
63
63
  - README.md
64
64
  - Rakefile
65
+ - TODO.md
65
66
  - exe/enr
66
67
  - lib/enr.rb
67
68
  - lib/enr/version.rb
68
69
  - sig/enr.rbs
69
70
  homepage: https://github.com/nishidayuya/enr
70
- licenses: []
71
+ licenses:
72
+ - X11
71
73
  metadata:
72
74
  homepage_uri: https://github.com/nishidayuya/enr
73
75
  post_install_message:
@@ -85,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
87
  - !ruby/object:Gem::Version
86
88
  version: '0'
87
89
  requirements: []
88
- rubygems_version: 3.5.3
90
+ rubygems_version: 3.5.16
89
91
  signing_key:
90
92
  specification_version: 4
91
93
  summary: 'enr: EverNote Request'