my_help 0.4.5 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +2 -0
- data/.gitignore +29 -2
- data/.ipynb_checkpoints/README-checkpoint.ipynb +511 -0
- data/.ipynb_checkpoints/Untitled-checkpoint.ipynb +6 -0
- data/.ruby-version +1 -0
- data/Dockerfile.template +13 -0
- data/README.md +341 -256
- data/README.org +480 -0
- data/Rakefile +9 -31
- data/docs/.ipynb_checkpoints/README-checkpoint.ipynb +112 -0
- data/docs/.ipynb_checkpoints/Untitled-checkpoint.ipynb +219 -0
- data/docs/README.ipynb +112 -0
- data/docs/bob/README_en.ipynb +219 -0
- data/docs/bob/diff_against_org_mode.ipynb +119 -0
- data/docs/bob/emacs_help.ipynb +133 -0
- data/docs/bob/template_help.ipynb +136 -0
- data/{my_help_nasu → docs/nasu}/.gitignore +0 -0
- data/{my_help_nasu → docs/nasu}/Rakefile +91 -20
- data/docs/nasu/abstract.hiki +17 -0
- data/{my_help_nasu → docs/nasu}/code.hiki +25 -21
- data/docs/nasu/discussion.hiki +38 -0
- data/docs/nasu/features/add.feature +12 -0
- data/docs/nasu/features/all_help.feature +10 -0
- data/docs/nasu/features/backup_list.feature +10 -0
- data/docs/nasu/features/edit_help.feature +9 -0
- data/docs/nasu/features/my_todo.feature +16 -0
- data/docs/nasu/features/remove.feature +10 -0
- data/docs/nasu/features/sample_e.feature +6 -0
- data/docs/nasu/features/step_definitions/add_spec.rb +18 -0
- data/docs/nasu/features/step_definitions/all_help_spec.rb +18 -0
- data/docs/nasu/features/step_definitions/backup_list_spec.rb +18 -0
- data/docs/nasu/features/step_definitions/edit_help_spec.rb +19 -0
- data/docs/nasu/features/step_definitions/my_todo_spec.rb +25 -0
- data/docs/nasu/features/step_definitions/remove_spec.rb +18 -0
- data/docs/nasu/features/step_definitions/store_spec.rb +18 -0
- data/docs/nasu/features/step_definitions/to_hiki_spec.rb +18 -0
- data/docs/nasu/features/store.feature +10 -0
- data/docs/nasu/features/support/env.rb +2 -0
- data/docs/nasu/features/test.feature +10 -0
- data/docs/nasu/features/to_hiki.feature +10 -0
- data/{my_help_nasu → docs/nasu}/features.hiki +80 -70
- data/docs/nasu/figs/cucumber01.001.jpg +0 -0
- data/docs/nasu/figs/cucumber02.001.jpg +0 -0
- data/docs/nasu/figs/cucumber03.001.jpg +0 -0
- data/docs/nasu/figs/cucumber04.001.jpg +0 -0
- data/docs/nasu/figs/cucumber05.001.jpg +0 -0
- data/docs/nasu/figs/cucumber1.jpg +0 -0
- data/docs/nasu/figs/cucumber2.jpg +0 -0
- data/docs/nasu/figs/cucumber3.jpg +0 -0
- data/docs/nasu/figs/cucumber4.jpg +0 -0
- data/docs/nasu/figs/my_help_nasu.001.jpeg +0 -0
- data/docs/nasu/figs/my_help_nasu.002.jpeg +0 -0
- data/docs/nasu/figs/my_help_nasu.003.jpeg +0 -0
- data/docs/nasu/figs/my_help_nasu.004.jpeg +0 -0
- data/docs/nasu/figs/my_help_nasu.005.jpeg +0 -0
- data/docs/nasu/figs/my_help_nasu.006.jpeg +0 -0
- data/docs/nasu/figs/my_help_nasu.007.jpeg +0 -0
- data/docs/nasu/figs/my_help_nasu.008.jpeg +0 -0
- data/docs/nasu/figs/my_help_nasu.pdf +0 -0
- data/docs/nasu/figs/my_help_nasu.png +0 -0
- data/docs/nasu/figs/my_help_nasu1.001.jpg +0 -0
- data/docs/nasu/figs/rspec01.001.jpg +0 -0
- data/docs/nasu/figs/rspec1.jpg +0 -0
- data/docs/nasu/figs/rspec2.jpg +0 -0
- data/{my_help_nasu → docs/nasu}/head2.tex +0 -0
- data/{my_help_nasu → docs/nasu}/hiki_help.yml +0 -0
- data/{my_help_nasu → docs/nasu}/introduction.hiki +15 -16
- data/{my_help_nasu → docs/nasu}/key_bind_mi +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/mt10@2x-87.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/mt1@2x-78.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/mt2@2x-79.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/mt3@2x-80.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/mt4@2x-81.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/mt5@2x-82.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/mt6@2x-83.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/mt7@2x-84.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/mt8@2x-85.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/mt9@2x-86.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/pasted-image-89.png +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/pasted-image-small-90.png +0 -0
- data/docs/nasu/keynote/cucumber01.key/Data/st0-104.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/Index.zip +0 -0
- data/docs/nasu/keynote/cucumber01.key/Metadata/BuildVersionHistory.plist +8 -0
- data/docs/nasu/keynote/cucumber01.key/Metadata/DocumentIdentifier +1 -0
- data/docs/nasu/keynote/cucumber01.key/Metadata/Properties.plist +0 -0
- data/docs/nasu/keynote/cucumber01.key/preview-micro.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/preview-web.jpg +0 -0
- data/docs/nasu/keynote/cucumber01.key/preview.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/mt10@2x-87.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/mt1@2x-78.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/mt2@2x-79.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/mt3@2x-80.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/mt4@2x-81.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/mt5@2x-82.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/mt6@2x-83.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/mt7@2x-84.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/mt8@2x-85.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/mt9@2x-86.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/pasted-image-89.png +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/pasted-image-small-90.png +0 -0
- data/docs/nasu/keynote/cucumber02.key/Data/st0-96.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/Index.zip +0 -0
- data/docs/nasu/keynote/cucumber02.key/Metadata/BuildVersionHistory.plist +8 -0
- data/docs/nasu/keynote/cucumber02.key/Metadata/DocumentIdentifier +1 -0
- data/docs/nasu/keynote/cucumber02.key/Metadata/Properties.plist +0 -0
- data/docs/nasu/keynote/cucumber02.key/preview-micro.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/preview-web.jpg +0 -0
- data/docs/nasu/keynote/cucumber02.key/preview.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/mt10@2x-87.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/mt1@2x-78.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/mt2@2x-79.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/mt3@2x-80.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/mt4@2x-81.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/mt5@2x-82.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/mt6@2x-83.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/mt7@2x-84.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/mt8@2x-85.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/mt9@2x-86.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/pasted-image-89.png +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/pasted-image-small-90.png +0 -0
- data/docs/nasu/keynote/cucumber03.key/Data/st0-100.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/Index.zip +0 -0
- data/docs/nasu/keynote/cucumber03.key/Metadata/BuildVersionHistory.plist +8 -0
- data/docs/nasu/keynote/cucumber03.key/Metadata/DocumentIdentifier +1 -0
- data/docs/nasu/keynote/cucumber03.key/Metadata/Properties.plist +0 -0
- data/docs/nasu/keynote/cucumber03.key/preview-micro.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/preview-web.jpg +0 -0
- data/docs/nasu/keynote/cucumber03.key/preview.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/mt10@2x-87.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/mt1@2x-78.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/mt2@2x-79.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/mt3@2x-80.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/mt4@2x-81.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/mt5@2x-82.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/mt6@2x-83.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/mt7@2x-84.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/mt8@2x-85.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/mt9@2x-86.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/pasted-image-106.png +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/pasted-image-small-107.png +0 -0
- data/docs/nasu/keynote/cucumber04.key/Data/st0-115.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/Index.zip +0 -0
- data/docs/nasu/keynote/cucumber04.key/Metadata/BuildVersionHistory.plist +8 -0
- data/docs/nasu/keynote/cucumber04.key/Metadata/DocumentIdentifier +1 -0
- data/docs/nasu/keynote/cucumber04.key/Metadata/Properties.plist +0 -0
- data/docs/nasu/keynote/cucumber04.key/preview-micro.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/preview-web.jpg +0 -0
- data/docs/nasu/keynote/cucumber04.key/preview.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/mt10@2x-87.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/mt1@2x-78.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/mt2@2x-79.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/mt3@2x-80.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/mt4@2x-81.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/mt5@2x-82.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/mt6@2x-83.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/mt7@2x-84.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/mt8@2x-85.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/mt9@2x-86.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/pasted-image-89.png +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/pasted-image-small-90.png +0 -0
- data/docs/nasu/keynote/cucumber05.key/Data/st0-97.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/Index.zip +0 -0
- data/docs/nasu/keynote/cucumber05.key/Metadata/BuildVersionHistory.plist +8 -0
- data/docs/nasu/keynote/cucumber05.key/Metadata/DocumentIdentifier +1 -0
- data/docs/nasu/keynote/cucumber05.key/Metadata/Properties.plist +0 -0
- data/docs/nasu/keynote/cucumber05.key/preview-micro.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/preview-web.jpg +0 -0
- data/docs/nasu/keynote/cucumber05.key/preview.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/mt10@2x-87.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/mt1@2x-78.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/mt2@2x-79.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/mt3@2x-80.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/mt4@2x-81.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/mt5@2x-82.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/mt6@2x-83.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/mt7@2x-84.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/mt8@2x-85.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/mt9@2x-86.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Data/st0-299.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Index.zip +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Metadata/BuildVersionHistory.plist +8 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Metadata/DocumentIdentifier +1 -0
- data/docs/nasu/keynote/my_help_nasu1.key/Metadata/Properties.plist +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/preview-micro.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/preview-web.jpg +0 -0
- data/docs/nasu/keynote/my_help_nasu1.key/preview.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/mt10@2x-87.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/mt1@2x-78.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/mt2@2x-79.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/mt3@2x-80.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/mt4@2x-81.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/mt5@2x-82.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/mt6@2x-83.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/mt7@2x-84.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/mt8@2x-85.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/mt9@2x-86.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/pasted-image-89.png +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/pasted-image-small-90.png +0 -0
- data/docs/nasu/keynote/rspec01.key/Data/st0-96.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/Index.zip +0 -0
- data/docs/nasu/keynote/rspec01.key/Metadata/BuildVersionHistory.plist +8 -0
- data/docs/nasu/keynote/rspec01.key/Metadata/DocumentIdentifier +1 -0
- data/docs/nasu/keynote/rspec01.key/Metadata/Properties.plist +0 -0
- data/docs/nasu/keynote/rspec01.key/preview-micro.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/preview-web.jpg +0 -0
- data/docs/nasu/keynote/rspec01.key/preview.jpg +0 -0
- data/docs/nasu/latex_dir/abstract.tex +18 -0
- data/{my_help_nasu → docs/nasu}/latex_dir/code.tex +9 -21
- data/docs/nasu/latex_dir/discussion.aux +28 -0
- data/docs/nasu/latex_dir/discussion.tex +19 -0
- data/docs/nasu/latex_dir/features.aux +30 -0
- data/docs/nasu/latex_dir/features.tex +186 -0
- data/{my_help_nasu → docs/nasu}/latex_dir/head.tex +1 -1
- data/{my_help_nasu → docs/nasu}/latex_dir/introduction.aux +3 -3
- data/{my_help_nasu → docs/nasu}/latex_dir/introduction.tex +15 -16
- data/{my_help_nasu → docs/nasu}/latex_dir/jlisting.sty +0 -0
- data/{my_help_nasu/latex_dir/consideration.aux → docs/nasu/latex_dir/method.aux} +7 -8
- data/docs/nasu/latex_dir/method.tex +6 -0
- data/{my_help_nasu → docs/nasu}/latex_dir/method_bdd.aux +10 -7
- data/{my_help_nasu → docs/nasu}/latex_dir/method_bdd.tex +14 -5
- data/{my_help_nasu → docs/nasu}/latex_dir/method_cucumber.aux +10 -9
- data/{my_help_nasu → docs/nasu}/latex_dir/method_cucumber.tex +15 -18
- data/{my_help_nasu → docs/nasu}/latex_dir/method_usage.aux +11 -11
- data/{my_help_nasu → docs/nasu}/latex_dir/method_usage.tex +35 -29
- data/{my_help_nasu → docs/nasu}/latex_dir/my_help_nasu.aux +6 -5
- data/docs/nasu/latex_dir/my_help_nasu.log +363 -0
- data/docs/nasu/latex_dir/my_help_nasu.pdf +0 -0
- data/docs/nasu/latex_dir/my_help_nasu.synctex.gz +0 -0
- data/{my_help_nasu → docs/nasu}/latex_dir/my_help_nasu.tex +12 -18
- data/docs/nasu/latex_dir/my_help_nasu.toc +35 -0
- data/docs/nasu/latex_dir/new_code.aux +44 -0
- data/docs/nasu/latex_dir/new_code.tex +237 -0
- data/{my_help_nasu → docs/nasu}/latex_dir/overview.aux +2 -2
- data/{my_help_nasu/latex_dir → docs/nasu}/latex_dir/pre.tex +0 -0
- data/docs/nasu/method.hiki +5 -0
- data/{my_help_nasu → docs/nasu}/method_bdd.hiki +14 -8
- data/{my_help_nasu → docs/nasu}/method_cucumber.hiki +14 -17
- data/{my_help_nasu → docs/nasu}/method_usage.hiki +25 -24
- data/docs/nasu/my_help_nasu/my_help_nasu.001.bb +5 -0
- data/{my_help_nasu → docs/nasu}/my_help_nasu/my_help_nasu.001.jpeg +0 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.002.bb +5 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.002.jpeg +0 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.003.bb +5 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.003.jpeg +0 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.004.bb +5 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.004.jpeg +0 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.005.bb +5 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.005.jpeg +0 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.006.bb +5 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.006.jpeg +0 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.007.bb +5 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.007.jpeg +0 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.008.bb +5 -0
- data/docs/nasu/my_help_nasu/my_help_nasu.008.jpeg +0 -0
- data/docs/nasu/my_help_nasu.hiki +28 -0
- data/docs/nasu/my_help_nasu.key +0 -0
- data/docs/nasu/my_help_nasu09.key +0 -0
- data/docs/nasu/my_help_nasu1/my_help_nasu1.001.jpg +0 -0
- data/docs/nasu/nasu_abst/abst_fig.bb +5 -0
- data/docs/nasu/nasu_abst/abst_fig.png +0 -0
- data/docs/nasu/nasu_abst/my_help_nasu.001.bb +5 -0
- data/docs/nasu/nasu_abst/my_help_nasu.001.jpg +0 -0
- data/docs/nasu/nasu_abst/my_help_nasu.001.png +0 -0
- data/docs/nasu/nasu_abst/nasu_abst.aux +10 -0
- data/docs/nasu/nasu_abst/nasu_abst.log +179 -0
- data/docs/nasu/nasu_abst/nasu_abst.pdf +0 -0
- data/docs/nasu/nasu_abst/nasu_abst.synctex.gz +0 -0
- data/docs/nasu/nasu_abst/nasu_abst.tex +63 -0
- data/docs/nasu/new_code.hiki +246 -0
- data/docs/nasu/spec/.rspec +2 -0
- data/docs/nasu/spec/my_help_spec.rb +75 -0
- data/docs/nasu/spec/my_todo/todo_spec.rb +15 -0
- data/docs/nasu/spec/spec_helper.rb +11 -0
- data/docs/nasu/spec/support/aruba.rb +1 -0
- data/docs/nasu/spec/thor_spec.rb +81 -0
- data/docs/nasu/test/my_help_test.rb +11 -0
- data/docs/nasu/test/test_helper.rb +4 -0
- data/{hikis → docs}/tmp.org +0 -0
- data/docs/yagi/bachelor_thesis/final/figs/opt_thor.jpeg +0 -0
- data/docs/yagi/bachelor_thesis/final/handout/handout.aux +14 -0
- data/{my_help_nasu/latex_dir/my_help_nasu.log → docs/yagi/bachelor_thesis/final/handout/handout.log} +46 -175
- data/docs/yagi/bachelor_thesis/final/handout/handout.pdf +0 -0
- data/docs/yagi/bachelor_thesis/final/handout/handout.synctex.gz +0 -0
- data/docs/yagi/bachelor_thesis/final/handout/handout.tex +123 -0
- data/docs/yagi/bachelor_thesis/final/mk_latex/thesis/thesis.aux +46 -0
- data/docs/yagi/bachelor_thesis/final/mk_latex/thesis/thesis.dvi +0 -0
- data/{lor → docs/yagi/bachelor_thesis/final/mk_latex/thesis/thesis.lof} +0 -0
- data/docs/yagi/bachelor_thesis/final/mk_latex/thesis/thesis.lot +0 -0
- data/docs/yagi/bachelor_thesis/final/mk_latex/thesis/thesis.synctex.gz +0 -0
- data/docs/yagi/bachelor_thesis/final/mk_latex/thesis/thesis.toc +0 -0
- data/docs/yagi/bachelor_thesis/final/thesis/figs/opt_thor.png +0 -0
- data/docs/yagi/bachelor_thesis/final/thesis/final_thesis.ipynb +449 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/latex/final_thesis.tex +718 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/chapter1/chapter1.tex +8 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/chapter2/chapter2.log +28 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/chapter2/chapter2.tex +127 -0
- data/{my_help_nasu/latex_dir/method_cucumber.log → docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/chapter3/chapter3.log} +11 -11
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/chapter3/chapter3.tex +328 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/chapter4/chapter4.tex +13 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/chapter5/chapter5.tex +5 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/chapter6/chapter6.log +38 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/chapter6/chapter6.tex +28 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/informations/informations.aux +1 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/informations/informations.log +55 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/informations/informations.tex +6 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/split_files/tmp/tmp.tex +1 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/.splits_location.tex +6 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/thesis.aux +114 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/thesis.lof +4 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/thesis.log +699 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/thesis.lot +5 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/thesis.out.ps +98 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/thesis.pdf +0 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/thesis.synctex.gz +0 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/thesis.tex +30 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/thesis.toc +22 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis/thesis_checked_180213_1433.pdf +0 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis_pieces/form00_style.tex +25 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis_pieces/tightlist_setting.tex +2 -0
- data/docs/yagi/bachelor_thesis/final/thesis/mk_latex/thesis_pieces/usepackage.tex +25 -0
- data/docs/yagi/bachelor_thesis/translation/awesome_chapter2.ipynb +84 -0
- data/docs/yagi/bachelor_thesis/translation/awesome_introduction.ipynb +328 -0
- data/docs/yagi/comparisons/.ipynb_checkpoints/Untitled-checkpoint.ipynb +6 -0
- data/docs/yagi/comparisons/.ipynb_checkpoints/comp-checkpoint.ipynb +230 -0
- data/docs/yagi/comparisons/comp.ipynb +178 -0
- data/docs/yagi/comparisons/hanami.rb +25 -0
- data/docs/yagi/comparisons/optparse.rb +21 -0
- data/docs/yagi/comparisons/thor.rb +11 -0
- data/docs/yagi/midterm_presentation/.ipynb_checkpoints/abst-checkpoint.ipynb +87 -0
- data/docs/yagi/midterm_presentation/abst.aux +16 -0
- data/docs/yagi/midterm_presentation/abst.ipynb +87 -0
- data/docs/yagi/midterm_presentation/abst.log +222 -0
- data/docs/yagi/midterm_presentation/abst.pdf +0 -0
- data/docs/yagi/midterm_presentation/abst.synctex.gz +0 -0
- data/docs/yagi/midterm_presentation/abst.tex +133 -0
- data/{my_help_nasu/latex_dir/jlisting.tex → docs/yagi/midterm_presentation/jlisting.sty} +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote/mid_keynote.001.png +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote/mid_keynote.002.png +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote/mid_keynote.003.png +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote/mid_keynote.004.png +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote/mid_keynote.005.png +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/110809_FamilyChineseOahu_EN_00317_2040x1360-small-12.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/110809_FamilyChineseOahu_EN_02016_981x654-small-14.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/110809_FamilyChineseOahu_EN_02390_2880x1921-small-10.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/mt10@2x-92.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/mt1@2x-83.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/mt2@2x-84.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/mt3@2x-85.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/mt4@2x-86.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/mt5@2x-87.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/mt6@2x-88.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/mt7@2x-89.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/mt8@2x-90.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/mt9@2x-91.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/st0-438.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/st1-598.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/st2-648.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/st3-652.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Data/st4-671.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Index.zip +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Metadata/BuildVersionHistory.plist +8 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Metadata/DocumentIdentifier +1 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/Metadata/Properties.plist +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/preview-micro.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/preview-web.jpg +0 -0
- data/docs/yagi/midterm_presentation/mid_keynote.key/preview.jpg +0 -0
- data/docs/yagi/thor_spec.ipynb +192 -0
- data/docs/yagi/thor_task.ipynb +98 -0
- data/exe/my_help +3 -1
- data/lib/my_help/org2yml.rb +46 -0
- data/lib/my_help/version.rb +1 -1
- data/lib/my_help/yml2org.rb +36 -0
- data/lib/my_help.rb +76 -30
- data/lib/my_help_thor.rb +170 -0
- data/lib/my_todo/my_todo.rb +5 -2
- data/lib/specific_help.rb +52 -25
- data/lib/{specific_help.rb~ → specific_help_bu.rb} +129 -89
- data/lib/specific_help_opt.rb +71 -0
- data/lib/specific_help_thor.rb +172 -0
- data/lib/templates/emacs_help.org +47 -0
- data/lib/templates/emacs_help_e.org +49 -0
- data/lib/templates/my_todo.org +11 -0
- data/lib/templates/template_help.org +8 -0
- data/make_docker.sh +5 -0
- data/my_help.gemspec +3 -2
- metadata +406 -92
- data/.DS_Store +0 -0
- data/CODE_OF_CONDUCT.md +0 -49
- data/README_en.md +0 -132
- data/exe/e_h +0 -4
- data/exe/emacs_help +0 -4
- data/exe/my_todo +0 -4
- data/hikis/README_en.hiki +0 -130
- data/hikis/README_ja.hiki +0 -316
- data/hikis/diff_against_org-mode.hiki +0 -34
- data/hikis/emacs_help.hiki +0 -47
- data/hikis/template_help.hiki +0 -51
- data/latexes/handout_pre.tex +0 -11
- data/lib/.emacs_help.rb.swp +0 -0
- data/lib/daddygongon/emacs_help.yml +0 -89
- data/lib/daddygongon/my_todo.yml +0 -31
- data/lib/daddygongon/template_help.yml +0 -33
- data/lib/emacs_help.rb~ +0 -137
- data/lib/my_todo/my_todo.rb~ +0 -7
- data/lib/todo.rb~ +0 -1
- data/my_help.wiki/Home.md +0 -330
- data/my_help.wiki/README_en.md +0 -132
- data/my_help.wiki/README_ja.md +0 -330
- data/my_help.wiki/emacs_help.md +0 -46
- data/my_help.wiki/template_help.md +0 -51
- data/my_help_nasu/.DS_Store +0 -0
- data/my_help_nasu/consideration.hiki +0 -8
- data/my_help_nasu/figs/my_help_nasu.001.jpeg +0 -0
- data/my_help_nasu/figs/my_help_nasu.001.jpg +0 -0
- data/my_help_nasu/figs/my_help_nasu1.001.jpg +0 -0
- data/my_help_nasu/latex_dir/.gitignore +0 -1
- data/my_help_nasu/latex_dir/Rakefile +0 -420
- data/my_help_nasu/latex_dir/code.aux +0 -25
- data/my_help_nasu/latex_dir/consideration.tex +0 -9
- data/my_help_nasu/latex_dir/features.aux +0 -31
- data/my_help_nasu/latex_dir/features.tex +0 -173
- data/my_help_nasu/latex_dir/hiki_help.yml +0 -53
- data/my_help_nasu/latex_dir/latex_dir/head.tex +0 -9
- data/my_help_nasu/latex_dir/latex_dir/jlisting.tex +0 -216
- data/my_help_nasu/latex_dir/my_help_nasu.pdf +0 -0
- data/my_help_nasu/latex_dir/my_help_nasu.synctex.gz +0 -0
- data/my_help_nasu/latex_dir/my_help_nasu.toc +0 -32
- data/my_help_nasu/latex_dir/overview.tex +0 -12
- data/my_help_nasu/latex_dir/pre.tex +0 -36
- data/my_help_nasu/my_help_nasu/.DS_Store +0 -0
- data/my_help_nasu/my_help_nasu.hiki +0 -32
- data/my_help_nasu/my_help_nasu.key +0 -0
- data/my_help_nasu/overview.hiki +0 -11
@@ -0,0 +1,230 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "markdown",
|
5
|
+
"metadata": {
|
6
|
+
"toc": "true"
|
7
|
+
},
|
8
|
+
"source": [
|
9
|
+
"# Table of Contents\n",
|
10
|
+
" <p><div class=\"lev1 toc-item\"><a href=\"#repl\" data-toc-modified-id=\"repl-1\"><span class=\"toc-item-num\">1 </span>repl</a></div><div class=\"lev1 toc-item\"><a href=\"#比較\" data-toc-modified-id=\"比較-2\"><span class=\"toc-item-num\">2 </span>比較</a></div>"
|
11
|
+
]
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"cell_type": "markdown",
|
15
|
+
"metadata": {},
|
16
|
+
"source": [
|
17
|
+
"# repl\n",
|
18
|
+
"read execute print loop\n",
|
19
|
+
"\n",
|
20
|
+
"```ruby\n",
|
21
|
+
"require 'optparse'\n",
|
22
|
+
"\n",
|
23
|
+
"opt = OptionParser.new\n",
|
24
|
+
"opt.on('-a', '--add', 'add an item') { puts 'Added' }\n",
|
25
|
+
"opt.on('-d', '--del', 'delete an item') { puts 'Deleted' }\n",
|
26
|
+
"opt.parse(ARGV)\n",
|
27
|
+
"```\n"
|
28
|
+
]
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"cell_type": "code",
|
32
|
+
"execution_count": null,
|
33
|
+
"metadata": {
|
34
|
+
"collapsed": true
|
35
|
+
},
|
36
|
+
"outputs": [],
|
37
|
+
"source": [
|
38
|
+
"#!/usr/bin/ruby \n",
|
39
|
+
"require 'optparse'\n",
|
40
|
+
"\n",
|
41
|
+
"options = {:name => nil}\n",
|
42
|
+
"\n",
|
43
|
+
"parser = OptionParser.new do|opts|\n",
|
44
|
+
" opts.on('-n', '--name name', 'Give your own name') do |name|\n",
|
45
|
+
" options[:name] = name;\n",
|
46
|
+
" end\n",
|
47
|
+
"\n",
|
48
|
+
" opts.on('-h', '--help', 'Displays Help') do\n",
|
49
|
+
" puts opts\n",
|
50
|
+
" exit\n",
|
51
|
+
" end\n",
|
52
|
+
"end\n",
|
53
|
+
"\n",
|
54
|
+
"parser.parse!\n",
|
55
|
+
"\n",
|
56
|
+
"sayHello = 'Hello ' + options[:name]\n",
|
57
|
+
"\n",
|
58
|
+
"puts sayHello"
|
59
|
+
]
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"cell_type": "code",
|
63
|
+
"execution_count": 1,
|
64
|
+
"metadata": {},
|
65
|
+
"outputs": [
|
66
|
+
{
|
67
|
+
"name": "stderr",
|
68
|
+
"output_type": "stream",
|
69
|
+
"text": [
|
70
|
+
"Could not find command \"kernel\".\n"
|
71
|
+
]
|
72
|
+
}
|
73
|
+
],
|
74
|
+
"source": [
|
75
|
+
"require 'thor'\n",
|
76
|
+
"\n",
|
77
|
+
"class MyCLI < Thor\n",
|
78
|
+
" desc \"hello NAME\", \"say hello to NAME\"\n",
|
79
|
+
" def hello(name)\n",
|
80
|
+
" puts \"Hello #{name}\"\n",
|
81
|
+
" end\n",
|
82
|
+
"end\n",
|
83
|
+
"\n",
|
84
|
+
"\n",
|
85
|
+
"MyCLI.start(ARGV)"
|
86
|
+
]
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"cell_type": "code",
|
90
|
+
"execution_count": 2,
|
91
|
+
"metadata": {},
|
92
|
+
"outputs": [
|
93
|
+
{
|
94
|
+
"ename": "LoadError",
|
95
|
+
"evalue": "cannot load such file -- hanami/cli",
|
96
|
+
"output_type": "error",
|
97
|
+
"traceback": [
|
98
|
+
"\u001b[31mLoadError\u001b[0m: cannot load such file -- hanami/cli",
|
99
|
+
"\u001b[37m/usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'\u001b[0m",
|
100
|
+
"\u001b[37m/usr/local/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'\u001b[0m",
|
101
|
+
"\u001b[37m(pry):28:in `<main>'\u001b[0m",
|
102
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/pry-0.11.2/lib/pry/pry_instance.rb:355:in `eval'\u001b[0m",
|
103
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/pry-0.11.2/lib/pry/pry_instance.rb:355:in `evaluate_ruby'\u001b[0m",
|
104
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/pry-0.11.2/lib/pry/pry_instance.rb:323:in `handle_line'\u001b[0m",
|
105
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/pry-0.11.2/lib/pry/pry_instance.rb:243:in `block (2 levels) in eval'\u001b[0m",
|
106
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/pry-0.11.2/lib/pry/pry_instance.rb:242:in `catch'\u001b[0m",
|
107
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/pry-0.11.2/lib/pry/pry_instance.rb:242:in `block in eval'\u001b[0m",
|
108
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/pry-0.11.2/lib/pry/pry_instance.rb:241:in `catch'\u001b[0m",
|
109
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/pry-0.11.2/lib/pry/pry_instance.rb:241:in `eval'\u001b[0m",
|
110
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/iruby-0.3/lib/iruby/backend.rb:66:in `eval'\u001b[0m",
|
111
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/iruby-0.3/lib/iruby/backend.rb:12:in `eval'\u001b[0m",
|
112
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/iruby-0.3/lib/iruby/kernel.rb:87:in `execute_request'\u001b[0m",
|
113
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/iruby-0.3/lib/iruby/kernel.rb:47:in `dispatch'\u001b[0m",
|
114
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/iruby-0.3/lib/iruby/kernel.rb:37:in `run'\u001b[0m",
|
115
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `run_kernel'\u001b[0m",
|
116
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/iruby-0.3/lib/iruby/command.rb:34:in `run'\u001b[0m",
|
117
|
+
"\u001b[37m/usr/local/lib/ruby/gems/2.2.0/gems/iruby-0.3/bin/iruby:5:in `<top (required)>'\u001b[0m",
|
118
|
+
"\u001b[37m/usr/local/bin/iruby:23:in `load'\u001b[0m",
|
119
|
+
"\u001b[37m/usr/local/bin/iruby:23:in `<main>'\u001b[0m"
|
120
|
+
]
|
121
|
+
}
|
122
|
+
],
|
123
|
+
"source": [
|
124
|
+
"#!/usr/bin/env ruby \n",
|
125
|
+
"require \"bundler/setup\"\n",
|
126
|
+
"require 'hanami/cli'\n",
|
127
|
+
"\n",
|
128
|
+
"module Foo\n",
|
129
|
+
" module CLI\n",
|
130
|
+
" module Commands\n",
|
131
|
+
" extend Hanami::CLI::Registry\n",
|
132
|
+
"\n",
|
133
|
+
" class Greet < Hanami::CLI::Command\n",
|
134
|
+
"\targument :name, required: true, desc: \"The name of the person to greet\"\n",
|
135
|
+
"\n",
|
136
|
+
"\tdef call(name:, **)\n",
|
137
|
+
" result = \"Hello #{name}\"\n",
|
138
|
+
"\n",
|
139
|
+
" puts result\n",
|
140
|
+
"\tend\n",
|
141
|
+
" end\n",
|
142
|
+
"\n",
|
143
|
+
" register \"hello\", Greet\n",
|
144
|
+
" end\n",
|
145
|
+
" end\n",
|
146
|
+
"end\n",
|
147
|
+
"\n",
|
148
|
+
"Hanami::CLI.new(Foo::CLI::Commands).call"
|
149
|
+
]
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"cell_type": "markdown",
|
153
|
+
"metadata": {},
|
154
|
+
"source": [
|
155
|
+
"# 比較\n",
|
156
|
+
".コード量においてはthorが最も少なく簡潔で分かりやすい.\n",
|
157
|
+
"\n",
|
158
|
+
".optparse及びhanamiではヘルプを自作する必要があるが,thorではその必要がなくruby thor.rbとだけ入力するとヘルプを表示する.\n",
|
159
|
+
"\n",
|
160
|
+
".ruby optparse.rbと入力するとエラーが表示されるが,ruby hanami.rbでは使用可能なコマンドの一覧が表示される.\n",
|
161
|
+
"\n"
|
162
|
+
]
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"cell_type": "code",
|
166
|
+
"execution_count": null,
|
167
|
+
"metadata": {
|
168
|
+
"collapsed": true
|
169
|
+
},
|
170
|
+
"outputs": [],
|
171
|
+
"source": []
|
172
|
+
}
|
173
|
+
],
|
174
|
+
"metadata": {
|
175
|
+
"kernelspec": {
|
176
|
+
"display_name": "Ruby 2.2.2",
|
177
|
+
"language": "ruby",
|
178
|
+
"name": "ruby"
|
179
|
+
},
|
180
|
+
"language_info": {
|
181
|
+
"file_extension": ".rb",
|
182
|
+
"mimetype": "application/x-ruby",
|
183
|
+
"name": "ruby",
|
184
|
+
"version": "2.2.2"
|
185
|
+
},
|
186
|
+
"latex_envs": {
|
187
|
+
"LaTeX_envs_menu_present": true,
|
188
|
+
"autocomplete": true,
|
189
|
+
"bibliofile": "biblio.bib",
|
190
|
+
"cite_by": "apalike",
|
191
|
+
"current_citInitial": 1,
|
192
|
+
"eqLabelWithNumbers": true,
|
193
|
+
"eqNumInitial": 1,
|
194
|
+
"hotkeys": {
|
195
|
+
"equation": "Ctrl-E",
|
196
|
+
"itemize": "Ctrl-I"
|
197
|
+
},
|
198
|
+
"labels_anchors": false,
|
199
|
+
"latex_user_defs": false,
|
200
|
+
"report_style_numbering": false,
|
201
|
+
"user_envs_cfg": false
|
202
|
+
},
|
203
|
+
"toc": {
|
204
|
+
"colors": {
|
205
|
+
"hover_highlight": "#DAA520",
|
206
|
+
"navigate_num": "#000000",
|
207
|
+
"navigate_text": "#333333",
|
208
|
+
"running_highlight": "#FF0000",
|
209
|
+
"selected_highlight": "#FFD700",
|
210
|
+
"sidebar_border": "#EEEEEE",
|
211
|
+
"wrapper_background": "#FFFFFF"
|
212
|
+
},
|
213
|
+
"moveMenuLeft": true,
|
214
|
+
"nav_menu": {
|
215
|
+
"height": "47px",
|
216
|
+
"width": "252px"
|
217
|
+
},
|
218
|
+
"navigate_menu": true,
|
219
|
+
"number_sections": true,
|
220
|
+
"sideBar": true,
|
221
|
+
"threshold": 4,
|
222
|
+
"toc_cell": true,
|
223
|
+
"toc_section_display": "block",
|
224
|
+
"toc_window_display": true,
|
225
|
+
"widenNotebook": false
|
226
|
+
}
|
227
|
+
},
|
228
|
+
"nbformat": 4,
|
229
|
+
"nbformat_minor": 2
|
230
|
+
}
|
@@ -0,0 +1,178 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "markdown",
|
5
|
+
"metadata": {},
|
6
|
+
"source": [
|
7
|
+
"# repl\n",
|
8
|
+
"read execute print loop\n",
|
9
|
+
"\n",
|
10
|
+
"```ruby\n",
|
11
|
+
"require 'optparse'\n",
|
12
|
+
"\n",
|
13
|
+
"opt = OptionParser.new\n",
|
14
|
+
"opt.on('-a', '--add', 'add an item') { puts 'Added' }\n",
|
15
|
+
"opt.on('-d', '--del', 'delete an item') { puts 'Deleted' }\n",
|
16
|
+
"opt.parse(ARGV)\n",
|
17
|
+
"```\n"
|
18
|
+
]
|
19
|
+
},
|
20
|
+
{
|
21
|
+
"cell_type": "code",
|
22
|
+
"execution_count": null,
|
23
|
+
"metadata": {},
|
24
|
+
"outputs": [],
|
25
|
+
"source": [
|
26
|
+
"#!/usr/bin/ruby \n",
|
27
|
+
"require 'optparse'\n",
|
28
|
+
"\n",
|
29
|
+
"options = {:name => nil}\n",
|
30
|
+
"\n",
|
31
|
+
"parser = OptionParser.new do|opts|\n",
|
32
|
+
" opts.on('-n', '--name name', 'Give your own name') do |name|\n",
|
33
|
+
" options[:name] = name;\n",
|
34
|
+
" end\n",
|
35
|
+
"\n",
|
36
|
+
" opts.on('-h', '--help', 'Displays Help') do\n",
|
37
|
+
" puts opts\n",
|
38
|
+
" exit\n",
|
39
|
+
" end\n",
|
40
|
+
"end\n",
|
41
|
+
"\n",
|
42
|
+
"parser.parse!\n",
|
43
|
+
"\n",
|
44
|
+
"sayHello = 'Hello ' + options[:name]\n",
|
45
|
+
"\n",
|
46
|
+
"puts sayHello"
|
47
|
+
]
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"cell_type": "code",
|
51
|
+
"execution_count": 1,
|
52
|
+
"metadata": {},
|
53
|
+
"outputs": [
|
54
|
+
{
|
55
|
+
"name": "stderr",
|
56
|
+
"output_type": "stream",
|
57
|
+
"text": [
|
58
|
+
"Could not find command \"kernel\".\n"
|
59
|
+
]
|
60
|
+
}
|
61
|
+
],
|
62
|
+
"source": [
|
63
|
+
"require 'thor'\n",
|
64
|
+
"\n",
|
65
|
+
"class MyCLI < Thor\n",
|
66
|
+
" desc \"hello NAME\", \"say hello to NAME\"\n",
|
67
|
+
" def hello(name)\n",
|
68
|
+
" puts \"Hello #{name}\"\n",
|
69
|
+
" end\n",
|
70
|
+
"end\n",
|
71
|
+
"\n",
|
72
|
+
"\n",
|
73
|
+
"MyCLI.start(ARGV)"
|
74
|
+
]
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"cell_type": "code",
|
78
|
+
"execution_count": 1,
|
79
|
+
"metadata": {},
|
80
|
+
"outputs": [
|
81
|
+
{
|
82
|
+
"ename": "NameError",
|
83
|
+
"evalue": "uninitialized constant Hanami::CLI\nDid you mean? Hanami::Cli\n Hanami::CliBase\n Hanami::CliSubCommands\n CGI",
|
84
|
+
"output_type": "error",
|
85
|
+
"traceback": [
|
86
|
+
"\u001b[31mNameError\u001b[0m: uninitialized constant Hanami::CLI\nDid you mean? Hanami::Cli\n Hanami::CliBase\n Hanami::CliSubCommands\n CGI",
|
87
|
+
"\u001b[37m<main>:7:in `<module:Commands>'\u001b[0m",
|
88
|
+
"\u001b[37m<main>:6:in `<module:CLI>'\u001b[0m",
|
89
|
+
"\u001b[37m<main>:5:in `<module:Foo>'\u001b[0m",
|
90
|
+
"\u001b[37m<main>:4:in `<main>'\u001b[0m",
|
91
|
+
"\u001b[37m/Library/Ruby/Gems/2.3.0/gems/iruby-0.3/lib/iruby/backend.rb:44:in `eval'\u001b[0m",
|
92
|
+
"\u001b[37m/Library/Ruby/Gems/2.3.0/gems/iruby-0.3/lib/iruby/backend.rb:44:in `eval'\u001b[0m",
|
93
|
+
"\u001b[37m/Library/Ruby/Gems/2.3.0/gems/iruby-0.3/lib/iruby/backend.rb:12:in `eval'\u001b[0m",
|
94
|
+
"\u001b[37m/Library/Ruby/Gems/2.3.0/gems/iruby-0.3/lib/iruby/kernel.rb:87:in `execute_request'\u001b[0m",
|
95
|
+
"\u001b[37m/Library/Ruby/Gems/2.3.0/gems/iruby-0.3/lib/iruby/kernel.rb:47:in `dispatch'\u001b[0m",
|
96
|
+
"\u001b[37m/Library/Ruby/Gems/2.3.0/gems/iruby-0.3/lib/iruby/kernel.rb:37:in `run'\u001b[0m",
|
97
|
+
"\u001b[37m/Library/Ruby/Gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:70:in `run_kernel'\u001b[0m",
|
98
|
+
"\u001b[37m/Library/Ruby/Gems/2.3.0/gems/iruby-0.3/lib/iruby/command.rb:34:in `run'\u001b[0m",
|
99
|
+
"\u001b[37m/Library/Ruby/Gems/2.3.0/gems/iruby-0.3/bin/iruby:5:in `<top (required)>'\u001b[0m",
|
100
|
+
"\u001b[37m/usr/local/bin/iruby:22:in `load'\u001b[0m",
|
101
|
+
"\u001b[37m/usr/local/bin/iruby:22:in `<main>'\u001b[0m"
|
102
|
+
]
|
103
|
+
}
|
104
|
+
],
|
105
|
+
"source": [
|
106
|
+
"#!/usr/bin/env ruby \n",
|
107
|
+
"require \"bundler/setup\"\n",
|
108
|
+
"require \"hanami/cli\"\n",
|
109
|
+
"\n",
|
110
|
+
"module Foo\n",
|
111
|
+
" module CLI\n",
|
112
|
+
" module Commands\n",
|
113
|
+
" extend Hanami::CLI::Registry\n",
|
114
|
+
"\n",
|
115
|
+
" class Greet < Hanami::CLI::Command\n",
|
116
|
+
"\targument :name, required: true, desc: \"The name of the person to greet\"\n",
|
117
|
+
"\n",
|
118
|
+
"\tdef call(name:, **)\n",
|
119
|
+
" result = \"Hello #{name}\"\n",
|
120
|
+
"\n",
|
121
|
+
" puts result\n",
|
122
|
+
"\tend\n",
|
123
|
+
" end\n",
|
124
|
+
"\n",
|
125
|
+
" register \"hello\", Greet\n",
|
126
|
+
" end\n",
|
127
|
+
" end\n",
|
128
|
+
"end\n",
|
129
|
+
"\n",
|
130
|
+
"Hanami::CLI.new(Foo::CLI::Commands).call"
|
131
|
+
]
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"cell_type": "markdown",
|
135
|
+
"metadata": {},
|
136
|
+
"source": [
|
137
|
+
"# 比較\n",
|
138
|
+
".コード量においてはthorが最も少なく簡潔で分かりやすい.\n",
|
139
|
+
"\n",
|
140
|
+
".optparse及びhanamiではヘルプを自作する必要があるが,thorではその必要がなくruby thor.rbとだけ入力するとヘルプを表示する.\n",
|
141
|
+
"\n",
|
142
|
+
".ruby optparse.rbと入力するとエラーが表示されるが,ruby hanami.rbでは使用可能なコマンドの一覧が表示される."
|
143
|
+
]
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"cell_type": "markdown",
|
147
|
+
"metadata": {},
|
148
|
+
"source": [
|
149
|
+
"# hanami\n",
|
150
|
+
"\n",
|
151
|
+
"hanami.rbのソースコード https://github.com/hanami/cli\n",
|
152
|
+
"\n"
|
153
|
+
]
|
154
|
+
},
|
155
|
+
{
|
156
|
+
"cell_type": "code",
|
157
|
+
"execution_count": null,
|
158
|
+
"metadata": {},
|
159
|
+
"outputs": [],
|
160
|
+
"source": []
|
161
|
+
}
|
162
|
+
],
|
163
|
+
"metadata": {
|
164
|
+
"kernelspec": {
|
165
|
+
"display_name": "Ruby 2.3.3",
|
166
|
+
"language": "ruby",
|
167
|
+
"name": "ruby"
|
168
|
+
},
|
169
|
+
"language_info": {
|
170
|
+
"file_extension": ".rb",
|
171
|
+
"mimetype": "application/x-ruby",
|
172
|
+
"name": "ruby",
|
173
|
+
"version": "2.3.3"
|
174
|
+
}
|
175
|
+
},
|
176
|
+
"nbformat": 4,
|
177
|
+
"nbformat_minor": 2
|
178
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "bundler/setup"
|
3
|
+
require "hanami/cli"
|
4
|
+
|
5
|
+
module Foo
|
6
|
+
module CLI
|
7
|
+
module Commands
|
8
|
+
extend Hanami::CLI::Registry
|
9
|
+
|
10
|
+
class Greet < Hanami::CLI::Command
|
11
|
+
argument :name, required: true, desc: "The name of the person to greet"
|
12
|
+
|
13
|
+
def call(name:, **)
|
14
|
+
result = "Hello #{name}"
|
15
|
+
|
16
|
+
puts result
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
register "hello", Greet
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
Hanami::CLI.new(Foo::CLI::Commands).call
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
require 'optparse'
|
3
|
+
|
4
|
+
options = {:name => nil}
|
5
|
+
|
6
|
+
parser = OptionParser.new do|opts|
|
7
|
+
opts.on('-n', '--name name', 'Give your own name') do |name|
|
8
|
+
options[:name] = name;
|
9
|
+
end
|
10
|
+
|
11
|
+
opts.on('-h', '--help', 'Displays Help') do
|
12
|
+
puts opts
|
13
|
+
exit
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
parser.parse!
|
18
|
+
|
19
|
+
sayHello = 'Hello ' + options[:name]
|
20
|
+
|
21
|
+
puts sayHello
|
@@ -0,0 +1,87 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "markdown",
|
5
|
+
"metadata": {},
|
6
|
+
"source": [
|
7
|
+
"コマンドツール作成ライブラリ Thor による my help の書き換え 情報科学科 27014534 大八木利治"
|
8
|
+
]
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"cell_type": "markdown",
|
12
|
+
"metadata": {},
|
13
|
+
"source": [
|
14
|
+
"# 背景\n",
|
15
|
+
"my help とはユーザー独自のマニュアルを作成することが できるユーザメモソフトである.これは terminal だけを用い て簡単に起動,編集,削除などをすることができるため,非 常に便利である.さらに,そのマニュアルは自分ですぐに編 集,参照することができるので,メモとしての機能も果たし ている.これにより,プログラミング初心者が,頻繁に使う コマンドやキーバインドなどをいちいち web browser を立ち 上げて調べるのではなく,terminal 上で即座に取得できるた め,プログラム開発を集中することが期待される.\n",
|
16
|
+
"しかし,my help にある問題のうちの一つとして挙げられ るのがサブコマンドの記述法である.\n",
|
17
|
+
"my help の振る舞いを制御しているサブコマンドは,マイ ナスを付した省略記法が取られている.プログラミング初 心者にとってこの省略記法は,覚えにくかったりわかりにく かったりするという問題があり,現在はフルワードを使った 自然言語に近い記述法が多く用いられている.\n",
|
18
|
+
"そこで,本研究ではコマンドラインツール作成ライブラリ を自然言語に近いサブコマンド体系を実装しやすいライブラ リである Thor に変更する.ruby の標準ライブラリである optparse で作成されている my help を,Thor[1] によって書 き直し,異なった 2 つライブラリで作成された my help の使 用感を比較検討することを目的とする."
|
19
|
+
]
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"cell_type": "markdown",
|
23
|
+
"metadata": {},
|
24
|
+
"source": [
|
25
|
+
"# optparse について\n",
|
26
|
+
"今回の研究対象の my help は,optparse で実装されてい る.optparse が操作するオプションは,下記の on メソッド で設定する.\n",
|
27
|
+
"```\n",
|
28
|
+
"def execute\n",
|
29
|
+
"@argv << ’--help’ if @argv.size==0 command_parser = OptionParser.new do |opt|\n",
|
30
|
+
"opt.on(’-v’, ’--version’,’show␣program␣Version.’ ) { |v|\n",
|
31
|
+
"opt.version = MyHelp::VERSION puts opt.ver\n",
|
32
|
+
"}\n",
|
33
|
+
"opt.on(’-l’, ’--list’, ’list␣specific␣helps’){\n",
|
34
|
+
"list_helps}\n",
|
35
|
+
"中略\n",
|
36
|
+
"def list_helps\n",
|
37
|
+
"中略\n",
|
38
|
+
"end\n",
|
39
|
+
"後略\n",
|
40
|
+
"```\n",
|
41
|
+
"第 1 引数はショートオプションで,-a や -d のように設定する.同様にして,第 2 引数はロングオプションを表し,–add や –delete のように,第 3 引数はそのオプションの説明文で, help で表示される説明文を設定する.後ろのブロックには, そのオプションが指定された場合に実行されるコードを記述 する [2].しかしこのライブラリでは自然言語に近いサブコマ ンドを実装するには相当な書き換えが必要となる.\n"
|
42
|
+
]
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"cell_type": "markdown",
|
46
|
+
"metadata": {},
|
47
|
+
"source": [
|
48
|
+
"# Thor について\n",
|
49
|
+
"\n",
|
50
|
+
"本研究では optparse の代わりのライブラリとして Thor の 採用を検討する.Thor は,コマンドラインツールの作成を支 援するライブラリであり,git や bundler のようにサブコマン ドを含むコマンドラインツールを簡単に作成することができ る [3].Thor には以下のような特徴がある.\n",
|
51
|
+
"1. コマンドラインオプションのパーズやサブコマンドごと のヘルプを作るなどの面倒な作業を簡単にこなすことが でき,手早くビルドツールや実行可能なコマンドを作成 できる [4].\n",
|
52
|
+
"2. 特殊な DSL (Domain Specific Language)を使わずに メソッドを定義することで処理を記述するため,テスト を行いやすい [4].\n",
|
53
|
+
"3. optparse では作成することが困難な,マイナスを伴わな い(自然言語に近い)サブコマンドを実装することが可 能である."
|
54
|
+
]
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"cell_type": "markdown",
|
58
|
+
"metadata": {},
|
59
|
+
"source": [
|
60
|
+
"# 展望\n",
|
61
|
+
"cli の option を parse する toolbox のランキングサイトに よると high line がもっともスコアが高い [5].highline でも 書き換えを行い,コード量およびコマンドの使いやすさ,覚 えやすさといった使用感についての比較検討を行う"
|
62
|
+
]
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"cell_type": "code",
|
66
|
+
"execution_count": null,
|
67
|
+
"metadata": {},
|
68
|
+
"outputs": [],
|
69
|
+
"source": []
|
70
|
+
}
|
71
|
+
],
|
72
|
+
"metadata": {
|
73
|
+
"kernelspec": {
|
74
|
+
"display_name": "Ruby 2.3.3",
|
75
|
+
"language": "ruby",
|
76
|
+
"name": "ruby"
|
77
|
+
},
|
78
|
+
"language_info": {
|
79
|
+
"file_extension": ".rb",
|
80
|
+
"mimetype": "application/x-ruby",
|
81
|
+
"name": "ruby",
|
82
|
+
"version": "2.3.3"
|
83
|
+
}
|
84
|
+
},
|
85
|
+
"nbformat": 4,
|
86
|
+
"nbformat_minor": 2
|
87
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
\relax
|
2
|
+
\citation{erikhuda}
|
3
|
+
\citation{MakuMakuOptParse}
|
4
|
+
\citation{succi}
|
5
|
+
\citation{hibariya}
|
6
|
+
\citation{hibariya}
|
7
|
+
\citation{toolbox}
|
8
|
+
\bibcite{erikhuda}{1}
|
9
|
+
\bibcite{MakuMakuOptParse}{2}
|
10
|
+
\bibcite{succi}{3}
|
11
|
+
\bibcite{hibariya}{4}
|
12
|
+
\bibcite{toolbox}{5}
|
13
|
+
\@writefile{toc}{\contentsline {section}{\numberline {1}背景}{1}}
|
14
|
+
\@writefile{toc}{\contentsline {section}{\numberline {2}optparseについて}{1}}
|
15
|
+
\@writefile{toc}{\contentsline {section}{\numberline {3}Thorについて}{1}}
|
16
|
+
\@writefile{toc}{\contentsline {section}{\numberline {4}展望}{1}}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
{
|
2
|
+
"cells": [
|
3
|
+
{
|
4
|
+
"cell_type": "markdown",
|
5
|
+
"metadata": {},
|
6
|
+
"source": [
|
7
|
+
"コマンドツール作成ライブラリ Thor による my help の書き換え 情報科学科 27014534 大八木利治"
|
8
|
+
]
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"cell_type": "markdown",
|
12
|
+
"metadata": {},
|
13
|
+
"source": [
|
14
|
+
"# 背景\n",
|
15
|
+
"my help とはユーザー独自のマニュアルを作成することが できるユーザメモソフトである.これは terminal だけを用い て簡単に起動,編集,削除などをすることができるため,非 常に便利である.さらに,そのマニュアルは自分ですぐに編 集,参照することができるので,メモとしての機能も果たし ている.これにより,プログラミング初心者が,頻繁に使う コマンドやキーバインドなどをいちいち web browser を立ち 上げて調べるのではなく,terminal 上で即座に取得できるた め,プログラム開発を集中することが期待される.\n",
|
16
|
+
"しかし,my help にある問題のうちの一つとして挙げられ るのがサブコマンドの記述法である.\n",
|
17
|
+
"my help の振る舞いを制御しているサブコマンドは,マイ ナスを付した省略記法が取られている.プログラミング初 心者にとってこの省略記法は,覚えにくかったりわかりにく かったりするという問題があり,現在はフルワードを使った 自然言語に近い記述法が多く用いられている.\n",
|
18
|
+
"そこで,本研究ではコマンドラインツール作成ライブラリ を自然言語に近いサブコマンド体系を実装しやすいライブラ リである Thor に変更する.ruby の標準ライブラリである optparse で作成されている my help を,Thor[1] によって書 き直し,異なった 2 つライブラリで作成された my help の使 用感を比較検討することを目的とする."
|
19
|
+
]
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"cell_type": "markdown",
|
23
|
+
"metadata": {},
|
24
|
+
"source": [
|
25
|
+
"# optparse について\n",
|
26
|
+
"今回の研究対象の my help は,optparse で実装されてい る.optparse が操作するオプションは,下記の on メソッド で設定する.\n",
|
27
|
+
"```\n",
|
28
|
+
"def execute\n",
|
29
|
+
"@argv << ’--help’ if @argv.size==0 command_parser = OptionParser.new do |opt|\n",
|
30
|
+
"opt.on(’-v’, ’--version’,’show␣program␣Version.’ ) { |v|\n",
|
31
|
+
"opt.version = MyHelp::VERSION puts opt.ver\n",
|
32
|
+
"}\n",
|
33
|
+
"opt.on(’-l’, ’--list’, ’list␣specific␣helps’){\n",
|
34
|
+
"list_helps}\n",
|
35
|
+
"中略\n",
|
36
|
+
"def list_helps\n",
|
37
|
+
"中略\n",
|
38
|
+
"end\n",
|
39
|
+
"後略\n",
|
40
|
+
"```\n",
|
41
|
+
"第 1 引数はショートオプションで,-a や -d のように設定する.同様にして,第 2 引数はロングオプションを表し,–add や –delete のように,第 3 引数はそのオプションの説明文で, help で表示される説明文を設定する.後ろのブロックには, そのオプションが指定された場合に実行されるコードを記述 する [2].しかしこのライブラリでは自然言語に近いサブコマ ンドを実装するには相当な書き換えが必要となる.\n"
|
42
|
+
]
|
43
|
+
},
|
44
|
+
{
|
45
|
+
"cell_type": "markdown",
|
46
|
+
"metadata": {},
|
47
|
+
"source": [
|
48
|
+
"# Thor について\n",
|
49
|
+
"\n",
|
50
|
+
"本研究では optparse の代わりのライブラリとして Thor の 採用を検討する.Thor は,コマンドラインツールの作成を支 援するライブラリであり,git や bundler のようにサブコマン ドを含むコマンドラインツールを簡単に作成することができ る [3].Thor には以下のような特徴がある.\n",
|
51
|
+
"1. コマンドラインオプションのパーズやサブコマンドごと のヘルプを作るなどの面倒な作業を簡単にこなすことが でき,手早くビルドツールや実行可能なコマンドを作成 できる [4].\n",
|
52
|
+
"2. 特殊な DSL (Domain Specific Language)を使わずに メソッドを定義することで処理を記述するため,テスト を行いやすい [4].\n",
|
53
|
+
"3. optparse では作成することが困難な,マイナスを伴わな い(自然言語に近い)サブコマンドを実装することが可 能である."
|
54
|
+
]
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"cell_type": "markdown",
|
58
|
+
"metadata": {},
|
59
|
+
"source": [
|
60
|
+
"# 展望\n",
|
61
|
+
"cli の option を parse する toolbox のランキングサイトに よると high line がもっともスコアが高い [5].highline でも 書き換えを行い,コード量およびコマンドの使いやすさ,覚 えやすさといった使用感についての比較検討を行う"
|
62
|
+
]
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"cell_type": "code",
|
66
|
+
"execution_count": null,
|
67
|
+
"metadata": {},
|
68
|
+
"outputs": [],
|
69
|
+
"source": []
|
70
|
+
}
|
71
|
+
],
|
72
|
+
"metadata": {
|
73
|
+
"kernelspec": {
|
74
|
+
"display_name": "Ruby 2.3.3",
|
75
|
+
"language": "ruby",
|
76
|
+
"name": "ruby"
|
77
|
+
},
|
78
|
+
"language_info": {
|
79
|
+
"file_extension": ".rb",
|
80
|
+
"mimetype": "application/x-ruby",
|
81
|
+
"name": "ruby",
|
82
|
+
"version": "2.3.3"
|
83
|
+
}
|
84
|
+
},
|
85
|
+
"nbformat": 4,
|
86
|
+
"nbformat_minor": 2
|
87
|
+
}
|