my_help 1.2.2 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4aea4b438a5be4715107a41097ff21fa7d35e8cebed822e9995594bc827c6305
4
- data.tar.gz: b964ebdcc06a3e414d5535172a31b69018dbf1cb43db5641101c88f5457a4c91
3
+ metadata.gz: b06e8d56f23cc8689eb899e6482c86873b7292a05d892092ad1d3cef61ecd0e6
4
+ data.tar.gz: c0f4996cd89f113485271ee619014a0c62dacc35b47c55df1bc4c521cd7c62d0
5
5
  SHA512:
6
- metadata.gz: c6d3ce8dcdd71f8e01baecc483f56412791137ab455ba45750966321fb197f7941fd341720bedba55035a3c573d21fea1753d154977a2ddb7c44dfb8751694b0
7
- data.tar.gz: 4fcb4b3440365f8364677a6b7aac6d06574cd781e89e277185b0eb54934d976b4df58da318e09c05686fbbe1fd93ca912f458c970d59bfb9445896f4f02568e0
6
+ metadata.gz: b8e622e00b261fdf8d38b339fc8ca7ee99dda24615a343ddf9f599fa021551bf82a8e919877690a48f38a8fcddbbc7f3ac605bc72862f38424c61245a7492b3a
7
+ data.tar.gz: f269e589de9f3289786be4eb38fa6bd7b177d8cea8030a6b86ef339e2e17532b5be85706ffe707ef4b370b6b3841e9c81df7b302e9e2b6e029248c43a1777271
data/.yardoc/checksums CHANGED
@@ -1,11 +1,11 @@
1
1
  lib/my_help.rb 7539f0f58056d44d38352f868bfea4d6fb63a9ee
2
- lib/my_help/cli.rb 8cd7468e74ef89e8a9ee83e5e780b70b6e2874c4
2
+ lib/my_help/cli.rb c2a482691a6e9183e393110da8a552d477cf856e
3
3
  lib/my_help/init.rb ac83b0cbfd9394278da8e7bf83b089cb84e132e4
4
- lib/my_help/list.rb 30d4be2eb41e623abeeb6914ab9907ced97ed722
5
- lib/my_help/config.rb d7162fbe953828fc7e6a5aac89adf8678131068f
4
+ lib/my_help/list.rb a63c0f1366a7c162d2c5e16e70f37f7ebb32cf8e
5
+ lib/my_help/config.rb be52fb39c0656febb6d230aa50e7b7a6804c7cc4
6
6
  lib/my_help/modify.rb 17a00a9f1b4126d9c067a320b47639e5a5fec845
7
7
  lib/my_help/git_cli.rb bb04396f0b9d54ecb13100fe5cde029f7dbb0ea7
8
8
  lib/my_help/md2hash.rb 35ebd32d3f545b40cd9ebb1972dc60d53b58b22a
9
9
  lib/my_help/org2yml.rb 334d0a7b648dc75b1d9504ec6d68937c70e96343
10
- lib/my_help/version.rb e82ec18cc8f885ee6c9b6846c3813e1eb96981a9
11
- lib/my_help/org2hash.rb 939fea903abb5247959d74e18afc8db30fb5f6c8
10
+ lib/my_help/version.rb 618ac9ac5ac451afc28fc6bae7bd657fc71a915a
11
+ lib/my_help/org2hash.rb a6e90f0a910b16f54765d06c1fbb034ded267720
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- my_help (1.2.2)
4
+ my_help (1.2.3)
5
5
  colorize
6
6
  command_line
7
7
  thor
@@ -18,9 +18,9 @@ GEM
18
18
  thor (~> 1.0)
19
19
  builder (3.2.4)
20
20
  childprocess (4.1.0)
21
- colorize (0.8.1)
21
+ colorize (1.0.1)
22
22
  command_line (2.0.1)
23
- contracts (0.16.1)
23
+ contracts (0.17)
24
24
  cucumber (8.0.0)
25
25
  builder (~> 3.2, >= 3.2.4)
26
26
  cucumber-ci-environment (~> 9.0, >= 9.0.4)
@@ -33,7 +33,7 @@ GEM
33
33
  mime-types (~> 3.4, >= 3.4.1)
34
34
  multi_test (~> 1.1, >= 1.1.0)
35
35
  sys-uname (~> 1.2, >= 1.2.2)
36
- cucumber-ci-environment (9.1.0)
36
+ cucumber-ci-environment (9.2.0)
37
37
  cucumber-core (11.0.0)
38
38
  cucumber-gherkin (~> 23.0, >= 23.0.1)
39
39
  cucumber-messages (~> 18.0, >= 18.0.0)
@@ -49,29 +49,28 @@ GEM
49
49
  ffi (1.15.5)
50
50
  mime-types (3.4.1)
51
51
  mime-types-data (~> 3.2015)
52
- mime-types-data (3.2022.0105)
52
+ mime-types-data (3.2023.0218.1)
53
53
  multi_test (1.1.0)
54
54
  rake (13.0.6)
55
55
  rspec (3.12.0)
56
56
  rspec-core (~> 3.12.0)
57
57
  rspec-expectations (~> 3.12.0)
58
58
  rspec-mocks (~> 3.12.0)
59
- rspec-core (3.12.0)
59
+ rspec-core (3.12.2)
60
60
  rspec-support (~> 3.12.0)
61
- rspec-expectations (3.12.1)
61
+ rspec-expectations (3.12.3)
62
62
  diff-lcs (>= 1.2.0, < 2.0)
63
63
  rspec-support (~> 3.12.0)
64
- rspec-mocks (3.12.1)
64
+ rspec-mocks (3.12.5)
65
65
  diff-lcs (>= 1.2.0, < 2.0)
66
66
  rspec-support (~> 3.12.0)
67
67
  rspec-support (3.12.0)
68
- sys-uname (1.2.2)
68
+ sys-uname (1.2.3)
69
69
  ffi (~> 1.1)
70
- thor (1.2.1)
70
+ thor (1.2.2)
71
71
 
72
72
  PLATFORMS
73
73
  arm64-darwin-20
74
- x86_64-linux
75
74
 
76
75
  DEPENDENCIES
77
76
  aruba (~> 2.1.0)
@@ -80,4 +79,4 @@ DEPENDENCIES
80
79
  rspec (~> 3.0)
81
80
 
82
81
  BUNDLED WITH
83
- 2.3.23
82
+ 2.4.14
data/README.org CHANGED
@@ -1,80 +1,96 @@
1
- #+STARTUP: indent nolineimages content
1
+ # my_help
2
+ #+AUTHOR: Shigeto R. Nishitani
3
+ #+EMAIL: (concat "nishitani@kwansei.ac.jp")
4
+ #+LANGUAGE: jp
5
+ #+OPTIONS: H:4 toc:t num:2
6
+ #+SETUPFILE: /Users/bob/.emacs.d/org-mode/theme-readtheorg.setup
7
+ #+STARTUP: indent nolineimages
2
8
  #+OPTIONS: ^:{}
3
- * Name
4
- - my_help :: manual like help for each user
5
-
6
- * Summary
7
- This gem makes and supplies user specific helps, emulating CUI(CLI) help
8
- usage.
9
-
10
- * Target
11
- A very novice of learning a specific operation,
12
- such as CUI, shell, or emacs,
13
- has a difficulty in remembering commands and grammers.
14
- Some simple `key' reminds all, but no key brings nothing.
15
- Especially a non-English-native has a strong difficulty
16
- on the key remembering.
17
- The problems are,
18
- - a man(ual) is in English
19
- - a man is heavily documented
20
- - On web, searching the same key word,
21
- - and reading the same URI repeatedly
22
- - but a memo goes away somewhere...
23
-
24
- * Specs
25
- This gem aims to supply own help by gem environment.
26
- Specs are,
27
- - user makes his own help
28
- - supplies a template
29
- - a same format, looks, operation, and hierarchy
30
- - easily see, read
31
- - supplies editing and install commands.
32
-
33
- Wiki targets the whole engineer, my_help targets a specific person.
34
- Half of the wiki aim should be covered by my_help.
35
- Making own manual is one of the best practices for remembering operations.
36
- Memo applications are good, if you remember the key word.
37
- my_help supplies the key for remembering the word.
38
-
39
- * Usage
40
- ** Install
41
-
42
- : $ gem install my_help
43
-
44
- ** Simple Usage
45
- At first, you can see the commands supplied by my_help.
46
- #+begin_example
47
- > my_help
48
- NAME
49
- my_help - make own help and list.
50
-
51
- SYNOPSIS
52
- my_help [global options] command [command options] [arguments...]
53
-
54
- VERSION
55
- 0.7.0
56
-
57
- GLOBAL OPTIONS
58
- --help - Show this message
59
- --version - Display the program version
60
-
61
- COMMANDS
62
- delete - delete HELP_NAME help
63
- edit - edit HELP_NAME help
64
- help - Shows a list of commands or help for one command
65
- list - list all helps, specific HELP, or item
66
- new - make new HELP_NAME
67
- #+end_example
68
-
69
- When you add HELP_NAME and item (-o)wo'
70
-
71
- : my_help list
72
- : my_help list emacs_help
73
- : my_help list emacs_help -f
74
- : my_help list emacs_help file
75
9
 
76
-
77
- #+BEGIN_EXAMPLE
10
+ * 概要
11
+ :PROPERTIES:
12
+ :CUSTOM_ID: 概要
13
+ :END:
14
+
15
+ CUI(CLA)ヘルプのUsage出力を真似て,user独自のhelpを作成・提供するgem.
16
+
17
+
18
+ * (my_helpで解決しようとする)問題点
19
+ :PROPERTIES:
20
+ :CUSTOM_ID: my_helpで解決しようとする問題点
21
+ :END:
22
+
23
+ CUIやshell, 何かのプログラミング言語などを習得しようとする初心者は,
24
+ commandや文法を覚えるのに苦労します.
25
+ 少しのkey(とっかかり)があると思い出すんですが,
26
+ うろ覚えでは間違えて路頭に迷います.
27
+ 問題点は,
28
+ + manは基本的に英語
29
+ + manualでは重たい
30
+ + いつもおなじことをwebで検索して
31
+ + 同じとこ見ている
32
+ + memoしても,どこへ置いたか忘れる
33
+ などです.
34
+
35
+ * 特徴
36
+ :PROPERTIES:
37
+ :CUSTOM_ID: 特徴
38
+ :END:
39
+
40
+ これらをCLAとして提供しようというのが,このgemの目的です.
41
+ 仕様としては,
42
+ - userが自分にあったmanを作成
43
+ - 雛形を提供
44
+ - おなじformat, looks, 操作, 階層構造
45
+ - すぐに手が届く
46
+ - それらを追加・修正・削除できる
47
+
48
+ memoソフトでは,検索が必要となりますが,my_helpは
49
+ key(記憶のとっかかり)を提供することが目的です.
50
+ RPGでレベル上げとかアイテムを貯めるようにして,
51
+ プログラミングでスキルを発展させてください.
52
+
53
+ VSCodeやGithub Copilotではcodeの候補を挙げてくれますが,
54
+ 物覚えの悪い作者は,人の名前をitem分けして,こそっと使っています.
55
+
56
+ * 使用法
57
+ :PROPERTIES:
58
+ :CUSTOM_ID: 使用法
59
+ :END:
60
+ ** インストール
61
+
62
+ : > gem install my_help
63
+ です.
64
+
65
+ ** 簡単な使用法
66
+ :PROPERTIES:
67
+ :CUSTOM_ID: 簡単な使用法
68
+ :END:
69
+
70
+ まずは,
71
+ #+begin_src bash
72
+ > my_help
73
+ Commands:
74
+ my_help delete HELP # delete HELP
75
+ my_help edit HELP # edit HELP
76
+ my_help help [COMMAND] # Describe available commands or one specific command
77
+ my_help list [HELP] [ITEM] # list all helps, specific HELP, or ITEM
78
+ my_help new HELP # make new HELP
79
+ my_help set_editor EDITOR_NAME # set editor to EDITOR_NAME
80
+ my_help setup # set up the test database
81
+ my_help version # show version
82
+ #+end_src
83
+ としてください.このlistにNAMEやITEMを加えて行くとわかると思います.
84
+
85
+ #+begin_src bash
86
+ > my_help list
87
+ > my_help list emacs
88
+ > my_help list emacs -f
89
+ > my_help list emacs file
90
+ #+end_src
91
+ として動かしてみてください.
92
+
93
+ #+begin_src bash
78
94
  - emacsのキーバインド
79
95
  -
80
96
  特殊キー操作
@@ -95,16 +111,33 @@ When you add HELP_NAME and item (-o)wo'
95
111
  , query_replace : query_replace
96
112
  -r, ruby-mode : ruby-mode
97
113
  -d, dired : ファイラとして使う
98
- #+END_EXAMPLE
114
+ #+end_src
115
+
116
+ ** my_helpがやっていること
117
+ my_helpの個々のヘルプファイルは'~/.my_help'に置かれています.
118
+ ヘルプファイルのフォーマットはEmacsのorg-modeです.
119
+ これをEditorで叩いて編集したり,
120
+ そこから情報を取り出したりしています.
121
+ 単にファイル操作を集約しているだけなのですが,
122
+ これが面倒で...
123
+
124
+
125
+ ** 独自のhelpを作る方法
126
+ 独自のhelpを作る方法です.まずは,
127
+
128
+ : $ my_help new new_help
99
129
 
100
- ** Make your own help
101
- For making your new help, you can do tha as follows:
102
- : my_help new new_help
130
+ で,new_helpというtemplateが用意されます.
131
+ : $ my_help edit new_help
132
+ で編集してください. Emacs org形式で,格納されています.
103
133
 
104
- A templeate is compied, then you can edit as
105
- : my_help edit new_help
106
- The file is stored in emacs org mode.
134
+ : $ my_help delete new_help
107
135
 
108
- You can delete if as follows:
109
- : my_help delete new_help
136
+ すると消されます.
137
+ ** editorの変更
138
+ : $ my_help set_editor vim
139
+ でeditorを変更できます.codeとかは確認していますが,
140
+ それ以外で動いたり,動かなかったりを報告してください.
110
141
 
142
+ OS Xで'emacs'とした時にGUI版が立ち上がって嫌だという場合は,
143
+ 'emacs -nw'として下さい.
data/README_e.org ADDED
@@ -0,0 +1,110 @@
1
+ #+STARTUP: indent nolineimages content
2
+ #+OPTIONS: ^:{}
3
+ * Name
4
+ - my_help :: manual like help for each user
5
+
6
+ * Summary
7
+ This gem makes and supplies user specific helps, emulating CUI(CLI) help
8
+ usage.
9
+
10
+ * Target
11
+ A very novice of learning a specific operation,
12
+ such as CUI, shell, or emacs,
13
+ has a difficulty in remembering commands and grammers.
14
+ Some simple `key' reminds all, but no key brings nothing.
15
+ Especially a non-English-native has a strong difficulty
16
+ on the key remembering.
17
+ The problems are,
18
+ - a man(ual) is in English
19
+ - a man is heavily documented
20
+ - On web, searching the same key word,
21
+ - and reading the same URI repeatedly
22
+ - but a memo goes away somewhere...
23
+
24
+ * Specs
25
+ This gem aims to supply own help by gem environment.
26
+ Specs are,
27
+ - user makes his own help
28
+ - supplies a template
29
+ - a same format, looks, operation, and hierarchy
30
+ - easily see, read
31
+ - supplies editing and install commands.
32
+
33
+ Wiki targets the whole engineer, my_help targets a specific person.
34
+ Half of the wiki aim should be covered by my_help.
35
+ Making own manual is one of the best practices for remembering operations.
36
+ Memo applications are good, if you remember the key word.
37
+ my_help supplies the key for remembering the word.
38
+
39
+ * Usage
40
+ ** Install
41
+
42
+ : $ gem install my_help
43
+
44
+ ** Simple Usage
45
+ At first, you can see the commands supplied by my_help.
46
+ #+begin_example
47
+ > my_help
48
+ NAME
49
+ my_help - make own help and list.
50
+
51
+ SYNOPSIS
52
+ my_help [global options] command [command options] [arguments...]
53
+
54
+ VERSION
55
+ 0.7.0
56
+
57
+ GLOBAL OPTIONS
58
+ --help - Show this message
59
+ --version - Display the program version
60
+
61
+ COMMANDS
62
+ delete - delete HELP_NAME help
63
+ edit - edit HELP_NAME help
64
+ help - Shows a list of commands or help for one command
65
+ list - list all helps, specific HELP, or item
66
+ new - make new HELP_NAME
67
+ #+end_example
68
+
69
+ When you add HELP_NAME and item (-o)wo'
70
+
71
+ : my_help list
72
+ : my_help list emacs_help
73
+ : my_help list emacs_help -f
74
+ : my_help list emacs_help file
75
+
76
+
77
+ #+BEGIN_EXAMPLE
78
+ - emacsのキーバインド
79
+ -
80
+ 特殊キー操作
81
+ - C-f, controlキーを押しながら 'f'
82
+ - M-f, escキーを押した後一度離して'f'
83
+ - 操作の中断C-g, 操作の取り消し(Undo) C-x u
84
+ , head : head
85
+ , license : license
86
+ -c, cursor : cursor
87
+ -e, edit : edit
88
+ -s, short_cut : short_cut
89
+ -f, file : file
90
+ -q, quit : quit
91
+ -p, page : page
92
+ -w, window : window
93
+ -b, buffer : buffer
94
+ -m, mode : mode
95
+ , query_replace : query_replace
96
+ -r, ruby-mode : ruby-mode
97
+ -d, dired : ファイラとして使う
98
+ #+END_EXAMPLE
99
+
100
+ ** Make your own help
101
+ For making your new help, you can do tha as follows:
102
+ : my_help new new_help
103
+
104
+ A templeate is compied, then you can edit as
105
+ : my_help edit new_help
106
+ The file is stored in emacs org mode.
107
+
108
+ You can delete if as follows:
109
+ : my_help delete new_help
110
+
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
-
2
+ require 'yard'
3
3
  require 'bundler/gem_tasks'
4
4
  require 'rake/testtask'
5
5
 
@@ -30,3 +30,22 @@ RuboCop::RakeTask.new
30
30
  task :default do
31
31
  system "rake -T"
32
32
  end
33
+
34
+ require "colorize"
35
+ require 'command_line/global'
36
+
37
+ desc 'git auto'
38
+ task :git_auto do
39
+ print "Input comments: "
40
+ comment = STDIN.gets.chomp
41
+ comment = comment == "" ? "auto pull and push" : comment.gsub("\'", "\\'")
42
+ ["git add -A",
43
+ "git commit -m '#{comment}'",
44
+ "git pull origin main",
45
+ "git push origin main"].each do |comm|
46
+ puts comm.cyan
47
+ res = command_line comm
48
+ puts res.stdout.green
49
+ end
50
+ end
51
+
data/development_memo.org CHANGED
@@ -12,6 +12,11 @@
12
12
  #+TWITTER: off
13
13
  #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
14
14
 
15
+ * new development <2024-09-26 Thu>
16
+ - test作ろう
17
+ - '* ' 問題の解決
18
+ - Japanese版の用意
19
+
15
20
  * <2023-01-07 Sat> Thor
16
21
  いくつかのaliasをThorで実現したい
17
22
  - my_help -v