Movatterモバイル変換


[0]ホーム

URL:


LoginSignup
3

Go to list of users who liked

3

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ruboty | Ruboty Handler Plugin 作成時に公開するための Markdown 形式の技術エントリ テンプレートジェネレータ ruboty-articlegen #ruboty

Last updated atPosted at 2014-11-10

Ruboty | Ruboty Handler Plugin 作成時に公開するための Markdown 形式の技術エントリ テンプレートジェネレータ ruboty-articlegen を作成した #ruboty

概要

Ruboty Handler Plugin 作成時に公開するための Markdown 形式の技術エントリ テンプレートジェネレータ ruboty-articlegen を作成した

前提

出力フォーマットは Qiita Markdown を前提にしています。

用途

Ruboty の Handler Plugin を作成した場合、周りに周知する意味で
Qiitaなどの技術エントリやブログのエントリを作成する方は多いと思います。

Ruboty の Plugin などは人によっては何度も作成するため、
記事の作成行為の中に WET (write every thing) な作業があるはずです。
そういった作業を DRY にするために、このジェネレータを利用します。

設定

内部DSL ( Rubotyarticlegen ) によって設定を行います。

keyvalueexample
user_name user nametbpgr
gem_namegem 名ume
titleタイトル文字列チャットを空メッセージ or 任意のメッセージで埋める ruboty-ume を作成しました
purpose用途ruboty google_image で妙な画像を引き当ててしまった。
そんなときに限って、偉い人が近づいてくる。
急いでチャット画面から画像を追い出すんだ。

内緒のメッセージのやりとり。
そんなときに限って、内緒のやりとりがばれるとまずい相手が近づいてくる。
急いでチャット画面から画像を追い出すんだ。
そんな時に空行を大量に追加してメッセージを画面外に追い出します。
env/name環境変数DEFAULT_UME_TEXT
env/description環境変数の説明default ume text
dependencies/name依存先名称Ume API
dependencies/description依存先説明Ume API の説明やURL
commands/command nameRuboty::Handler.on の name に設定する内容 ※件数分ume
commands/command patternRuboty::Handler.on の pattern に設定する内容 ※件数分/ume (?.*?)\z/
commands/command descriptionRuboty::Handler.on の description に設定する内容 ※件数分output empty message N lines ( times)
commands/command example実行例※コンソールでの実行例

設定例

# encoding: utf-8user_name "tbpgr"gem_name "ume"title "チャットを空メッセージ or 任意のメッセージで埋める ruboty-ume を作成しました"purpose <<-PURPOSEruboty google_image で妙な画像を引き当ててしまった。そんなときに限って、偉い人が近づいてくる。急いでチャット画面から画像を追い出すんだ。内緒のメッセージのやりとり。そんなときに限って、内緒のやりとりがばれるとまずい相手が近づいてくる。急いでチャット画面から画像を追い出すんだ。そんな時に空行を大量に追加してメッセージを画面外に追い出します。PURPOSEenv do |e|  e.name "ENV1"  e.description "ENV1 desc"endenv do |e|  e.name "ENV2"  e.description "ENV2 desc"enddependency do |d|  d.name "dependency1"  d.description "dependency1 description"enddependency do |d|  d.name "dependency2"  d.description "dependency2 description"endcommand do |c|  c.name "ume"  c.pattern "/ume (?<count>.*?)\z/"  c.description "output empty message N lines (<count> times)"  c.example <<-EXAMPLE>ruboty command1>result1  EXAMPLEendcommand do |c|  c.name "umec"  c.pattern "/umec (?<text>.+?) (?<count>.*?)\z/"  c.description "output <text> message N lines (<count> times)"  c.example <<-EXAMPLE>ruboty command2>result2  EXAMPLEend

出力例

sample output Markdown

参照

ruboty-articlegen GitHub
ruboty-articlegen RubyGems
Ruboty関連記事
Ruboty | Ruboty Handler Plugin 作成時の README テンプレートジェネレータ ruboty-megen を作成した #ruboty

3

Go to list of users who liked

3
0

Go to list of comments

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3

Go to list of users who liked

3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?


[8]ページ先頭

©2009-2025 Movatter.jp