my_help

Similar documents
help gem gem gem my help

PowerPoint プレゼンテーション

Emacs Ruby..

untitled

ruby learner - Ruby


ruby novice ruby novice ruby novice.

fx-9860G Manager PLUS_J

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

¥×¥í¥°¥é¥ß¥ó¥°±é½¬I Exercise on Programming I [1zh] ` `%%%`#`&12_`__~~~ alse

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

GNU Emacs GNU Emacs

Introduction Purpose This training course describes the configuration and session features of the High-performance Embedded Workshop (HEW), a key tool

tebiki00.dvi

Microsoft Word - Win-Outlook.docx

2 Rails pico planner camel case camel pico planner _ pico_planner snake case snake - chain case chain pico planner pico-planner CSS id class 2.3 Rails

a0postercls? Gerlinde Kettl, Matthias Weiser T E Xmacro wwwctanorg/tex-archive/macros/latex/contrib/a0poster LAT E X

X Window System X X &


bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows bash on Ubuntu on Windows ˆ Windows10 64bit Wi


IIJ Technical WEEK アプリ開発を楽にするRuby PaaS「MOGOK」について

Actual ESS Adapterの使用について

9 rbenv rbenv ruby 9.1 rbenv rbenv rbenv ruby ruby-build ruby 9.2 rbenv macos.bash_profile ~/.bash_profile ~/.bash_profile.bak $ touch ~/.bash_profile

1 122

A : kerl kerl Erlang/OTP Erlang/OTP 2 2 Elixir/Phoenix URL 2 PDF A.2 Bash macos.bash_profile exp

1 I EViews View Proc Freeze

ECCS. ECCS,. ( 2. Mac Do-file Editor. Mac Do-file Editor Windows Do-file Editor Top Do-file e

評論・社会科学 84号(よこ)(P)/3.金子

Web apache

3.2 Linux root vi(vim) vi emacs emacs 4 Linux Kernel Linux Git 4.1 Git Git Linux Linux Linus Fedora root yum install global(debian Ubuntu apt-get inst

Ver.1 1/17/2003 2

ドライバインストールガイド

DCL intro Manual for Ubuntu11.10

fiš„v3.dvi

pp R R Word R R R R Excel SPSS R Microsoft Word 2016 OS Windows7 Word2010 Microsoft Office2010 R Emacs ESS R R R R https:

Microsoft Word - KUINS-Air_W10_ docx

LAN Copyright c Daikoku Manabu This tutorial is licensed under a Creative Commons Attribution 2.1 Japan License

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa

目次 1. Serverspec とは 1.1. Serverspecとは 1.2. Serverspecで出来る事 2. セットアップ 2.1. 必要なもの 2.2. インストール 3. デモ 3.1. デモ環境について 3.2. テスト対象サーバーの登録 3.3. サンプルテストの中身 3.4.

,,,,., C Java,,.,,.,., ,,.,, i

elemmay09.pub

quattro.PDF


第173回東京エリアDebian勉強会   grml-debootstrapを用いた USB起動メモリの作成

TeraTerm Pro V.2.32の利用法

LiveCode初心者開発入門サンプル


Add-onアプリケーション開発 - 環境構築マニュアル -


Microsoft Word - PrivateAccess_UM.docx

syspro-0405.ppt

C

Microsoft Word - Live Meeting Help.docx

NSR-500 Installation Guide

nakayama15icm01_l7filter.pptx

1 138

open / window / I / shall / the? something / want / drink / I / to the way / you / tell / the library / would / to / me

273? C

P (32LX10)

AERA_English_CP_Sample_org.pdf

1 2 3

UNIX

MEET 270

AN 100: ISPを使用するためのガイドライン

はじめに

紀要1444_大扉&目次_初.indd

WebOS aplat WebOS WebOS 3 XML Yahoo!Pipes Popfry UNIX grep awk XML GUI WebOS GUI GUI 4 CUI

Microsoft 365 & 最新デバイスで 進める職場デジタル化と管理  ~体裁や制度で終わらせない働き方改革の入り口~

バージョン管理ツールを使い Debian パッケージを管理する - Git 編

C. S2 X D. E.. (1) X S1 10 S2 X+S1 3 X+S S1S2 X+S1+S2 X S1 X+S S X+S2 X A. S1 2 a. b. c. d. e. 2

untitled

スパコンに通じる並列プログラミングの基礎

Microsoft Word - KUINS-Air_W8.1_ docx

_Y05…X…`…‘…“†[…h…•

bit : データの最小単位 1bit = 最小状態の単位 二進一桁 = 配線一本 Byte バイト 8bits 0-255まで アルファベットは 1 バイト 256 文字以下 漢字は 普通は 2 バイト 文字以下 2

スパコンに通じる並列プログラミングの基礎

浜松医科大学紀要

自分の天職をつかめ

NPCA部誌2018


Metasploit 2012.indb

MENU 키를 누르면 아래의 화면이 나타납니다

Microsoft Word - D JP.docx


Ansible

Tab 5, 11 Tab 4, 10, Tab 3, 9, 15Tab 2, 8, 14 Tab 1, 7, 13 2

〈論文〉組織改革の成果に関する予備的調査--社内カンパニー制導入が財務的業績に与える影響

作業手順手引き

Microsoft Word - j201drills27.doc

Microsoft Word - Meta70_Preferences.doc

QOL

2 3

unix.dvi

17 Proposal of an Algorithm of Image Extraction and Research on Improvement of a Man-machine Interface of Food Intake Measuring System


dvi

debian_install.dvi

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble

1st-session key

Transcription:

my_help 27016635 2020 3

1 3 1.1....................................... 3 1.2....................................... 3 1.3 my_help..................................... 3 2 5 2.1.................................. 5 2.2................................. 5 2.3....................................... 6 2.4....................................... 6 2.5....................................... 7 3 gli thor 8 3.1 gli thor.................................... 8 3.2.............................. 9 3.3................................ 9 3.4....................................... 10 4 11 4.1.................................. 11 4.2.............................. 11 4.3................................. 11 4.4 Linux................................. 12 4.5 vim.................................. 13 4.6............................ 14 4.7....................................... 15 5 16 5.1............................. 16 5.2..................................... 16 5.2.1 mac................................... 16 5.2.2 linux................................... 16 5.2.3 windows................................. 17 5.3...................................... 18 1

6 22 2

1 1.1 my_help my_help my_help 1.2 my_help my_help mac emacs 3 mac emacs my_help OSX emacs OS Linux vim my_help windows my_help OS emacs my_help gli thor my_help 1.3 my_help my_help CUI(CLA) Usage user help gem 3

user man format, looks,, 5 [1] manual my_help orgmode orgmode HTML L A TEX my_help 1.1 1.1: my_help_sample. 4

2 2.1 gem my_help > gem install my_help > my_help Commands: my_help delete HELP my_help edit HELP my_help git [push pull] my_help help [COMMAND] my_help list [HELP] [ITEM] my_help new HELP my_help set_editor EDITOR_NAME my_help setup my_help version # delete HELP # edit HELP # git push or pull # Describe available commands or one specif... # list all helps, specific HELP, or ITEM # make new HELP # set editor to EDITOR_NAME # set up the test database # show version my_help 0.8.5 version > my_help version 0.8.5 2.2 my_help > my_help set_editor emacs set editor emacs emacs editor my_help set_editor 5

2.3 help sample help help new > my_help new sample "/Users/keigo/.my_help/sample.org" "/Users/keigo/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ my_help-0.8.5/lib/templates/help_template.org" cp /Users/keigo/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/ my_help-0.8.5/lib/templates/help_template.org /Users/keigo/.my_help/sample.org sample help 2.4 sample edit > my_help edit sample "/Users/keigo/.my_help/sample.org 2.1 edit sample 2.1: edit_sample. sample emacs org 6

2.5 sample delete delete Y > my_help delete sample Are you sure to delete /Users/keigo/.my_help/sample.org?[Yn] Y rm /Users/keigo/.my_help/sample.org sample Y return 7

3 gli thor 3.1 gli thor my_help gli gem gli my_help gli gli thor Build command-suite CLI apps that are awesome. Bootstrap your app, add commands, options and documentation while maintaining a well-tested idiomatic command-line app gli CLI [2] Thor is a toolkit for building powerful command-line interfaces. thor thor [3] gli thor 3.1 [4] 3.1: gli thor. gli thor Ruby Ruby 1600 30000 Level3 Level5 gli thor Ruby gli 1600 thor 3 thor my_help gli thor my_help 8

3.2 github daddygongon my_help my_help bundle gli thor 3.3 my_help new gli thor new my_help help new gli thor DSL(Domain Specific language) desc make new HELP_NAME help arg_name HELP_NAME command :new do c c.action do global_options,options,args $control.init_help(args[0]) end end gli desc arg_name ruby method block (c) args desc "new HELP", "make new HELP" def new(help_name) invoke :setup $control.init_help(help_name) end thor DSL method gli my_help thor 9

3.4 gli thor my_help gli thor 40% my_help thor my_help gli thor 10

4 4.1 my_help OSX emacs 3 gli thor my_help [5] OSX OS emacs 4.2 mac OS my_help ubuntu mac Linux Linux my_help emacs my_help vim my_help vim my_help mac Linux emacs vim OS my_help 4.3 Vagrant Vagrant [6] macos 64-bit vagrant.pkg > which vagrant /usr/local/bin/vagrant vagrant vagrant > mkdir vagrant_test 11

> cd vagrant_test vagrant_test ubuntu bento/ubuntu-18.04 > vagrant init bento/ubuntu-18.04 ls vagrant_test Vagrantfile ~/vagrant_test> ls Vagrantfile Vagrantfile #config.vm.network "private_network", ip:"192.168.33.10" config.vm.network "private_network", ip:"192.168.33.10" > vagrant up ubuntu 4.4 Linux OSX ubuntu ubuntu > vagrant ssh Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-65-generic x86_64) mac keigo@mac-no-macbook-air ~/vagrant_test vagrant@vagrant:~ vagrant ssh ubuntu my_help 12

$ gem install my_help $ my_help Commands: my_help delete HELP my_help edit HELP my_help git [push pull] my_help help [COMMAND] my_help list [HELP] [ITEM] my_help new HELP my_help set_editor EDITOR_NAME my_help setup my_help version # delete HELP # edit HELP # git push or pull # Describe available commands or one specif... # list all helps, specific HELP, or ITEM # make new HELP # set editor to EDITOR_NAME # set up the test database # show version my_help $ exit logout Connection to 127.0.0.1 closed.. 4.5 vim my_help emacs ubuntu emacs vim vim my_help emacs my_help my_help my_help/lib/my_help/my_help_controll.rb initialize my_help emacs @editor = emacs my_help emacs vim emacs vim @editor = vim 4.1 emacs vim vim 13

4.6 4.1: my_help_vim. my_help initialize my_help set_editor def set_editor(editor) @editor = editor file_name =.my_help_conf.yml @conf_file = File.join(@local_help_dir, file_name) conf = {editor: editor} File.open(@conf_file, w ){ f YAML.dump(conf, f)} puts "set editor #{@editor} " end set_editor editor.my_help_conf.yml vim > my_help set_editor vim set editor vim 14

set_editor my_help 4.7 my_help Linux my_help set_editor my_help OS, user my_help user 15

5 5.1 my_help OS 22 2 help version my_help 5.2 22 my_help 0.8.2 mac linux windows 3 5.2.1 mac mac my_help OSX emacs my_help ruby ruby emacs atom vim 5.2.2 linux linux 3 my_help thor thor 16

5.2.3 windows windows windows10 powerwhell Encoding default Windows-31J force_encoding [7] The associated Encoding of a String can be changed in two different ways. First, it is possible to set the Encoding of a string to a new Encoding without changing the internal byte representation of the string, with String#force_encoding. This is how you can tell Ruby the correct encoding of a string. String#force_encoding Ruby string #=> "R\xC3\xA9sum\xC3\xA9" string.encoding #=> #<Encoding:ISO-8859-1> string.force_encoding(encoding::utf_8) #=> "R\u00E9sum\u00E9" Second, it is possible to transcode a string, i.e. translate its internal byte representation to another encoding. Its associated encoding is also set to the other encoding. See String#encode for the various forms of transcoding, and the Encoding::Converter class for additional control over the transcoding process. Encording String#encode Encoding::Converter string #=> "R\u00E9sum\u00E9" string.encoding #=> #<Encoding:UTF-8> string = string.encode!(encoding::iso_8859_1) #=> "R\xE9sum\xE9" string.encoding #=> #<Encoding::ISO-8859-1> 17

if m = line.match(/^\* (.+)/) m=line.force_encoding(encoding::utf_8).match(/^\* (.+)/u) if m line Encoding UTF-8 match(/... /u) utf matching [8]. windows 5.3 delete %my_help delete test my_help delete test Are you sure to delete /home/user/.my_help/test.org?[ynq] %my_help delete test my_help delete test Are you sure to delete /home/user/.my_help/test.org?[ynq] y %my_help delete test my_help delete test Are you sure to delete /home/user/.my_help/test.org?[ynq] Y rm /home/user/.my_help/test.org delete delete help yes or no [Ynq] y Y my_help delete Enter [Ynq], y Y( ) y Y my_help initialize 18

don t work on version check. change line order between load_conf and set_dir... my_help load_conf set_help_dir_if_not_exists def load_conf file_name =.my_help_conf.yml # @conf_file = File.join(Dir.pwd, file_name) @conf_file = File.join(@local_help_dir, file_name) begin conf = YAML.load_file(@conf_file) @editor = conf[:editor] rescue => e puts e.to_s.red puts make.my_help_conf.yml.green set_editor(@editor) end end load_conf set_editor load_conf def set_help_dir_if_not_exists return if File::exist?(@local_help_dir) FileUtils.mkdir_p(@local_help_dir, :verbose=>true) Dir.entries(@template_dir).each{ file next if file== help_template.org file_path=file.join(@local_help_dir,file) next if File::exists?(file_path) FileUtils.cp((File.join(@template_dir,file)),@local_help_dir,:verbose=>true) } end set_help_dir_if_not_exists local_help_dir my_help list 19

new_help.org #* license - cc by Shigeto R. Nishitani, 2016 #* head - #* item1_example - item1 #* item2_example - item2 my_help list new_help "item1_example" "-i" "item2_example" -, head : head, license : license -i, item1_example : item1_example, item2_example : item2_example my_help list new_help -i "item1_example" - ----- item1_example - item1 org ITEM ITEM 5.1 help item1_example item2_example list item2_example > my_help list new_help -i - ----- item2_example - item2 20

5.1: my_help_item. list list 21

6 my_help gem gli thor set_editor windows my_help OSX emacs OS my_help OS, user my_help. 22

23

[1] my_help, https://github.com/daddygongon/my_help, (accessed on 6 Feb 2020). [2] gli, https://rubygems.org/gems/gli, (accessed on 6 Feb 2020). [3] thor, https://rubygems.org/gems/thor, (accessed on 6 Feb 2020). [4] glivsthor, https://ruby.libhunt.com/compare-gli-vs-thor, (accessed on 6 Feb 2020). [5], " my_help ", (2020). [6] vagrant_download, https://www.vagrantup.com/downloads.html, (accessed on 6 Feb 2020). [7] Encoding(Ruby 2.2.0), https://ruby-doc.org/core-2.2.0/encoding.html, (accessed on 6 Feb 2020). [8] Regexp (Ruby 2.2.0), https://ruby-doc.org/core-2.2.0/regexp.html# class-regexp-label-encoding, (accessed on 6 Feb 2020). 24