nzm 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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d79e3091141ce1e2eea4c9aac9a03fc45b82e47fcc773338a290e94993268d85
4
+ data.tar.gz: 389e4533cf0aba25dcdd9e75a8a3cf9c33426378c4d011743306e4fb80fa3b23
5
+ SHA512:
6
+ metadata.gz: 8b794a53f7d3e6d90485f76c8c348ce32d1d4df2d76e08ea6ac0e3e60da30df0c5efbed7d8dc168a6d36db8ba47f0710068945dcbe521a81151ab81834c655cd
7
+ data.tar.gz: 6553883cb3f70cbf08171446188a498f374e6f47027bd7f431c7d759e72f22961309ec24810af9a384bca86853e186068157cb05c7d31a99b1a9beb8c535ce92
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Christopher Dehner
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,61 @@
1
+ <pre>
2
+
3
+ :::: ::::::::::::::
4
+ :::: :::::::::::::: :::
5
+ :::::::::::::::::: :::: ::::: ::::::::::::::::
6
+ :::::::::::::::::: :::::::::::::: :::::::::::::::
7
+ :::: ::::: ::::: :::::
8
+ :::: ::::::::::::::: :::::
9
+ ++++ +++++++++++++++ +++++ +++++
10
+ +++++++++++++++++++ ++++++++ ++++++++++++++ +++++
11
+ +++++++++++++++ +++++++ ++++++++++++++++++++++++++
12
+ ++ ++++ +++++++ ++++++ ++++++++++++++
13
+ +++++++++++++++++++++++++++++ +++++ +++++ +++++++++++
14
+ ############################# ##### ##### ##########
15
+ ######################### ##### ###### ##### ###
16
+ ########################### ############ ######
17
+ ##### ########## ########
18
+ ################################# ########
19
+ ################################# ####
20
+ </pre>
21
+
22
+ <div align="center">望みを捨てないで | nozomi wo sutenaide</div>
23
+
24
+ # nzm
25
+
26
+ A command line alternative to Org with GTD-inspired habits.
27
+
28
+ ## Status
29
+
30
+ This is a very early version of a personal project. Currently only --version and --help options exist.
31
+ Please expect sporadic updates.
32
+
33
+ Planned
34
+ - CLI capture & stdout reporting
35
+ - TUI with added review and re-organization tools
36
+ - macOS support first, followed by Windows
37
+
38
+
39
+ ## Requirements
40
+
41
+ macOS
42
+ ruby v3.3
43
+
44
+ ## Install
45
+
46
+ ```
47
+ git clone https://github.com/cyadehn/nzm
48
+ cd nzm
49
+ bundle install
50
+ ```
51
+
52
+ ## Usage & Testing
53
+
54
+ ```Usage
55
+ bin/nzm --version
56
+ bin/nzm --help
57
+ ```
58
+
59
+ ```Test
60
+ rake
61
+ ```
data/bin/nzm ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../lib/nzm'
3
+ exit Nzm::CLI.new(ARGV).run
data/lib/nzm/cli.rb ADDED
@@ -0,0 +1,65 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'optparse'
4
+
5
+ module Nzm
6
+ class CLI
7
+ DEFAULT_FAREWELL = 'がんばって!'
8
+
9
+ def initialize(args, input: $stdin, out: $stdout, err: $stderr)
10
+ @args = args
11
+ @input = input
12
+ @out = out
13
+ @err = err
14
+ @options = {help: false, version: false}
15
+ end
16
+
17
+ def run
18
+ parser.parse!(@args)
19
+
20
+ return print_caution unless @args.empty?
21
+ return print_help if @options[:help]
22
+ return print_version if @options[:version]
23
+
24
+ @out.puts DEFAULT_FAREWELL
25
+ 0
26
+ rescue OptionParser::ParseError => e
27
+ @err.puts e.message
28
+ @err.puts parser
29
+ 1
30
+ end
31
+
32
+ private
33
+
34
+ def parser # rubocop:disable Metrics/MethodLength
35
+ @parser ||= OptionParser.new do |opts|
36
+ opts.banner = 'Usage: nzm [options]'
37
+ opts.version = Nzm::VERSION
38
+ opts.on('-h', '--help', 'Print help information') do
39
+ @options[:help] = true
40
+ end
41
+ opts.on('-v', '--version', 'Print version information') do
42
+ @options[:version] = true
43
+ end
44
+ end
45
+ end
46
+
47
+ def print_help
48
+ @out.puts @parser
49
+ 0
50
+ end
51
+
52
+ def print_version
53
+ @out.puts "nzm #{Nzm::VERSION}"
54
+ 0
55
+ end
56
+
57
+ def print_caution
58
+ @err.puts \
59
+ "error: extra arguments were provided without option flags!\n" \
60
+ "you entered: '#{@args.join(" ")}'\n\n"
61
+ @err.puts @parser
62
+ 1
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Nzm
4
+ VERSION = '0.1.0'
5
+ end
data/lib/nzm.rb ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'nzm/cli'
4
+ require_relative 'nzm/version'
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nzm
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Christopher Dehner
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ executables:
13
+ - nzm
14
+ extensions: []
15
+ extra_rdoc_files: []
16
+ files:
17
+ - LICENSE
18
+ - README.md
19
+ - bin/nzm
20
+ - lib/nzm.rb
21
+ - lib/nzm/cli.rb
22
+ - lib/nzm/version.rb
23
+ homepage: https://github.com/cyadehn/nzm
24
+ licenses:
25
+ - MIT
26
+ metadata:
27
+ source_code_uri: https://github.com/cyadehn/nzm
28
+ rubygems_mfa_required: 'true'
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '3.3'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubygems_version: 4.0.16
44
+ specification_version: 4
45
+ summary: A command line alternative to Org with GTD-inspired habits.
46
+ test_files: []