my_help 1.2.3 → 1.2.4p1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,451 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
+ <meta charset="utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>Method List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <div id="content">
23
+ <div class="fixed_header">
24
+ <h1 id="full_list_header">Method List</h1>
25
+ <div id="full_list_nav">
26
+
27
+ <span><a target="_self" href="class_list.html">
28
+ Classes
29
+ </a></span>
30
+
31
+ <span><a target="_self" href="method_list.html">
32
+ Methods
33
+ </a></span>
34
+
35
+ <span><a target="_self" href="file_list.html">
36
+ Files
37
+ </a></span>
38
+
39
+ </div>
40
+
41
+ <div id="search">Search: <input type="text" /></div>
42
+ </div>
43
+
44
+ <ul id="full_list" class="method">
45
+
46
+
47
+ <li class="odd ">
48
+ <div class="item">
49
+ <span class='object_link'><a href="MyHelp/Config.html#[]-instance_method" title="MyHelp::Config#[] (method)">#[]</a></span>
50
+ <small>MyHelp::Config</small>
51
+ </div>
52
+ </li>
53
+
54
+
55
+ <li class="even ">
56
+ <div class="item">
57
+ <span class='object_link'><a href="MyHelp/Init.html#check_conf_exist-instance_method" title="MyHelp::Init#check_conf_exist (method)">#check_conf_exist</a></span>
58
+ <small>MyHelp::Init</small>
59
+ </div>
60
+ </li>
61
+
62
+
63
+ <li class="odd ">
64
+ <div class="item">
65
+ <span class='object_link'><a href="MyHelp/Config.html#config-instance_method" title="MyHelp::Config#config (method)">#config</a></span>
66
+ <small>MyHelp::Config</small>
67
+ </div>
68
+ </li>
69
+
70
+
71
+ <li class="even ">
72
+ <div class="item">
73
+ <span class='object_link'><a href="MyHelp/Config.html#configure-instance_method" title="MyHelp::Config#configure (method)">#configure</a></span>
74
+ <small>MyHelp::Config</small>
75
+ </div>
76
+ </li>
77
+
78
+
79
+ <li class="odd ">
80
+ <div class="item">
81
+ <span class='object_link'><a href="MyHelp/Config.html#configure_with-instance_method" title="MyHelp::Config#configure_with (method)">#configure_with</a></span>
82
+ <small>MyHelp::Config</small>
83
+ </div>
84
+ </li>
85
+
86
+
87
+ <li class="even ">
88
+ <div class="item">
89
+ <span class='object_link'><a href="MyHelp/Org2Hash.html#contents-instance_method" title="MyHelp::Org2Hash#contents (method)">#contents</a></span>
90
+ <small>MyHelp::Org2Hash</small>
91
+ </div>
92
+ </li>
93
+
94
+
95
+ <li class="odd ">
96
+ <div class="item">
97
+ <span class='object_link'><a href="MyHelp/Md2Hash.html#contents-instance_method" title="MyHelp::Md2Hash#contents (method)">#contents</a></span>
98
+ <small>MyHelp::Md2Hash</small>
99
+ </div>
100
+ </li>
101
+
102
+
103
+ <li class="even ">
104
+ <div class="item">
105
+ <span class='object_link'><a href="MyHelp/Init.html#cp_templates-instance_method" title="MyHelp::Init#cp_templates (method)">#cp_templates</a></span>
106
+ <small>MyHelp::Init</small>
107
+ </div>
108
+ </li>
109
+
110
+
111
+ <li class="odd ">
112
+ <div class="item">
113
+ <span class='object_link'><a href="MyHelp/Modify.html#delete-instance_method" title="MyHelp::Modify#delete (method)">#delete</a></span>
114
+ <small>MyHelp::Modify</small>
115
+ </div>
116
+ </li>
117
+
118
+
119
+ <li class="even ">
120
+ <div class="item">
121
+ <span class='object_link'><a href="MyHelp/CLI.html#delete-instance_method" title="MyHelp::CLI#delete (method)">#delete</a></span>
122
+ <small>MyHelp::CLI</small>
123
+ </div>
124
+ </li>
125
+
126
+
127
+ <li class="odd ">
128
+ <div class="item">
129
+ <span class='object_link'><a href="MyHelp/CLI.html#edit-instance_method" title="MyHelp::CLI#edit (method)">#edit</a></span>
130
+ <small>MyHelp::CLI</small>
131
+ </div>
132
+ </li>
133
+
134
+
135
+ <li class="even ">
136
+ <div class="item">
137
+ <span class='object_link'><a href="MyHelp/Modify.html#edit-instance_method" title="MyHelp::Modify#edit (method)">#edit</a></span>
138
+ <small>MyHelp::Modify</small>
139
+ </div>
140
+ </li>
141
+
142
+
143
+ <li class="odd ">
144
+ <div class="item">
145
+ <span class='object_link'><a href="MyHelp/CLI.html#exit_on_failure%3F-class_method" title="MyHelp::CLI.exit_on_failure? (method)">exit_on_failure?</a></span>
146
+ <small>MyHelp::CLI</small>
147
+ </div>
148
+ </li>
149
+
150
+
151
+ <li class="even ">
152
+ <div class="item">
153
+ <span class='object_link'><a href="MyHelp/List.html#find_near-instance_method" title="MyHelp::List#find_near (method)">#find_near</a></span>
154
+ <small>MyHelp::List</small>
155
+ </div>
156
+ </li>
157
+
158
+
159
+ <li class="odd ">
160
+ <div class="item">
161
+ <span class='object_link'><a href="MyHelp/Md2Hash.html#fsm-instance_method" title="MyHelp::Md2Hash#fsm (method)">#fsm</a></span>
162
+ <small>MyHelp::Md2Hash</small>
163
+ </div>
164
+ </li>
165
+
166
+
167
+ <li class="even ">
168
+ <div class="item">
169
+ <span class='object_link'><a href="MyHelp/GetConfig.html#get_config-instance_method" title="MyHelp::GetConfig#get_config (method)">#get_config</a></span>
170
+ <small>MyHelp::GetConfig</small>
171
+ </div>
172
+ </li>
173
+
174
+
175
+ <li class="odd ">
176
+ <div class="item">
177
+ <span class='object_link'><a href="MyHelp/CLI.html#hello-instance_method" title="MyHelp::CLI#hello (method)">#hello</a></span>
178
+ <small>MyHelp::CLI</small>
179
+ </div>
180
+ </li>
181
+
182
+
183
+ <li class="even ">
184
+ <div class="item">
185
+ <span class='object_link'><a href="Org2Yaml.html#help_cont-instance_method" title="Org2Yaml#help_cont (method)">#help_cont</a></span>
186
+ <small>Org2Yaml</small>
187
+ </div>
188
+ </li>
189
+
190
+
191
+ <li class="odd ">
192
+ <div class="item">
193
+ <span class='object_link'><a href="MyHelp/Init.html#help_dir_exist%3F-instance_method" title="MyHelp::Init#help_dir_exist? (method)">#help_dir_exist?</a></span>
194
+ <small>MyHelp::Init</small>
195
+ </div>
196
+ </li>
197
+
198
+
199
+ <li class="even ">
200
+ <div class="item">
201
+ <span class='object_link'><a href="MyHelp/CLI.html#init-instance_method" title="MyHelp::CLI#init (method)">#init</a></span>
202
+ <small>MyHelp::CLI</small>
203
+ </div>
204
+ </li>
205
+
206
+
207
+ <li class="odd ">
208
+ <div class="item">
209
+ <span class='object_link'><a href="Org2Yaml.html#initialize-instance_method" title="Org2Yaml#initialize (method)">#initialize</a></span>
210
+ <small>Org2Yaml</small>
211
+ </div>
212
+ </li>
213
+
214
+
215
+ <li class="even ">
216
+ <div class="item">
217
+ <span class='object_link'><a href="MyHelp/Org2Hash.html#initialize-instance_method" title="MyHelp::Org2Hash#initialize (method)">#initialize</a></span>
218
+ <small>MyHelp::Org2Hash</small>
219
+ </div>
220
+ </li>
221
+
222
+
223
+ <li class="odd ">
224
+ <div class="item">
225
+ <span class='object_link'><a href="MyHelp/Init.html#initialize-instance_method" title="MyHelp::Init#initialize (method)">#initialize</a></span>
226
+ <small>MyHelp::Init</small>
227
+ </div>
228
+ </li>
229
+
230
+
231
+ <li class="even ">
232
+ <div class="item">
233
+ <span class='object_link'><a href="MyHelp/List.html#initialize-instance_method" title="MyHelp::List#initialize (method)">#initialize</a></span>
234
+ <small>MyHelp::List</small>
235
+ </div>
236
+ </li>
237
+
238
+
239
+ <li class="odd ">
240
+ <div class="item">
241
+ <span class='object_link'><a href="MyHelp/Config.html#initialize-instance_method" title="MyHelp::Config#initialize (method)">#initialize</a></span>
242
+ <small>MyHelp::Config</small>
243
+ </div>
244
+ </li>
245
+
246
+
247
+ <li class="even ">
248
+ <div class="item">
249
+ <span class='object_link'><a href="MyHelp/Modify.html#initialize-instance_method" title="MyHelp::Modify#initialize (method)">#initialize</a></span>
250
+ <small>MyHelp::Modify</small>
251
+ </div>
252
+ </li>
253
+
254
+
255
+ <li class="odd ">
256
+ <div class="item">
257
+ <span class='object_link'><a href="MyHelp/Md2Hash.html#initialize-instance_method" title="MyHelp::Md2Hash#initialize (method)">#initialize</a></span>
258
+ <small>MyHelp::Md2Hash</small>
259
+ </div>
260
+ </li>
261
+
262
+
263
+ <li class="even ">
264
+ <div class="item">
265
+ <span class='object_link'><a href="MyHelp/CLI.html#list-instance_method" title="MyHelp::CLI#list (method)">#list</a></span>
266
+ <small>MyHelp::CLI</small>
267
+ </div>
268
+ </li>
269
+
270
+
271
+ <li class="odd ">
272
+ <div class="item">
273
+ <span class='object_link'><a href="MyHelp/List.html#list-instance_method" title="MyHelp::List#list (method)">#list</a></span>
274
+ <small>MyHelp::List</small>
275
+ </div>
276
+ </li>
277
+
278
+
279
+ <li class="even ">
280
+ <div class="item">
281
+ <span class='object_link'><a href="MyHelp/List.html#list_help_with-instance_method" title="MyHelp::List#list_help_with (method)">#list_help_with</a></span>
282
+ <small>MyHelp::List</small>
283
+ </div>
284
+ </li>
285
+
286
+
287
+ <li class="odd ">
288
+ <div class="item">
289
+ <span class='object_link'><a href="MyHelp/List.html#list_helps-instance_method" title="MyHelp::List#list_helps (method)">#list_helps</a></span>
290
+ <small>MyHelp::List</small>
291
+ </div>
292
+ </li>
293
+
294
+
295
+ <li class="even ">
296
+ <div class="item">
297
+ <span class='object_link'><a href="Org2Yaml.html#make_options-instance_method" title="Org2Yaml#make_options (method)">#make_options</a></span>
298
+ <small>Org2Yaml</small>
299
+ </div>
300
+ </li>
301
+
302
+
303
+ <li class="odd ">
304
+ <div class="item">
305
+ <span class='object_link'><a href="MyHelp/Md2Hash.html#md_text-instance_method" title="MyHelp::Md2Hash#md_text (method)">#md_text</a></span>
306
+ <small>MyHelp::Md2Hash</small>
307
+ </div>
308
+ </li>
309
+
310
+
311
+ <li class="even ">
312
+ <div class="item">
313
+ <span class='object_link'><a href="MyHelp/Init.html#mk_help_dir-instance_method" title="MyHelp::Init#mk_help_dir (method)">#mk_help_dir</a></span>
314
+ <small>MyHelp::Init</small>
315
+ </div>
316
+ </li>
317
+
318
+
319
+ <li class="odd ">
320
+ <div class="item">
321
+ <span class='object_link'><a href="MyHelp/CLI.html#new-instance_method" title="MyHelp::CLI#new (method)">#new</a></span>
322
+ <small>MyHelp::CLI</small>
323
+ </div>
324
+ </li>
325
+
326
+
327
+ <li class="even ">
328
+ <div class="item">
329
+ <span class='object_link'><a href="MyHelp/Modify.html#new-instance_method" title="MyHelp::Modify#new (method)">#new</a></span>
330
+ <small>MyHelp::Modify</small>
331
+ </div>
332
+ </li>
333
+
334
+
335
+ <li class="odd ">
336
+ <div class="item">
337
+ <span class='object_link'><a href="Org2Yaml.html#next_cont-instance_method" title="Org2Yaml#next_cont (method)">#next_cont</a></span>
338
+ <small>Org2Yaml</small>
339
+ </div>
340
+ </li>
341
+
342
+
343
+ <li class="even ">
344
+ <div class="item">
345
+ <span class='object_link'><a href="MyHelp/Md2Hash.html#opts-instance_method" title="MyHelp::Md2Hash#opts (method)">#opts</a></span>
346
+ <small>MyHelp::Md2Hash</small>
347
+ </div>
348
+ </li>
349
+
350
+
351
+ <li class="odd ">
352
+ <div class="item">
353
+ <span class='object_link'><a href="Org2Yaml.html#org_to_yaml-instance_method" title="Org2Yaml#org_to_yaml (method)">#org_to_yaml</a></span>
354
+ <small>Org2Yaml</small>
355
+ </div>
356
+ </li>
357
+
358
+
359
+ <li class="even ">
360
+ <div class="item">
361
+ <span class='object_link'><a href="MyHelp/Git.html#pull-instance_method" title="MyHelp::Git#pull (method)">#pull</a></span>
362
+ <small>MyHelp::Git</small>
363
+ </div>
364
+ </li>
365
+
366
+
367
+ <li class="odd ">
368
+ <div class="item">
369
+ <span class='object_link'><a href="MyHelp/Git.html#push-instance_method" title="MyHelp::Git#push (method)">#push</a></span>
370
+ <small>MyHelp::Git</small>
371
+ </div>
372
+ </li>
373
+
374
+
375
+ <li class="even ">
376
+ <div class="item">
377
+ <span class='object_link'><a href="MyHelp/List.html#read_help-instance_method" title="MyHelp::List#read_help (method)">#read_help</a></span>
378
+ <small>MyHelp::List</small>
379
+ </div>
380
+ </li>
381
+
382
+
383
+ <li class="odd ">
384
+ <div class="item">
385
+ <span class='object_link'><a href="MyHelp/Org2Hash.html#read_item-instance_method" title="MyHelp::Org2Hash#read_item (method)">#read_item</a></span>
386
+ <small>MyHelp::Org2Hash</small>
387
+ </div>
388
+ </li>
389
+
390
+
391
+ <li class="even ">
392
+ <div class="item">
393
+ <span class='object_link'><a href="MyHelp/Md2Hash.html#results-instance_method" title="MyHelp::Md2Hash#results (method)">#results</a></span>
394
+ <small>MyHelp::Md2Hash</small>
395
+ </div>
396
+ </li>
397
+
398
+
399
+ <li class="odd ">
400
+ <div class="item">
401
+ <span class='object_link'><a href="MyHelp/Config.html#save_config-instance_method" title="MyHelp::Config#save_config (method)">#save_config</a></span>
402
+ <small>MyHelp::Config</small>
403
+ </div>
404
+ </li>
405
+
406
+
407
+ <li class="even ">
408
+ <div class="item">
409
+ <span class='object_link'><a href="MyHelp/CLI.html#set-instance_method" title="MyHelp::CLI#set (method)">#set</a></span>
410
+ <small>MyHelp::CLI</small>
411
+ </div>
412
+ </li>
413
+
414
+
415
+ <li class="odd ">
416
+ <div class="item">
417
+ <span class='object_link'><a href="MyHelp/Org2Hash.html#simple_fsm-instance_method" title="MyHelp::Org2Hash#simple_fsm (method)">#simple_fsm</a></span>
418
+ <small>MyHelp::Org2Hash</small>
419
+ </div>
420
+ </li>
421
+
422
+
423
+ <li class="even ">
424
+ <div class="item">
425
+ <span class='object_link'><a href="MyHelp/Org2Hash.html#text-instance_method" title="MyHelp::Org2Hash#text (method)">#text</a></span>
426
+ <small>MyHelp::Org2Hash</small>
427
+ </div>
428
+ </li>
429
+
430
+
431
+ <li class="odd ">
432
+ <div class="item">
433
+ <span class='object_link'><a href="MyHelp/Config.html#valid_config_keys-instance_method" title="MyHelp::Config#valid_config_keys (method)">#valid_config_keys</a></span>
434
+ <small>MyHelp::Config</small>
435
+ </div>
436
+ </li>
437
+
438
+
439
+ <li class="even ">
440
+ <div class="item">
441
+ <span class='object_link'><a href="MyHelp/CLI.html#version-instance_method" title="MyHelp::CLI#version (method)">#version</a></span>
442
+ <small>MyHelp::CLI</small>
443
+ </div>
444
+ </li>
445
+
446
+
447
+
448
+ </ul>
449
+ </div>
450
+ </body>
451
+ </html>
@@ -0,0 +1,112 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Top Level Namespace
8
+
9
+ &mdash; my_help
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index</a> &raquo;
40
+
41
+
42
+ <span class="title">Top Level Namespace</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Top Level Namespace
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ </div>
80
+
81
+ <h2>Defined Under Namespace</h2>
82
+ <p class="children">
83
+
84
+
85
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="MyHelp.html" title="MyHelp (module)">MyHelp</a></span>
86
+
87
+
88
+
89
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Org2Yaml.html" title="Org2Yaml (class)">Org2Yaml</a></span>
90
+
91
+
92
+ </p>
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+ </div>
103
+
104
+ <div id="footer">
105
+ Generated on Thu Sep 26 14:20:52 2024 by
106
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
107
+ 0.9.36 (ruby-3.0.2).
108
+ </div>
109
+
110
+ </div>
111
+ </body>
112
+ </html>
data/lib/my_help/cli.rb CHANGED
@@ -20,12 +20,37 @@ module MyHelp
20
20
  desc "version", "show version"
21
21
 
22
22
  def version
23
- print "my_help #{VERSION}"
23
+ puts "my_help #{VERSION}"
24
24
  end
25
25
 
26
26
  desc "git [pull|push]", "git operations"
27
27
  subcommand "git", Git
28
28
 
29
+ map "-a" => :add_defaults
30
+ desc "add_defaults", "add defaults org files"
31
+ def add_defaults
32
+ puts "Adding defaults org files in .my_help"
33
+ config = get_config
34
+ if config[:template_dir] !=
35
+ File.expand_path("../templates", __dir__)
36
+ puts "inconsistency for :template_dir"
37
+ config.configure(:template_dir=>
38
+ File.expand_path("../templates", __dir__))
39
+ config.save_config
40
+ end
41
+ help_dir = options["help_dir"] || config[:local_help_dir]
42
+ p current_orgs = Dir.glob(File.join(help_dir, "*.org")).
43
+ map!{|f| File.basename(f)}
44
+ new_orgs = Dir.glob(File.join(config[:template_dir],'*.org'))
45
+ new_orgs.each do |new_org|
46
+ p [new_org, current_orgs.include?(File.basename(new_org))]
47
+ unless current_orgs.include?(File.basename(new_org))
48
+ FileUtils.cp(new_org, help_dir, verbose: true)
49
+ end
50
+ end
51
+ end
52
+
53
+ map "-i" => :init
29
54
  desc "init", "initialize my_help environment"
30
55
 
31
56
  def init(*args)
@@ -55,6 +80,7 @@ module MyHelp
55
80
  puts File.read(conf_file_path)
56
81
  end
57
82
 
83
+ map "-l" => :list
58
84
  desc "list [HELP] [ITEM]", "list helps"
59
85
  # option :help_dir, :type => :string
60
86
  option :layer, :type => :numeric
@@ -68,8 +94,8 @@ module MyHelp
68
94
  layer).list(*args.join(" "))
69
95
  end
70
96
 
97
+ map "-e" => :edit
71
98
  desc "edit [HELP]", "edit help"
72
-
73
99
  def edit(*args)
74
100
  c = get_config
75
101
  help_name = args[0]
@@ -39,7 +39,8 @@ module MyHelp
39
39
  end
40
40
 
41
41
  def read_item(line)
42
- line.match(/\* (.+)/)[1]
42
+ m = line.match(/\* (.+)/)
43
+ return m ? m[1] : nil
43
44
  end
44
45
  end
45
46
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MyHelp
4
- VERSION = "1.2.3"
4
+ VERSION = "1.2.4p1"
5
5
  end
@@ -1,4 +1,5 @@
1
- #+STARTUP: indent nolineimages overview
1
+ #+OPTIONS: ^:{}
2
+ #+STARTUP: indent nolineimages overview num
2
3
  * head
3
4
  - Emacs key bind
4
5
  - special key command