mk_semi_lattice 0.3.1 → 0.4.2

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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.semi_lattice/icons/document.png +0 -0
  3. data/.semi_lattice/icons/folder.png +0 -0
  4. data/README.org +29 -36
  5. data/exe/hc +3 -0
  6. data/lib/.semi_lattice/icons/document.png +0 -0
  7. data/lib/.semi_lattice/icons/folder.png +0 -0
  8. data/lib/Rakefile +32 -0
  9. data/lib/abbrev_checker/abbrev_check.rb +92 -0
  10. data/lib/abbrev_checker/abbrev_sample.tgz +0 -0
  11. data/lib/abbrev_checker/abbrev_yamls/command_tree.yaml +19 -0
  12. data/lib/abbrev_checker/abbrev_yamls/initialism_tree.yaml +13 -0
  13. data/lib/abbrev_checker/check_log.yaml +13 -0
  14. data/lib/abbrev_checker/docs/abbrev_checker/abbrev_checker.001.png +0 -0
  15. data/lib/abbrev_checker/docs/abbrev_checker/abbrev_checker.002.png +0 -0
  16. data/lib/abbrev_checker/docs/abbrev_checker/abbrev_checker.003.png +0 -0
  17. data/lib/abbrev_checker/docs/abbrev_checker.key +0 -0
  18. data/lib/abbrev_checker/docs/readme.html +141 -0
  19. data/lib/abbrev_checker/docs/readme.org +46 -0
  20. data/lib/abbrev_checker/word_log.yaml +18 -0
  21. data/lib/hc.rb +53 -0
  22. data/lib/mk_semi_lattice/.semi_lattice/icons/document.png +0 -0
  23. data/lib/mk_semi_lattice/.semi_lattice/icons/folder.png +0 -0
  24. data/lib/mk_semi_lattice/docs/images/mk_semi_lattice.001.png +0 -0
  25. data/lib/mk_semi_lattice/docs/images/mk_semi_lattice.002.png +0 -0
  26. data/lib/mk_semi_lattice/docs/images/mk_semi_lattice.003.png +0 -0
  27. data/lib/mk_semi_lattice/docs/images/mk_semi_lattice.key +0 -0
  28. data/lib/mk_semi_lattice/docs/readme.html +143 -0
  29. data/lib/mk_semi_lattice/docs/readme.org +50 -0
  30. data/lib/mk_semi_lattice/option_manager.rb +9 -8
  31. data/lib/mk_semi_lattice/version.rb +1 -1
  32. data/lib/mk_semi_lattice.rb +8 -3
  33. data/lib/mk_stack/.semi_lattice/icons/document.png +0 -0
  34. data/lib/mk_stack/.semi_lattice/icons/folder.png +0 -0
  35. data/lib/mk_stack/.vscode/settings.json +4 -0
  36. data/lib/mk_stack/docs/mk_stack/mk_stack.001.png +0 -0
  37. data/lib/mk_stack/docs/mk_stack.key +0 -0
  38. data/lib/mk_stack/docs/readme.html +145 -0
  39. data/lib/mk_stack/docs/readme.org +58 -0
  40. data/lib/mk_stack/mk_stack.rb +140 -0
  41. data/lib/mk_stack/project.code-workspace +5 -0
  42. data/lib/split_pdf/docs/images/split_pdf.001.png +0 -0
  43. data/lib/split_pdf/docs/readme.html +153 -0
  44. data/lib/split_pdf/docs/readme.org +68 -0
  45. data/lib/split_pdf/docs/split_pdf.key +0 -0
  46. data/lib/split_pdf/split_pdf.rb +118 -0
  47. data/lib/voca_buil/.vscode/settings.json +4 -0
  48. data/lib/voca_buil/docs/readme.html +200 -0
  49. data/lib/voca_buil/docs/readme.org +72 -0
  50. data/lib/voca_buil/docs/voca_buil/voca_buil.001.png +0 -0
  51. data/lib/voca_buil/docs/voca_buil/voca_buil.002.png +0 -0
  52. data/lib/voca_buil/docs/voca_buil/voca_buil.003.png +0 -0
  53. data/lib/voca_buil/docs/voca_buil/voca_buil.004.png +0 -0
  54. data/lib/voca_buil/docs/voca_buil/voca_buil.005.png +0 -0
  55. data/lib/voca_buil/docs/voca_buil/voca_buil.006.png +0 -0
  56. data/lib/voca_buil/docs/voca_buil/voca_buil.007.png +0 -0
  57. data/lib/voca_buil/docs/voca_buil/voca_buil.008.png +0 -0
  58. data/lib/voca_buil/docs/voca_buil/voca_buil.009.png +0 -0
  59. data/lib/voca_buil/docs/voca_buil/voca_buil.010.png +0 -0
  60. data/lib/voca_buil/docs/voca_buil/voca_buil.011.png +0 -0
  61. data/lib/voca_buil/docs/voca_buil/voca_buil.012.png +0 -0
  62. data/lib/voca_buil/docs/voca_buil/voca_buil.013.png +0 -0
  63. data/lib/voca_buil/docs/voca_buil/voca_buil.014.png +0 -0
  64. data/lib/voca_buil/docs/voca_buil/voca_buil.015.png +0 -0
  65. data/lib/voca_buil/docs/voca_buil/voca_buil.016.png +0 -0
  66. data/lib/voca_buil/docs/voca_buil/voca_buil.017.png +0 -0
  67. data/lib/voca_buil/docs/voca_buil/voca_buil.018.png +0 -0
  68. data/lib/voca_buil/docs/voca_buil.key +0 -0
  69. data/lib/voca_buil/docs/voca_buil.pdf +0 -0
  70. data/lib/voca_buil/docs/voca_buil.png +0 -0
  71. data/lib/voca_buil/etymological_builder_check_sample.tgz +0 -0
  72. data/lib/voca_buil/multi_check.rb +342 -0
  73. data/lib/voca_buil/project.code-workspace +5 -0
  74. data/readme.html +143 -0
  75. metadata +71 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d344bc5e5985d443acbd280d0c567b0e01be8635971e5155339d5b3b21e1b76
4
- data.tar.gz: 3782664243e07f23a4e800505d08daf299963afb0df5923a489602ead09d84ad
3
+ metadata.gz: d49d5b8296a90a63aa48297ecbd97cd11a15a47fcb76fd0c989abdaf3f903c1c
4
+ data.tar.gz: 2de54ea10aabac73e38b55195e95f58acc8c68792ccfc293957401e30f4c81ab
5
5
  SHA512:
6
- metadata.gz: 9c9d8bd624f964fe520ba5b55dbad67cdac44a0791b1693f6d3d177e5c9555675cc88a853e764cbd99eea209c7c120a0d2b1e420911a128f34c68aa8148d7105
7
- data.tar.gz: f3990badd3f2fbd9d7a0c1b4a99322c8203a018d9d0e80e30018da3d8736980599a37b9bfca0a77480b71f8a01bde7edbce8097584d5d26a5480295327f02134
6
+ metadata.gz: dd0f12a7a89315ea0bd53a3edbfe3d57233f02ac9adb0f7565068da1aec30211e515fdbaaacfb2b42d7ea22e63b02966f9deb449d2d277e0d699bb8a3c849ade
7
+ data.tar.gz: 93e17b130e328e11ad5bdd82fa5370f122764993b9abaf355b9e3be81f9ed036c198e1e387b04243994439712adc073b5d50d836f6773590660aa092493ccb45
Binary file
Binary file
data/README.org CHANGED
@@ -1,9 +1,19 @@
1
- * MkSemiLattice
2
- Making semi-lattice graph from directory or other yaml files.
3
-
4
- ** Installation
1
+ #+OPTIONS: ^:{}
2
+ #+STARTUP: indent nolineimages overview num
3
+ #+TITLE: mk_semi_lattice, hc
4
+ #+AUTHOR: Shigeto R. Nishitani
5
+ #+EMAIL: (concat "shigeto_nishitani@mac.com")
6
+ #+LANGUAGE: jp
7
+ #+OPTIONS: H:4 toc:t num:2
8
+ #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
9
+
10
+ * Name
11
+ セミラティス(semi lattice)構造を表示するmk_slコマンドと,
12
+ 英単語の習得を目指したhcコマンドです.
13
+
14
+ * Installation
5
15
  'mk_semi_lattice' depends on 'ruby2d'.
6
- See the installation manual on https://www.ruby2d.com.
16
+ See the installation manual on [[https://www.ruby2d.com/learn/linux/#install-packages][https://www.ruby2d.com]].
7
17
 
8
18
  Install the gem and add to the application's Gemfile by executing:
9
19
 
@@ -18,52 +28,35 @@ executing:
18
28
  gem install mk_semi_lattice
19
29
  #+end_src
20
30
 
21
- ** Usage
31
+ * Usage
22
32
  #+begin_src bash
23
- mk_semi_lattice is running...
24
- Usage: mk_semi_lattice PATH [options]
25
- Default PATH = '.'
26
-
27
- When using -I, always use '=' or quote the pattern, e.g.:
28
- -I='_stack_*|*.yaml' -a
29
- --ignore='_stack_*|*.yaml' -a
30
- Multiple patterns can be separated by '|'.
31
- Wildcards '*' and '?' are supported (like the 'tree' command).
32
- Do not use -ad; use -a -d for combined flags.
33
-
34
- -L N Layer depth (default: 2)
35
- -n, --node=FILE using File from node-edge
36
- -t, --tree=FILE using File from tree
37
- -i, --index Display node ids
38
- -l, --log [BOOL] Enable/disable logging (true/false), and save to config
39
- -v, --version show version
40
- -d Show directories only
41
- -a Show all (files and directories)
42
- -Y YAML exclude mode
43
- -I, --ignore=PATTERN Ignore files/dirs matching PATTERN (e.g. '_stack_*|*.yaml')
33
+ > hc -h
34
+ Commands:
44
35
  #+end_src
45
-
46
- ** Development
47
- After checking out the repo, run =bin/setup= to install dependencies.
48
- Then, run =rake test= to run the tests. You can also run =bin/console=
49
- for an interactive prompt that will allow you to experiment.
50
-
36
+ - [[./lib/abbrev_checker/docs/readme.org][hc abbrev]] # check abbreviations
37
+ - [[./lib/voca_buil/docs/readme.org][hc check]] # check word for vocabulary builder
38
+ - hc help [COMMAND] # Describe available commands or one specific command
39
+ - [[./lib/split_pdf/docs/readme.org][hc split_pdf]] # split PDF files
40
+ - [[./lib/mk_stack/docs/readme.org][hc stack]] # make stacks
41
+ - [[./lib/mk_semi_lattice/docs/readme.org][hc view]] # View Semi Lattice Graph
42
+
43
+ * Development
51
44
  To install this gem onto your local machine, run
52
45
  =bundle exec rake install=. To release a new version, update the version
53
46
  number in =version.rb=, and then run =bundle exec rake release=, which
54
47
  will create a git tag for the version, push git commits and the created
55
48
  tag, and push the =.gem= file to [[https://rubygems.org][rubygems.org]].
56
49
 
57
- ** Contributing
50
+ * Contributing
58
51
  Bug reports and pull requests are welcome on GitHub at
59
52
  https://github.com/daddygongon/mk_semi_lattice. This project is intended
60
53
  to be a safe, welcoming space for collaboration, and contributors are
61
54
  expected to adhere to the [[https://github.com/%5BUSERNAME%5D/mk_semi_lattice/blob/main/CODE_OF_CONDUCT.md][code of conduct]].
62
55
 
63
- ** License
56
+ * License
64
57
  The gem is available as open source under the terms of the [[https://opensource.org/licenses/MIT][MIT License]].
65
58
 
66
- ** Code of Conduct
59
+ * Code of Conduct
67
60
  Everyone interacting in the MkSemiLattice project's codebases, issue
68
61
  trackers, chat rooms and mailing lists is expected to follow the
69
62
  [[https://github.com/%5BUSERNAME%5D/mk_semi_lattice/blob/main/CODE_OF_CONDUCT.md][code of conduct]].
data/exe/hc ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "hc"
Binary file
data/lib/Rakefile ADDED
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+ require "colorize"
3
+ require 'command_line/global'
4
+
5
+ task :default do
6
+ system "rake -T"
7
+ end
8
+
9
+ namespace :develop do
10
+ desc "clean up dirs"
11
+ task :tidy do # any name on task_name
12
+ # your code goes
13
+ ['**/check_log.yaml',
14
+ './check_log.yaml',
15
+ '**/word_log.yaml',
16
+ './word_log.yaml'].each do |file|
17
+ p comm = "rm -f #{file}"
18
+ system comm
19
+ end
20
+ exit
21
+ end
22
+ desc "mk sample tgz"
23
+ task :mk_tgz do # any name on task_name
24
+ # your code goes
25
+ t_name= "abbrev_sample.tgz"
26
+ dirs = "abbrev_yamls"
27
+ p comm = "tar -cvf #{t_name} #{dirs}"
28
+ system comm
29
+ exit
30
+ end
31
+
32
+ end
@@ -0,0 +1,92 @@
1
+ # !/usr/bin/env ruby
2
+ require 'thor'
3
+ require 'optparse'
4
+ require 'colorize'
5
+ require 'yaml'
6
+ require 'date'
7
+ require_relative '../voca_buil/multi_check' # VocaBuilを親クラスとして利用
8
+
9
+ module AbbrevCheck
10
+ class OptionParserWrapper < VocaBuil::OptionParserWrapper
11
+ # 必要ならここでオプションのデフォルト値などを上書き
12
+ end
13
+
14
+ class BaseCheck < VocaBuil::BaseCheck
15
+ # 選択肢を作らず、単語を直接入力させる
16
+ def get_user_inputs(words_shuffled, w_num)
17
+ user_inputs = []
18
+ words_shuffled.first(w_num).each_with_index do |ew, idx|
19
+ break if ew.nil?
20
+ question = "Q#{idx+1}: '#{ew[0]}' ? -> "
21
+ if ENV['SIMPLE_CHECK_TEST']
22
+ puts question
23
+ user_inputs << ew[1] # テスト時は正解を自動入力
24
+ else
25
+ input = Thor::Shell::Basic.new.ask question
26
+ user_input = input ? input.chomp.unicode_normalize(:nfkc) : ""
27
+ user_inputs << user_input
28
+ end
29
+ end
30
+ user_inputs
31
+ end
32
+
33
+ # 入力が正解と完全一致するか判定
34
+ def check_results(words_shuffled, user_inputs, w_num)
35
+ results = {}
36
+ [w_num, words_shuffled.size].min.times do |i|
37
+ ans = words_shuffled[i]
38
+ next if ans.nil?
39
+ user_input = user_inputs[i]
40
+ print "'#{user_input}' "
41
+ if user_input == ans[1]
42
+ print "true: ".green
43
+ t_or_f = 't'
44
+ else
45
+ print "false: ".red
46
+ t_or_f = 'f'
47
+ end
48
+ p ans
49
+ results[ans[0]] = t_or_f
50
+ end
51
+ results
52
+ end
53
+
54
+ # runメソッドを上書き
55
+ def run
56
+ selector = WordsSelector.new(@word_log_file, @options)
57
+ words_shuffled = selector.select(@options[:w_num], @options[:a_num])
58
+ user_inputs = get_user_inputs(words_shuffled, @options[:w_num])
59
+ results = check_results(words_shuffled, user_inputs, @options[:w_num])
60
+ update_logs(results)
61
+ results
62
+ end
63
+ end
64
+
65
+ class WordsSelector < VocaBuil::WordsSelector
66
+ # 必要ならここで上書き
67
+ end
68
+
69
+ class IterativeCheck < VocaBuil::IterativeCheck
70
+ # 必要ならここで上書き
71
+ end
72
+
73
+ class InstallCheckSample < VocaBuil::InstallCheckSample
74
+ def initialize(tgz_file = 'abbrev_sample.tgz')
75
+ # abbrev_checker ディレクトリを基準にパスを解決
76
+ @tgz_file = File.join(File.dirname(__FILE__), tgz_file)
77
+ end
78
+ end
79
+ end
80
+
81
+ if __FILE__ == $0
82
+ options = AbbrevCheck::OptionParserWrapper.parse
83
+ if options[:install]
84
+ AbbrevCheck::InstallCheckSample.new.run
85
+ exit
86
+ end
87
+ if options[:iter]
88
+ AbbrevCheck::IterativeCheck.new(options, options[:iter]).run
89
+ else
90
+ AbbrevCheck::BaseCheck.new(options).run
91
+ end
92
+ end
@@ -0,0 +1,19 @@
1
+ ---
2
+ ls=list:
3
+ ls -lat=list long all time:
4
+ mv=move:
5
+ cp=copy:
6
+ pwd=print working directory:
7
+ mkdir=make directory:
8
+ rm=remove:
9
+ rm -rf=PATHを再帰的で強制的に削除=remove recursively forcefully:
10
+ cd=change directory:
11
+ c-a=ahead:
12
+ c-e=end:
13
+ c-p=previous:
14
+ c-n=next:
15
+ c-f=forward:
16
+ c-b=backward:
17
+ c-d=delete:
18
+ c-k=kill line:
19
+
@@ -0,0 +1,13 @@
1
+ ---
2
+ GPT=generative pre-trained transformer:
3
+ LLM=large language model:
4
+ CLI=command line interface:
5
+ CLA=command line application:
6
+ GUI=graphical user interface:
7
+ CUI=character user interface:
8
+ TCP=transmission control protocol:
9
+ HTTP=hyper text transfer protocol:
10
+ DNS=domain name system:
11
+ IP=internet protocol:
12
+ cwd=current working directory:
13
+
@@ -0,0 +1,13 @@
1
+ ---
2
+ - - '2026-01-12 12:38:31'
3
+ - "-f abbrev_yamls/command_tree.yaml"
4
+ - 5/5
5
+ - - '2026-01-12 12:39:49'
6
+ - "-f abbrev_yamls/initialism_tree.yaml"
7
+ - 4/5
8
+ - - '2026-01-12 12:42:06'
9
+ - "-f abbrev_yamls/initialism_tree.yaml"
10
+ - 5/5
11
+ - - '2026-01-12 12:42:33'
12
+ - "-f abbrev_yamls/command_tree.yaml"
13
+ - 5/5
@@ -0,0 +1,141 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="jp" xml:lang="jp">
5
+ <head>
6
+ <!-- 2026-01-12 Mon 13:02 -->
7
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
9
+ <title>hc abbrevの使い方</title>
10
+ <meta name="author" content="Shigeto R. Nishitani" />
11
+ <meta name="generator" content="Org Mode" />
12
+ <link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/htmlize.css"/>
13
+ <link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/readtheorg.css"/>
14
+ <link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/code-copy.css"/>
15
+ <link rel="stylesheet" type="text/css" href="src/readtheorg_theme/css/search.css"/>
16
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
17
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
18
+ <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/lib/js/jquery.stickytableheaders.min.js"></script>
19
+ <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/search.js"></script>
20
+ <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js"></script>
21
+ <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/code-copy.js"></script>
22
+ </head>
23
+ <body>
24
+ <div id="content" class="content">
25
+ <h1 class="title">hc abbrevの使い方</h1>
26
+ <div id="table-of-contents" role="doc-toc">
27
+ <h2>Table of Contents</h2>
28
+ <div id="text-table-of-contents" role="doc-toc">
29
+ <ul>
30
+ <li><a href="#orgdfd811e">1. name</a></li>
31
+ <li><a href="#org93d8eb7">2. install</a></li>
32
+ <li><a href="#org9672085">3. help</a></li>
33
+ <li><a href="#orgda40b6d">4. usage</a></li>
34
+ <li><a href="#org33c9e32">5. dir_tree.yaml編集</a></li>
35
+ </ul>
36
+ </div>
37
+ </div>
38
+ <div id="outline-container-orgdfd811e" class="outline-2">
39
+ <h2 id="orgdfd811e"><span class="section-number-2">1.</span> name</h2>
40
+ <div class="outline-text-2" id="text-1">
41
+ <ul class="org-ul">
42
+ <li>'hc abbrev'はプログラミングで頻出するabbreviation(短縮形)の
43
+ buildingを行うclaです.</li>
44
+ <li>短縮形になっているwordのfull spellを打ち込んでください.</li>
45
+ <li>'hc check'を少し拡張しただけです.</li>
46
+ </ul>
47
+ </div>
48
+ </div>
49
+ <div id="outline-container-org93d8eb7" class="outline-2">
50
+ <h2 id="org93d8eb7"><span class="section-number-2">2.</span> install</h2>
51
+ <div class="outline-text-2" id="text-2">
52
+ <div class="org-src-container">
53
+ <pre class="src src-bash">&gt; sudo gem install mk_semi_lattice <span style="color: #7f7f7f;"># </span><span style="color: #7f7f7f;">install mk_sl and hc</span>
54
+ &gt; hc abbrev --install <span style="color: #7f7f7f;"># </span><span style="color: #7f7f7f;">install abbrev_yamls</span>
55
+ &gt; cd abbrev_yamls
56
+ </pre>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ <div id="outline-container-org9672085" class="outline-2">
61
+ <h2 id="org9672085"><span class="section-number-2">3.</span> help</h2>
62
+ <div class="outline-text-2" id="text-3">
63
+ <div class="org-src-container">
64
+ <pre class="src src-bash">&gt; hc abbrev -h
65
+ Usage: hc check [options]
66
+ -f, --file FILE YAML file to use
67
+ -a, --answer NUM <span style="color: #7f7f7f;"># </span><span style="color: #7f7f7f;">not used</span>
68
+ -q, --quiz NUM Number of quiz(def 5)
69
+ -i, --iterative [NUM] Test iteratively (<span style="color: #2e8b57;">num</span>=2)
70
+ --install Install sample check data
71
+ </pre>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ <div id="outline-container-orgda40b6d" class="outline-2">
76
+ <h2 id="orgda40b6d"><span class="section-number-2">4.</span> usage</h2>
77
+ <div class="outline-text-2" id="text-4">
78
+ <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
79
+
80
+
81
+ <colgroup>
82
+ <col class="org-left" />
83
+ </colgroup>
84
+ <tbody>
85
+ <tr>
86
+ <td class="org-left"><img src="./abbrev_checker/abbrev_checker.002.png" alt="abbrev_checker.002.png" /></td>
87
+ </tr>
88
+
89
+ <tr>
90
+ <td class="org-left">Fig.1 hc abbrevの動作.</td>
91
+ </tr>
92
+ </tbody>
93
+ </table>
94
+ </div>
95
+ </div>
96
+ <div id="outline-container-org33c9e32" class="outline-2">
97
+ <h2 id="org33c9e32"><span class="section-number-2">5.</span> dir_tree.yaml編集</h2>
98
+ <div class="outline-text-2" id="text-5">
99
+ <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
100
+
101
+
102
+ <colgroup>
103
+ <col class="org-left" />
104
+ </colgroup>
105
+ <tbody>
106
+ <tr>
107
+ <td class="org-left"><img src="./abbrev_checker/abbrev_checker.003.png" alt="abbrev_checker.003.png" /></td>
108
+ </tr>
109
+
110
+ <tr>
111
+ <td class="org-left">Fig.2 dir_tree.yamlのフォーマット.</td>
112
+ </tr>
113
+ </tbody>
114
+ </table>
115
+ <p>
116
+ Answers-Quizはdir_tree.yamlから取り出しています.
117
+ 自分の進捗に合わせて編集していってください.
118
+ 消してしまわずに'#'でコメントアウトするのが正しいやり方.
119
+ </p>
120
+
121
+ <p>
122
+ さらに,
123
+ </p>
124
+ <pre class="example">
125
+ &gt; hc stack
126
+ </pre>
127
+
128
+ <p>
129
+ でバックアップをとって変えていくのがコツです.
130
+ <a href="../../mk_stack/docs/readme.html">stackの解説</a>を参照ください.
131
+ </p>
132
+ </div>
133
+ </div>
134
+ </div>
135
+ <div id="postamble" class="status">
136
+ <p class="author">Author: Shigeto R. Nishitani</p>
137
+ <p class="date">Created: 2026-01-12 Mon 13:02</p>
138
+ <p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
139
+ </div>
140
+ </body>
141
+ </html>
@@ -0,0 +1,46 @@
1
+ #+OPTIONS: ^:{}
2
+ #+STARTUP: indent nolineimages overview num
3
+ #+TITLE: hc abbrevの使い方
4
+ #+AUTHOR: Shigeto R. Nishitani
5
+ #+EMAIL: (concat "shigeto_nishitani@mac.com")
6
+ #+LANGUAGE: jp
7
+ #+OPTIONS: H:4 toc:t num:2
8
+ #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
9
+
10
+ * name
11
+ - 'hc abbrev'はプログラミングで頻出するabbreviation(短縮形)の
12
+ buildingを行うclaです.
13
+ - 短縮形になっているwordのfull spellを打ち込んでください.
14
+ - 'hc check'を少し拡張しただけです.
15
+
16
+ * install
17
+ #+begin_src bash
18
+ > sudo gem install mk_semi_lattice # install mk_sl and hc
19
+ > hc abbrev --install # install abbrev_yamls
20
+ > cd abbrev_yamls
21
+ #+end_src
22
+ * help
23
+ #+begin_src bash
24
+ > hc abbrev -h
25
+ Usage: hc check [options]
26
+ -f, --file FILE YAML file to use
27
+ -a, --answer NUM # not used
28
+ -q, --quiz NUM Number of quiz(def 5)
29
+ -i, --iterative [NUM] Test iteratively (num=2)
30
+ --install Install sample check data
31
+ #+end_src
32
+ * usage
33
+ | [[file:./abbrev_checker/abbrev_checker.002.png]]
34
+ | Fig.1 hc abbrevの動作.
35
+ * dir_tree.yaml編集
36
+ | [[file:./abbrev_checker/abbrev_checker.003.png]]
37
+ | Fig.2 dir_tree.yamlのフォーマット.
38
+ Answers-Quizはdir_tree.yamlから取り出しています.
39
+ 自分の進捗に合わせて編集していってください.
40
+ 消してしまわずに'#'でコメントアウトするのが正しいやり方.
41
+
42
+ さらに,
43
+ : > hc stack
44
+ でバックアップをとって変えていくのがコツです.
45
+ [[../../mk_stack/docs/readme.org][stackの解説]]を参照ください.
46
+
@@ -0,0 +1,18 @@
1
+ ---
2
+ ls: t
3
+ ls -lat: t
4
+ mv: t
5
+ cp: t
6
+ pwd: t
7
+ mkdir:
8
+ rm:
9
+ rm -rf:
10
+ cd:
11
+ c-a:
12
+ c-e:
13
+ c-p:
14
+ c-n:
15
+ c-f:
16
+ c-b:
17
+ c-d:
18
+ c-k:
data/lib/hc.rb ADDED
@@ -0,0 +1,53 @@
1
+ require 'thor'
2
+ require_relative "mk_semi_lattice/version"
3
+ require_relative "mk_stack/mk_stack"
4
+ require_relative "voca_buil/multi_check"
5
+ require_relative "split_pdf/split_pdf"
6
+ require_relative "abbrev_checker/abbrev_check"
7
+
8
+
9
+ class CLI < Thor
10
+ desc "view", "View Semi Lattice Graph"
11
+ def view(*argv)
12
+ system "mk_semi_lattice", *argv
13
+ end
14
+
15
+ desc 'stack', 'make stacks'
16
+ def stack(*argv)
17
+ MkStack.new(argv).run
18
+ end
19
+
20
+ desc 'split_pdf', 'split PDF files'
21
+ def split_pdf(*argv)
22
+ SplitPDF.new(argv).run
23
+ end
24
+ desc 'check', 'check word for vocabulary builder'
25
+ def check(*argv)
26
+ options = VocaBuil::OptionParserWrapper.parse
27
+ if options[:install]
28
+ VocaBuil::InstallCheckSample.new.run
29
+ exit
30
+ end
31
+ if options[:iter]
32
+ VocaBuil::IterativeCheck.new(options, options[:iter]).run
33
+ else
34
+ VocaBuil::BaseCheck.new(options).run
35
+ end
36
+ end
37
+
38
+ desc 'abbrev', 'check abbreviations'
39
+ def abbrev(*argv)
40
+ options = AbbrevCheck::OptionParserWrapper.parse
41
+ if options[:install]
42
+ AbbrevCheck::InstallCheckSample.new.run
43
+ exit
44
+ end
45
+ if options[:iter]
46
+ AbbrevCheck::IterativeCheck.new(options, options[:iter]).run
47
+ else
48
+ AbbrevCheck::BaseCheck.new(options).run
49
+ end
50
+ end
51
+ end
52
+
53
+ CLI.start(ARGV)