Quantcast
Viewing all articles
Browse latest Browse all 2722

マルチスケールシミュレーション特論:第 8 回をまとめてみた

Image may be NSFW.
Clik here to view.
ruby-2.5.5p157

授業内容

rake コマンドについて

rake のイメージ → make, ant の ruby 版

そもそもmakeとは ??

Rakefile の中身をruby 言語で記述すれば Rakefile が動作するようになっている

Rakefile の記述例

  • 以下のプログラムで 1 回の操作で GitHub 上にプログラムを載せる事が可能になる
desc'git push'task:pushdo# p でコメントを残す事ができる# 分かりやすいようにコメントを残していっているpcomm="git add -A"# system で外部コマンドを使えるようになる(ただし動作が遅い)systemcommpcomm="git commit -m \'hoge\'"systemcommpcomm="git pull origin main"systemcommpcomm="git push origin main"systemcommexitend

command_line

上記のプログラムで簡単に GitHub 上にプログラムをあげる事ができるが、しかし system call を使って外部コマンドを使用しているので動作が遅い

そこで組み込み関数を使う。

しかし、問題として system からの戻り値は出力ではなく,コマンドが成功したかとなっている。

なので,標準出力(stdout)などを取り出すのはcommand_lineを使う。

  • command_line のインストール方法

    gem install command_line
    

org to_html, to_platex

emacs の org-modeには htmllatexへ出力する為の command が用意されている(便利すぎ、、、、)

  • 実行コマンド
c-c c-e ho # export as [h]tml, [o]ut
c-c c-e ll # export [l]atex, [l]atex 

org-modeで書いた物が簡単に html や latex にフォーマット変換ができるので超便利!!

しかし、デフォルトだと出力では見にくいのでプラスの設定をしているとより分かりやすい


  • source ~/Downloads/git/grad_members_20f/members/taiseiyo/memos/class8.org

Viewing all articles
Browse latest Browse all 2722

Trending Articles