hyper_card 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/CODE_OF_CONDUCT.md +132 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.org +75 -0
  6. data/Rakefile +36 -0
  7. data/docs/c_basic/2_5_2.c +17 -0
  8. data/docs/c_basic/README.html +175 -0
  9. data/docs/c_basic/README.org +67 -0
  10. data/docs/hyper_card/README.html +104 -0
  11. data/docs/hyper_card/README.org +35 -0
  12. data/docs/hyper_card/Rakefile +8 -0
  13. data/docs/hyper_card/hc_index.rb +54 -0
  14. data/docs/hyper_card/images/HyperCard_24f-01.jpg +0 -0
  15. data/docs/hyper_card/images/HyperCard_24f-02.jpg +0 -0
  16. data/docs/hyper_card/images/HyperCard_24f-03.jpg +0 -0
  17. data/docs/hyper_card/images/HyperCard_24f-04.jpg +0 -0
  18. data/docs/hyper_card/images/HyperCard_24f-05.jpg +0 -0
  19. data/docs/hyper_card/images/HyperCard_24f-06.jpg +0 -0
  20. data/docs/hyper_card/images/HyperCard_24f-07.jpg +0 -0
  21. data/docs/hyper_card/images/HyperCard_24f-08.jpg +0 -0
  22. data/docs/hyper_card/images/HyperCard_24f-09.jpg +0 -0
  23. data/docs/hyper_card/images/HyperCard_24f-10.jpg +0 -0
  24. data/docs/hyper_card/images/HyperCard_24f-11.jpg +0 -0
  25. data/docs/hyper_card/images/HyperCard_24f-12.jpg +0 -0
  26. data/docs/hyper_card/images/HyperCard_24f-13.jpg +0 -0
  27. data/docs/hyper_card/multiple_rake.html +40 -0
  28. data/docs/hyper_card/multiple_rake.org +17 -0
  29. data/docs/hyper_card/rakelib/al_twist.rake +58 -0
  30. data/docs/hyper_card/rakelib/comp_a.rake +55 -0
  31. data/docs/hyper_card/schizophrenia_vs_paranoia/Kato10_book_review_eto.html +105 -0
  32. data/docs/hyper_card/schizophrenia_vs_paranoia/Kato10_book_review_eto.org +49 -0
  33. data/docs/hyper_card/schizophrenia_vs_paranoia/TetsugakuRenshu20_296.html +131 -0
  34. data/docs/hyper_card/schizophrenia_vs_paranoia/TetsugakuRenshu20_296.org +55 -0
  35. data/docs/ruby_basic/README.html +115 -0
  36. data/docs/ruby_basic/README.org +30 -0
  37. data/docs/ruby_basic/Rakefile +56 -0
  38. data/docs/ruby_basic/Rakefile_on_site +69 -0
  39. data/docs/ruby_basic/basic_6/README.org +12 -0
  40. data/docs/ruby_basic/basic_6/readlines.rb +5 -0
  41. data/docs/ruby_basic/fsm/README.html +189 -0
  42. data/docs/ruby_basic/fsm/README.org +27 -0
  43. data/docs/ruby_basic/fsm/README_sample.org +25 -0
  44. data/docs/ruby_basic/fsm/README_sample_org.html +57 -0
  45. data/docs/ruby_basic/fsm/README_sample_org.org +13 -0
  46. data/docs/ruby_basic/fsm/complex/README.html +133 -0
  47. data/docs/ruby_basic/fsm/complex/README.org +50 -0
  48. data/docs/ruby_basic/fsm/complex/check_auto_calc_state_action.rb +35 -0
  49. data/docs/ruby_basic/fsm/complex/check_auto_calc_state_action_rb.html +67 -0
  50. data/docs/ruby_basic/fsm/complex/check_auto_calc_state_action_rb.org +13 -0
  51. data/docs/ruby_basic/fsm/complex/fsm_results.txt +16 -0
  52. data/docs/ruby_basic/fsm/complex/fsm_results_txt.html +52 -0
  53. data/docs/ruby_basic/fsm/complex/fsm_results_txt.org +14 -0
  54. data/docs/ruby_basic/fsm/complex/vasptest.o22698 +4289 -0
  55. data/docs/ruby_basic/fsm/complex/vasptest_short.o01234 +26 -0
  56. data/docs/ruby_basic/fsm/complex/vasptest_short_o01234.html +62 -0
  57. data/docs/ruby_basic/fsm/complex/vasptest_short_o01234.org +14 -0
  58. data/docs/ruby_basic/fsm/fsm_no_hash.html +108 -0
  59. data/docs/ruby_basic/fsm/fsm_no_hash.org +20 -0
  60. data/docs/ruby_basic/fsm/fsm_no_hash.rb +8 -0
  61. data/docs/ruby_basic/fsm/fsm_no_hash_results.txt +4 -0
  62. data/docs/ruby_basic/fsm/fsm_simplest.rb +12 -0
  63. data/docs/ruby_basic/fsm/fsm_state_action.html +50 -0
  64. data/docs/ruby_basic/fsm/fsm_state_action.org +16 -0
  65. data/docs/ruby_basic/fsm/fsm_state_action.rb +34 -0
  66. data/docs/ruby_basic/fsm/fsm_state_action.results +14 -0
  67. data/docs/ruby_basic/fsm/fsm_state_action_rb.html +64 -0
  68. data/docs/ruby_basic/fsm/fsm_state_action_rb.org +13 -0
  69. data/docs/ruby_basic/fsm/fsm_state_action_results.html +46 -0
  70. data/docs/ruby_basic/fsm/fsm_state_action_results.org +13 -0
  71. data/docs/ruby_basic/fsm/fsm_state_key.rb +22 -0
  72. data/docs/ruby_basic/fsm/full_fsm +1 -0
  73. data/docs/ruby_basic/images/seminar_24s-05.jpg +0 -0
  74. data/docs/ruby_basic/images/seminar_24s-06.jpg +0 -0
  75. data/docs/ruby_basic/images/seminar_24s-07.jpg +0 -0
  76. data/docs/ruby_basic/images/seminar_24s-08.jpg +0 -0
  77. data/docs/ruby_basic/images/seminar_24s-09.jpg +0 -0
  78. data/docs/ruby_basic/images/seminar_24s-10.jpg +0 -0
  79. data/docs/ruby_basic/images/seminar_24s-11.jpg +0 -0
  80. data/docs/ruby_basic/images/seminar_24s-12.jpg +0 -0
  81. data/docs/ruby_basic/images/seminar_24s-13.jpg +0 -0
  82. data/docs/ruby_basic/images/seminar_24s-14.jpg +0 -0
  83. data/docs/ruby_basic/images/seminar_24s-15.jpg +0 -0
  84. data/docs/ruby_basic/images/seminar_24s-18.jpg +0 -0
  85. data/docs/ruby_basic/images/seminar_24s-19.jpg +0 -0
  86. data/docs/ruby_basic/images/seminar_24s-2.jpg +0 -0
  87. data/docs/ruby_basic/images/seminar_24s-20.jpg +0 -0
  88. data/docs/ruby_basic/images/seminar_24s-21.jpg +0 -0
  89. data/docs/ruby_basic/images/seminar_24s-22.jpg +0 -0
  90. data/docs/ruby_basic/images/seminar_24s-24.jpg +0 -0
  91. data/docs/ruby_basic/images/seminar_24s-25.jpg +0 -0
  92. data/docs/ruby_basic/images/seminar_24s-27.jpg +0 -0
  93. data/docs/ruby_basic/images/seminar_24s-28.jpg +0 -0
  94. data/docs/ruby_basic/images/seminar_24s-31.jpg +0 -0
  95. data/docs/ruby_basic/images/seminar_24s-34.jpg +0 -0
  96. data/docs/ruby_basic/images/seminar_24s-35.jpg +0 -0
  97. data/docs/ruby_basic/images/seminar_24s-37.jpg +0 -0
  98. data/docs/ruby_basic/images/seminar_24s-38.jpg +0 -0
  99. data/docs/ruby_basic/simple_tdd/README.html +74 -0
  100. data/docs/ruby_basic/simple_tdd/README.org +19 -0
  101. data/exe/hyper_card +3 -0
  102. data/lib/hyper_card/version.rb +5 -0
  103. data/lib/hyper_card.rb +9 -0
  104. data/sig/hyper_card.rbs +4 -0
  105. metadata +150 -0
@@ -0,0 +1,55 @@
1
+ #+OPTIONS: ^:{}
2
+ #+STARTUP: indent nolineimages overview num
3
+ #+TITLE: パラノ的感性とスキゾ的感性
4
+ #+AUTHOR: 哲学の練習帳
5
+ #+LANGUAGE: jp
6
+ #+OPTIONS: H:4 toc:t num:2
7
+ #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
8
+
9
+ https://note.com/kagurakanon/n/n3fd6e1f989ee
10
+
11
+
12
+
13
+ 296
14
+ 哲学の練習帳
15
+ 2020年1月30日 21:58
16
+
17
+ * 「パラノ」と「スキゾ」
18
+
19
+ 「パラノ」と「スキゾ」というかつて一斉を風靡した言葉あります。この用語は、ジル・ドゥルーズとフェリックス・ガタリの共著「アンチ・オイエディプス」のなかで用いられ、これをバブル直前の1984年、浅田彰氏が「逃走論」の中で紹介したことがきっかけで、やたらと流行りだし、その年の流行語大賞の銅賞にも選ばれました。
20
+
21
+ ドゥルーズらの思想は1980代のニューアカデミズムの文脈で当時の消費社会肯定論として受容されましたが、現代においてはまた少し違う意味でスキゾ的な感性が必要とされているでしょう。
22
+
23
+ * 偏執と分裂
24
+
25
+ パラノもスキゾも元々は精神医学に由来する用語であり、「パラノ」はパラノイア=偏執型を指し、「スキゾ」とはスキゾフレニア=分裂型を指しています。
26
+
27
+ ではパラノは何に「偏執」するのでしょうか?それは端的にいえば「私はこういう人間である」という「アイデンティティ」ということになります。これに対して、スキゾは何に「分裂」するのかというと、こちらもまた「アイデンティティ」ということになります。
28
+
29
+ パラノ型の人は「何々大学を出て何々会社に就職」という過去の経歴や「会社では部長、家庭では良き夫、良き父親」という現在の社会的役割といった自らのアイデンティティとなるべく整合的な行動を取ろうとします。これはある意味で一貫性のあるわかりやすい人ということになります。
30
+
31
+ 一方でスキゾ型の人はこれまでのアイデンティティにこだわる事なく、その時々の直感や嗅覚に従って自由奔放に行動していきます。これはある意味で予測不能なわかりにくい人という事になります。
32
+
33
+ * ツリーとリゾーム
34
+
35
+ ドゥルーズはもともと数学における微分の概念を応用して「差異」の研究をした哲学者ですが、この「パラノとスキゾ」という対比を数学的なニュアンスで表現すれば「パラノ」は積分で「スキゾ」は微分ということになります。
36
+
37
+ またドゥウーズは「千のプラトー」において西洋哲学が長らくベースにしたある起点を基にしてそこから枝葉を整合的に広げていくような構造を「ツリー」と言い、これに対して特定の起点を持たず無秩序に拡散していく様相を「リゾーム」と名付けました。このツリーにパラノは、リゾームにスキゾがそれぞれ対応するわけです。
38
+
39
+ この点、浅田氏は「パラノ型」を「住むヒト」と定義し「スキゾ型」を「逃げる人」と定義しました。すなわち張り巡らされたリゾームの中を縦横無尽に逃走するイメージです。
40
+
41
+ ここで重要なのは事態の変化を捉える鋭い嗅覚とこれまでの蓄積をあっさり放棄できるいさぎよさです。
42
+
43
+ スキゾ型はともすれば軟弱とか軽薄とかいったイメージで捉えられがちですが、こうしてみればむしろ、しなやかな感性と決断力を持った人と言えるでしょう。
44
+
45
+ * スキゾ化する現代社会
46
+
47
+ 現代はますますパラノ的な感性だけでは生きづらい時代になって来ていると言えるわけです。
48
+
49
+ 一方で旧来の終身雇用や年功序列に支えられてきた「幸福のロールモデル」が崩壊し、他方で情報化、グローバル化、ポストモダン化が加速する中で、これまで個人がたゆまぬ努力で誠実に積み上げてきたキャリアやスキルが秒速でゴミ屑同然になることも普通にあったりするわけです。
50
+
51
+ こうした変化の激しい時代においてはスキゾ的な感性と決断力がますます優位になっているといえます。
52
+
53
+ こうしてみると今の時代は、パラノ的な感性からすると生きづらい時代ですが、スキゾ的な感性にとってはむしろ面白い時代と言えるかもしれません。
54
+
55
+
@@ -0,0 +1,115 @@
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
+ <!-- 2024-07-04 Thu 14:43 -->
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>Ruby basics</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
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
15
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
16
+ <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/lib/js/jquery.stickytableheaders.min.js"></script>
17
+ <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js"></script>
18
+ </head>
19
+ <body>
20
+ <div id="content" class="content">
21
+ <h1 class="title">Ruby basics</h1>
22
+
23
+ <div id="outline-container-orgea21334" class="outline-2">
24
+ <h2 id="orgea21334"><span class="section-number-2">1.</span> HyperCard designs(concepts)</h2>
25
+ <div class="outline-text-2" id="text-1">
26
+ <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
27
+
28
+
29
+ <colgroup>
30
+ <col class="org-left" />
31
+ </colgroup>
32
+ <tbody>
33
+ <tr>
34
+ <td class="org-left"><img src="./images/seminar_24s-2.jpg" alt="seminar_24s-2.jpg" /></td>
35
+ </tr>
36
+
37
+ <tr>
38
+ <td class="org-left"><img src="./images/seminar_24s-11.jpg" alt="seminar_24s-11.jpg" /></td>
39
+ <td class="org-left"><img src="./images/seminar_24s-12.jpg" alt="seminar_24s-12.jpg" /></td>
40
+ <td class="org-left"><img src="./images/seminar_24s-14.jpg" alt="seminar_24s-14.jpg" /></td>
41
+ </tr>
42
+
43
+ <tr>
44
+ <td class="org-left"><img src="./images/seminar_24s-15.jpg" alt="seminar_24s-15.jpg" /></td>
45
+ <td class="org-left"><img src="./images/seminar_24s-18.jpg" alt="seminar_24s-18.jpg" /></td>
46
+ <td class="org-left"><img src="./images/seminar_24s-25.jpg" alt="seminar_24s-25.jpg" /></td>
47
+ </tr>
48
+
49
+ <tr>
50
+ <td class="org-left"><img src="./images/seminar_24s-31.jpg" alt="seminar_24s-31.jpg" /></td>
51
+ <td class="org-left"><img src="./images/seminar_24s-34.jpg" alt="seminar_24s-34.jpg" /></td>
52
+ <td class="org-left"><img src="./images/seminar_24s-37.jpg" alt="seminar_24s-37.jpg" /></td>
53
+ </tr>
54
+ </tbody>
55
+ </table>
56
+ </div>
57
+ </div>
58
+
59
+ <div id="outline-container-org9d6b093" class="outline-2">
60
+ <h2 id="org9d6b093"><span class="section-number-2">2.</span> Basic six coding elements on Ruby</h2>
61
+ <div class="outline-text-2" id="text-2">
62
+ <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
63
+
64
+
65
+ <colgroup>
66
+ <col class="org-left" />
67
+ </colgroup>
68
+ <tbody>
69
+ <tr>
70
+ <td class="org-left"><img src="./images/seminar_24s-24.jpg" alt="seminar_24s-24.jpg" /></td>
71
+ </tr>
72
+
73
+ <tr>
74
+ <td class="org-left">print(String), name, loop, Array/Hash, if-else, method(class)</td>
75
+ </tr>
76
+ </tbody>
77
+ </table>
78
+ </div>
79
+ </div>
80
+
81
+ <div id="outline-container-org7b75a1b" class="outline-2">
82
+ <h2 id="org7b75a1b"><span class="section-number-2">3.</span> <a href="./simple_tdd/README.html">simple TDD</a></h2>
83
+ <div class="outline-text-2" id="text-3">
84
+ <ul class="org-ul">
85
+ <li>Fibonacci, leap year, Roman Numerals</li>
86
+ </ul>
87
+ </div>
88
+ </div>
89
+ <div id="outline-container-orgcb25f3d" class="outline-2">
90
+ <h2 id="orgcb25f3d"><span class="section-number-2">4.</span> <a href="./fsm/README.html">FSM (Finite State Machine)</a></h2>
91
+ </div>
92
+ <div id="outline-container-org42422e4" class="outline-2">
93
+ <h2 id="org42422e4"><span class="section-number-2">5.</span> Basic pattern</h2>
94
+ <div class="outline-text-2" id="text-5">
95
+ <ul class="org-ul">
96
+ <li class="off"><code>[&#xa0;]</code> File</li>
97
+ <li class="off"><code>[&#xa0;]</code> FileUtils</li>
98
+ <li class="off"><code>[&#xa0;]</code> Dir</li>
99
+ <li class="off"><code>[&#xa0;]</code> RE</li>
100
+ <li class="off"><code>[&#xa0;]</code> Rakefile(DSL)</li>
101
+ </ul>
102
+ </div>
103
+ </div>
104
+
105
+ <div id="outline-container-org008ee45" class="outline-2">
106
+ <h2 id="org008ee45"><span class="section-number-2">6.</span> class TDD</h2>
107
+ </div>
108
+ </div>
109
+ <div id="postamble" class="status">
110
+ <p class="author">Author: Shigeto R. Nishitani</p>
111
+ <p class="date">Created: 2024-07-04 Thu 14:43</p>
112
+ <p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
113
+ </div>
114
+ </body>
115
+ </html>
@@ -0,0 +1,30 @@
1
+ #+OPTIONS: ^:{}
2
+ #+STARTUP: indent nolineimages overview num
3
+ #+TITLE: Ruby basics
4
+ #+AUTHOR: Shigeto R. Nishitani
5
+ #+EMAIL: (concat "shigeto_nishitani@mac.com")
6
+ #+LANGUAGE: jp
7
+ #+OPTIONS: toc:nil
8
+ #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
9
+
10
+ * HyperCard designs(concepts)
11
+ | [[file:./images/seminar_24s-2.jpg]]
12
+ | [[file:./images/seminar_24s-11.jpg]] | [[file:./images/seminar_24s-12.jpg]] | [[file:./images/seminar_24s-14.jpg]] |
13
+ | [[file:./images/seminar_24s-15.jpg]] | [[file:./images/seminar_24s-18.jpg]] | [[file:./images/seminar_24s-25.jpg]] |
14
+ | [[file:./images/seminar_24s-31.jpg]] | [[file:./images/seminar_24s-34.jpg]] | [[file:./images/seminar_24s-37.jpg]] |
15
+
16
+ * Basic six coding elements on Ruby
17
+ | [[file:./images/seminar_24s-24.jpg]] |
18
+ | print(String), name, loop, Array/Hash, if-else, method(class) |
19
+
20
+ * [[file:./simple_tdd/README.org][simple TDD]]
21
+ - Fibonacci, leap year, Roman Numerals
22
+ * [[file:./fsm/README.org][FSM (Finite State Machine)]]
23
+ * Basic pattern
24
+ - [ ] File
25
+ - [ ] FileUtils
26
+ - [ ] Dir
27
+ - [ ] RE
28
+ - [ ] Rakefile(DSL)
29
+
30
+ * class TDD
@@ -0,0 +1,56 @@
1
+ # -*- coding: utf-8 -*-
2
+ require "colorize"
3
+ require 'command_line/global'
4
+
5
+ $target_dir = '/Users/bob/Sites/new_ist/CompAInfo/24s/'
6
+ $target_lecture = 'junior_24s'
7
+ $dir = File.join($target_dir,$target_lecture)
8
+ p ['target hiki dir:', $dir]
9
+
10
+ task :default do
11
+ system "rake -T"
12
+ end
13
+
14
+ desc "rename" #desc -> description
15
+ task :rename do # any name on task_name
16
+ Dir.glob("*.jpg").each do |file|
17
+ target = [$target_lecture,"memo",file.split("_")[-1]].join("_")
18
+ FileUtils.mv(file, target, verbose: true)
19
+ end
20
+ end
21
+
22
+ desc "delete private files"
23
+ task :del_num do
24
+ ['01','02','03','04','16','17',
25
+ '23','26','29','30','32','33','36'
26
+ ].each do |num|
27
+ FileUtils.rm "seminar_24s-#{num}.jpg"
28
+ end
29
+ end
30
+
31
+ desc "mk_list \'*.jpg\' \'with_name\'"
32
+ task :mk_list do # any name on task_name
33
+ images = ARGV[1] || "*.jpg"
34
+ opt = ARGV[2] || "no_name"
35
+ puts ['ARGV', images, opt]
36
+ Dir.glob(images).each do |file|
37
+ if opt == 'with_name'
38
+ puts "| #{file} | [[file:./#{file}]]"
39
+ else
40
+ puts "| [[file:./#{file}]]"
41
+ end
42
+ end
43
+ exit
44
+ end
45
+
46
+ desc "make hyper_card links"
47
+ task :hyper_card do
48
+ [Dir.glob("images/*.jpg"),
49
+ Dir.glob("**/*.html")
50
+ ].flatten.each do |file|
51
+ FileUtils.cp(file, File.join($dir,file), verbose: true)
52
+ end
53
+ system "chmod -R a+r #{$dir}/*"
54
+ system 'rsync --exclude .git -auvz -e ssh ~/Sites/new_ist/ nishitani@ist.ksc.kwansei.ac.jp:~/public_html'
55
+ system "open https://ist.ksc.kwansei.ac.jp/~nishitani/CompAInfo/24s/#{$target_lecture}/README.html"
56
+ end
@@ -0,0 +1,69 @@
1
+ # -*- coding: utf-8 -*-
2
+ require "colorize"
3
+ require 'command_line/global'
4
+
5
+ $dir = Dir.pwd
6
+ $base_name = File.basename($dir).split('_')[1..-1].join('_')
7
+
8
+ task :default do
9
+ system "rake -T"
10
+ end
11
+
12
+ desc "puts hyper_card source dir"
13
+ task :hc_source_dir do
14
+ puts "/Users/bob/git_hub/hyper_card/docs/ruby_basic"
15
+ end
16
+
17
+
18
+ desc "make [default|ARGV[1]].org file" #desc -> description
19
+ task :mk_org do # any name on task_name
20
+ p file = ARGV[1] || $base_name
21
+ text =<<"EOS"
22
+ #+OPTIONS: ^:{}
23
+ #+STARTUP: indent nolineimages overview num
24
+ #+TITLE: #{file}
25
+ #+AUTHOR: Shigeto R. Nishitani
26
+ #+EMAIL: (concat "shigeto_nishitani@mac.com")
27
+ #+LANGUAGE: jp
28
+ #+OPTIONS: H:4 toc:t num:2
29
+ #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
30
+ EOS
31
+ File.write(file+".org", text)
32
+ end
33
+
34
+ desc "rename --real [model] [csl_model]" #desc -> description
35
+ task :rename do # any name on task_name
36
+ puts "Usage :: rename real/dryrun [model] [csl_model]"
37
+ opt = ARGV[1] || 'dryrun'
38
+ old_head = ARGV[2] || 'model'
39
+ new_head = ARGV[3] || 'csl_model'
40
+ Dir.glob("*#{old_head}*").each do |file|
41
+ new_f = file.gsub(old_head, new_head)
42
+ if opt == 'real'
43
+ FileUtils.mv(file, new_f, verbose: true)
44
+ else
45
+ FileUtils::DryRun.mv(file, new_f, verbose: true)
46
+ end
47
+ end
48
+ exit
49
+ end
50
+
51
+ desc "mk_list \'*.jpg\' \'with_name\'"
52
+ task :mk_list do # any name on task_name
53
+ p images = if ARGV[1]==nil
54
+ File.join("./", $base_name, "*")
55
+ else
56
+ "*.jpg"
57
+ end
58
+ opt = ARGV[2] || "no_name"
59
+ puts ['ARGV', images, opt]
60
+ Dir.glob(images).each do |file|
61
+ if opt == 'with_name'
62
+ puts "| #{file} | [[file:./#{file}]]"
63
+ else
64
+ puts "| [[file:./#{file}]]"
65
+ end
66
+ end
67
+ exit
68
+ end
69
+
@@ -0,0 +1,12 @@
1
+ #+OPTIONS: ^:{}
2
+ #+STARTUP: indent nolineimages overview num
3
+ #+TITLE: title
4
+ #+AUTHOR: Shigeto R. Nishitani
5
+ #+EMAIL: (concat "shigeto_nishitani@mac.com")
6
+ #+LANGUAGE: jp
7
+ # +OPTIONS: H:4 toc:t num:2
8
+ #+OPTIONS: toc:nil
9
+ #+TAG: hoge, hoge2
10
+ #+TWITTER: off
11
+ #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
12
+
@@ -0,0 +1,5 @@
1
+ file = ARGV[0] || 'README.org'
2
+
3
+ File.readlines(file).each do |line|
4
+ puts line
5
+ end
@@ -0,0 +1,189 @@
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
+ <!-- 2024-07-06 Sat 15:13 -->
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>fsm (finite state machine)</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
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
15
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
16
+ <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/lib/js/jquery.stickytableheaders.min.js"></script>
17
+ <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js"></script>
18
+ </head>
19
+ <body>
20
+ <div id="content" class="content">
21
+ <h1 class="title">fsm (finite state machine)</h1>
22
+ <div id="table-of-contents" role="doc-toc">
23
+ <h2>Table of Contents</h2>
24
+ <div id="text-table-of-contents" role="doc-toc">
25
+ <ul>
26
+ <li><a href="#org48661c2">1. fsm_no_hash sample</a></li>
27
+ <li><a href="#org7f6330a">2. fsm_simplest</a></li>
28
+ <li><a href="#org29ebf81">3. fsm_state_key</a></li>
29
+ <li><a href="#org0a5ad63">4. fsm_state_action</a></li>
30
+ <li><a href="#org8fd4fad">5. full fsm</a></li>
31
+ </ul>
32
+ </div>
33
+ </div>
34
+
35
+
36
+ <div id="outline-container-org48661c2" class="outline-2">
37
+ <h2 id="org48661c2"><span class="section-number-2">1.</span> fsm_no_hash sample</h2>
38
+ <div class="outline-text-2" id="text-1">
39
+ <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
40
+
41
+
42
+ <colgroup>
43
+ <col class="org-left" />
44
+
45
+ <col class="org-left" />
46
+ </colgroup>
47
+ <tbody>
48
+ <tr>
49
+ <td class="org-left">images/seminar_24s-19.jpg</td>
50
+ <td class="org-left"><img src="../images/seminar_24s-19.jpg" alt="seminar_24s-19.jpg" /></td>
51
+ </tr>
52
+
53
+ <tr>
54
+ <td class="org-left"><a href="./fsm_no_hash.html">./fsm_no_hash.html</a></td>
55
+ <td class="org-left"><a href="./README_sample.html">./README_sample.html</a>, <a href="./fsm_no_hash.rb">./fsm_no_hash.rb</a></td>
56
+ </tr>
57
+ </tbody>
58
+ </table>
59
+ </div>
60
+ </div>
61
+
62
+ <div id="outline-container-org7f6330a" class="outline-2">
63
+ <h2 id="org7f6330a"><span class="section-number-2">2.</span> fsm_simplest</h2>
64
+ <div class="outline-text-2" id="text-2">
65
+ <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
66
+
67
+
68
+ <colgroup>
69
+ <col class="org-left" />
70
+
71
+ <col class="org-left" />
72
+ </colgroup>
73
+ <tbody>
74
+ <tr>
75
+ <td class="org-left">images/seminar_24s-20.jpg</td>
76
+ <td class="org-left"><img src="../images/seminar_24s-20.jpg" alt="seminar_24s-20.jpg" /></td>
77
+ </tr>
78
+ </tbody>
79
+ </table>
80
+ <div class="org-src-container">
81
+ <pre class="src src-text">#+OPTIONS: ^:{}
82
+ #+STARTUP: indent nolineimages overview num
83
+ #+TITLE: title
84
+ #+AUTHOR: Shigeto R. Nishitani
85
+ #+EMAIL: (concat "shigeto_nishitani@mac.com")
86
+ #+LANGUAGE: jp
87
+ #+OPTIONS: H:4 toc:t num:2
88
+ #+TAG: hoge, hoge2
89
+ #+TWITTER: off
90
+ #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
91
+
92
+ * input
93
+ ** head1
94
+ - list1 : 1
95
+ - list2 : 2
96
+
97
+ ** head2
98
+ - list1 : 3
99
+ - list2 : 4
100
+
101
+ * result- table
102
+ | | head1 | head2 |
103
+ |-------+-------+-------|
104
+ | list1 | 1 | 3 |
105
+ | list2 | 2 | 4 |
106
+ </pre>
107
+ </div>
108
+ <div class="org-src-container">
109
+ <pre class="src src-ruby"><span style="color: #cd6600;">require</span> <span style="color: #8b7355;">'scanf'</span>
110
+ <span style="color: #00688b;">TRANSITIONS</span> = {
111
+ <span style="color: #6e8b3d;">:head_search</span> =&gt; [<span style="color: #6e8b3d;">:block_search</span>, <span style="color: #8b7355;">"**"</span>],
112
+ <span style="color: #6e8b3d;">:block_search</span> =&gt; [<span style="color: #6e8b3d;">:head_search</span>, <span style="color: #8b7355;">"- "</span>]
113
+ }
114
+ state, key = <span style="color: #00688b;">TRANSITIONS</span>[<span style="color: #6e8b3d;">:head_search</span>]
115
+ file = <span style="color: #8b7355;">'README.org'</span>
116
+ <span style="color: #00688b;">File</span>.readlines(file)[12..15].each <span style="color: #1c86ee;">do</span> |line|
117
+ <span style="color: #cd6600;">p</span> [state, key, line]
118
+ <span style="color: #cd6600;">p</span> result = line[0..1] == key
119
+ state, key = <span style="color: #00688b;">TRANSITIONS</span>[state] <span style="color: #1c86ee;">if</span> result != []
120
+ <span style="color: #1c86ee;">end</span>
121
+ </pre>
122
+ </div>
123
+ </div>
124
+ </div>
125
+
126
+ <div id="outline-container-org29ebf81" class="outline-2">
127
+ <h2 id="org29ebf81"><span class="section-number-2">3.</span> fsm_state_key</h2>
128
+ <div class="outline-text-2" id="text-3">
129
+ <table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
130
+
131
+
132
+ <colgroup>
133
+ <col class="org-left" />
134
+
135
+ <col class="org-left" />
136
+ </colgroup>
137
+ <tbody>
138
+ <tr>
139
+ <td class="org-left">images/seminar_24s-21.jpg</td>
140
+ <td class="org-left"><img src="../images/seminar_24s-21.jpg" alt="seminar_24s-21.jpg" /></td>
141
+ </tr>
142
+
143
+ <tr>
144
+ <td class="org-left">images/seminar_24s-22.jpg</td>
145
+ <td class="org-left"><img src="../images/seminar_24s-22.jpg" alt="seminar_24s-22.jpg" /></td>
146
+ </tr>
147
+ </tbody>
148
+ </table>
149
+ <div class="org-src-container">
150
+ <pre class="src src-ruby"><span style="color: #7f7f7f;"># </span><span style="color: #7f7f7f;">Current_state =&gt; Trans_state, Key</span>
151
+ <span style="color: #00688b;">TRANSITIONS</span> = {
152
+ <span style="color: #6e8b3d;">:head_search</span> =&gt; [<span style="color: #6e8b3d;">:val_search</span>, <span style="color: #8b7355;">"**"</span>],
153
+ <span style="color: #6e8b3d;">:val_search</span> =&gt; [<span style="color: #6e8b3d;">:head_search</span>, <span style="color: #8b7355;">"- "</span>]
154
+ }
155
+ state,key = <span style="color: #00688b;">TRANSITIONS</span>[<span style="color: #6e8b3d;">:head_search</span>]
156
+ file = <span style="color: #8b7355;">'README.org'</span>
157
+ temp, contents = [], []
158
+ <span style="color: #00688b;">File</span>.readlines(file)[10..20].each_with_index <span style="color: #1c86ee;">do</span> |line,i|
159
+ <span style="color: #cd6600;">p</span> [i, <span style="color: #8b7355;">'before'</span>, state, key, line]
160
+ state, key = <span style="color: #00688b;">TRANSITIONS</span>[state] <span style="color: #1c86ee;">if</span> line[0..1] == key
161
+ <span style="color: #cd6600;">p</span> [i, <span style="color: #8b7355;">'after '</span>, state, key, line]
162
+ <span style="color: #1c86ee;">case</span> state
163
+ <span style="color: #1c86ee;">when</span> <span style="color: #6e8b3d;">:head_search</span>
164
+ contents &lt;&lt; temp
165
+ <span style="color: #cd6600;">p</span> temp = line.scan(<span style="color: #8b7355;">/\*\* (\w+)/</span>)[0] <span style="color: #7f7f7f;">#</span><span style="color: #7f7f7f;">"** head1\n"</span>
166
+ <span style="color: #1c86ee;">when</span> <span style="color: #6e8b3d;">:val_search</span>
167
+ temp &lt;&lt; line
168
+ <span style="color: #1c86ee;">end</span>
169
+ <span style="color: #1c86ee;">end</span>
170
+
171
+ pp contents
172
+ </pre>
173
+ </div>
174
+ </div>
175
+ </div>
176
+ <div id="outline-container-org0a5ad63" class="outline-2">
177
+ <h2 id="org0a5ad63"><span class="section-number-2">4.</span> <a href="fsm_state_action.html">fsm_state_action</a></h2>
178
+ </div>
179
+ <div id="outline-container-org8fd4fad" class="outline-2">
180
+ <h2 id="org8fd4fad"><span class="section-number-2">5.</span> <a href="complex/README.html">full fsm</a></h2>
181
+ </div>
182
+ </div>
183
+ <div id="postamble" class="status">
184
+ <p class="author">Author: Shigeto R. Nishitani</p>
185
+ <p class="date">Created: 2024-07-06 Sat 15:13</p>
186
+ <p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
187
+ </div>
188
+ </body>
189
+ </html>
@@ -0,0 +1,27 @@
1
+ #+OPTIONS: ^:{}
2
+ #+STARTUP: indent nolineimages overview num
3
+ #+TITLE: fsm (finite state machine)
4
+ #+AUTHOR: Shigeto R. Nishitani
5
+ #+EMAIL: (concat "shigeto_nishitani@mac.com")
6
+ #+LANGUAGE: jp
7
+ #+TWITTER: off
8
+ #+OPTIONS: H:4 toc:t num:2
9
+ #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
10
+
11
+
12
+ * fsm_no_hash sample
13
+ | images/seminar_24s-19.jpg | [[file:../images/seminar_24s-19.jpg]] |
14
+ | [[file:./fsm_no_hash.org]] | [[file:./README_sample.org]], [[file:./fsm_no_hash.rb]] |
15
+
16
+ * fsm_simplest
17
+ | images/seminar_24s-20.jpg | [[file:../images/seminar_24s-20.jpg]] |
18
+ #+include: "./README_sample.org" src text
19
+ #+include: "./fsm_simplest.rb" src ruby
20
+
21
+ * fsm_state_key
22
+ | images/seminar_24s-21.jpg | [[file:../images/seminar_24s-21.jpg]] |
23
+ | images/seminar_24s-22.jpg | [[file:../images/seminar_24s-22.jpg]] |
24
+ #+include: "./fsm_state_key.rb" src ruby
25
+ * [[file:fsm_state_action.org][fsm_state_action]]
26
+ * [[file:complex/README.org][full fsm]]
27
+
@@ -0,0 +1,25 @@
1
+ #+OPTIONS: ^:{}
2
+ #+STARTUP: indent nolineimages overview num
3
+ #+TITLE: title
4
+ #+AUTHOR: Shigeto R. Nishitani
5
+ #+EMAIL: (concat "shigeto_nishitani@mac.com")
6
+ #+LANGUAGE: jp
7
+ #+OPTIONS: H:4 toc:t num:2
8
+ #+TAG: hoge, hoge2
9
+ #+TWITTER: off
10
+ #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
11
+
12
+ * input
13
+ ** head1
14
+ - list1 : 1
15
+ - list2 : 2
16
+
17
+ ** head2
18
+ - list1 : 3
19
+ - list2 : 4
20
+
21
+ * result- table
22
+ | | head1 | head2 |
23
+ |-------+-------+-------|
24
+ | list1 | 1 | 3 |
25
+ | list2 | 2 | 4 |
@@ -0,0 +1,57 @@
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
+ <!-- 2024-07-04 Thu 15:15 -->
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>README_sample.org</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
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
15
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
16
+ <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/lib/js/jquery.stickytableheaders.min.js"></script>
17
+ <script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js"></script>
18
+ </head>
19
+ <body>
20
+ <div id="content" class="content">
21
+ <h1 class="title">README_sample.org</h1>
22
+ <div class="org-src-container">
23
+ <pre class="src src-text">#+OPTIONS: ^:{}
24
+ #+STARTUP: indent nolineimages overview num
25
+ #+TITLE: title
26
+ #+AUTHOR: Shigeto R. Nishitani
27
+ #+EMAIL: (concat "shigeto_nishitani@mac.com")
28
+ #+LANGUAGE: jp
29
+ #+OPTIONS: H:4 toc:t num:2
30
+ #+TAG: hoge, hoge2
31
+ #+TWITTER: off
32
+ #+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
33
+
34
+ * input
35
+ ** head1
36
+ - list1 : 1
37
+ - list2 : 2
38
+
39
+ ** head2
40
+ - list1 : 3
41
+ - list2 : 4
42
+
43
+ * result- table
44
+ | | head1 | head2 |
45
+ |-------+-------+-------|
46
+ | list1 | 1 | 3 |
47
+ | list2 | 2 | 4 |
48
+ </pre>
49
+ </div>
50
+ </div>
51
+ <div id="postamble" class="status">
52
+ <p class="author">Author: Shigeto R. Nishitani</p>
53
+ <p class="date">Created: 2024-07-04 Thu 15:15</p>
54
+ <p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
55
+ </div>
56
+ </body>
57
+ </html>