SlideShare una empresa de Scribd logo
1 de 79
Termtter

      Introduce a Termtter
        Sora HARAKAMI
       sorah@tubusu.net
2010-03-28 Online.sg #10 (onsp2)
Hi

•
•          Online.sg #10 (sp#2)
    rubysapporo
•                                       RubySapporo
            Lingr



•   Lingr                  URL(
                           )

•   http://chat.onlinesg.org/
•   http://lingr.com/room/onsg (Lingr           )
•              ( Sora HARAKAMI )

•   http://codnote.net/
•     1(             2)

•              (    80+)

•   Rubyist

•   termtter
Twitter

• What’s Happening?
    --- #onsg10 now.
• Twitter

•           (“ ” or true)
•   Twitter API   TL



•   API

•

•
(               )
•   Twit
•   Tween
•   NatsuLion, NatsuLiPhone
•   YoruFukurou
•   Web (twitter.com)
•   movatwitter
•   Echofon
•   Vim
•   telnet
•   TwitterIRCGateway
•   tig.rb
Terminal Twitter

• Terminal   Twitter

• ssh
Termtter
<(@)//_
   
 Termtter
Termtter
• Ruby   Twitter

•
•
•
•
•
•
•
•
Photo taken by niallkennedy
http://www.flickr.com/photos/niallkennedy/5092992/
• json 1.1.3+
• highline 1.5.0+
• termcolor 1.0.0+
• rubytter 0.11.0+
• notify 0.2.1+
• $ gem install json highline termcolor
  rubytter notify
• gem install termtter
(   )
•   git

•

•   git clone git://github.com/jugyo/termtter
•   export PATH=/path/to/termtter/bin:$PATH
•          zshrc      bashrc

•
•          git pull
Photo taken by kjarrett
http://www.flickr.com/photos/kjarrett/1805317057/
• `termtter`
•
• ~/.termtter/config
• ~/.termtter/config
• Ruby
•                     (
             )

• config.password
•   #                                         termtter
                                        #
•   config.update_interval -- TL
•   config.timeout --
•   config.retry --
•   config.enable_ssl -- SSL
•   config.plugins.keyword.keywords --               TL

•   config.confirm --                     (re
                        :-( )
Photo taken by Kevin Steele
http://www.flickr.com/photos/kevinsteele/463276653/
• `termtter`
•

• TL
•             ,

•   u, update
•   r, replies
•   l, list
•   show
•   re, reply
•   rt, retweet
•   fib
u,update

• Twitter post
• >u
• updated =>
r, replies


• replies
• >r
l, list
•            TL

•   >l
    TL

•   > l {ID}
    @{ID} TL

•   > l {ID}/{SLUG}
    Twitter
                  http://twitter.com/{ID}/{SLUG}

•   > l /{SLUG}
show
•   > show {TYPABLE_ID}
•          typable_id post

•   typable_id tig

•   (10:23:12) [$bc] akazora:



•   (10/03/21 10:49) [$hc] sora_h: @akazora hi. (reply_to
    [$ak])
•                     typable_id
re, reply
• post reply
• in_reply_to_status_id
• reply
• > re {TYPABLE_ID} hi!
  replied => hi!
rt, retweet
•   RT

•        RT

•   QT

•   config.plugins.retweet.official_retweet = false    RT

•   config.plugins.retweet.quotetweet = true QT       (
    RT          )

•        RT                                     RT

•   > rt {TYPABLE_ID} {COMMENT}
fib

• Twitter
• fib {n}
•                n
  tweet
• termtter

•            git
• config   Termtter::Client.init do |t| ~ end
           t.plug ‘plugin ’

•              config
      t.plug                         #



•
• easy_post
• growl, growl2
• notify-send, notify-send2, notify-send3
• footer
• channel
• story
easy_post
•   TIG

•   > hogehoge
•     hogehoge      commandnotfound



•         re hoge
      u
growl, growl2
•        growl

•   TL           growl

•
•   growl -- ruby-growl   (                )

•   growl2 -- rubycocoa   meow

•   growl

•                growl           network
notify-send,notify-
    send2, notify-send3
•   growl                  tl

•   notify-send -- http://jugyo.org/blog/3850
         growl ubuntu      notify-send

•   notify-send2 --



•   notify-send3 -- `notify-send`
footer
•
•   config.footer = “     ”

•
•   footer

•
•                               termtter

•   footer
channel

•
•
    > c channel


•
channel(2)
•
•   @{ID} --                     TL

•                   _search --

•   replies -- replies
•   main -- home_timeline
•              --
    ( /watch           sora_h/watch   )
channel(3)
•
• config.plugins.channel.auto_reload_channel
  s = { :”               ” =>         }

• :hoge              :@hoge      :/list
                    :”               ”
story
•
•
    config.plugins.stdout.sweets


    (           : jugyo ujm sora_h lingr_termtter
    termtter hitode909 nanki sixeight)
story
---               sora_h

                                               termtter
                                       nanki
                                      jugyo



                       Twitter

                                                           replies


Twitter


                                      Twitter


                                                          termtter
      hitode909                  fib
                  g
• Ruby
• /path/to/termtter/lib/plugins/
  foobar.rb

• load
API
•   Termtter::Client.register_command
•   Termtter::Client.register_hook
•   Termtter::Client.output
•   Termtter::Client.add_task
•   Termtter::Client.execute
•   Termtter::API.twitter
•   config. {...} .set_default
Termtter::Client.
     register_command
• command
•   Termtter::Client.register_command(
     :name => :foo, #
     :alias => :f, #
     :help => [‘foo, f’, ‘bar’] #
     :exec => lambda { |arg| #      lambda   arg
         ...
    })
Termtter::Client.
             register_hook
• hook
• hook
•   Termtter::Client.register_hook(
     :name => :piyopiyo, #
        :point => :foobar, #hook
        :exec => lambda {...} #    hook
    )
hook points
   • point
      Point             Args          Detail
:filter_for_output   statuses, event
:modify_arg_for_{
                  command , arg
              }                        arg
:pre_exec_{
                    command , arg
          }
:post_exec_{
                    command , arg
              }
    :initialize
Termtter::Client.output

• statuses
• statuses => [status, status, ...]
  statuses
  Termtter::API.twitter.home_timeline
                ok
Termtter::Client.add_ta
          sk
•
• crontab
• Termtter::Client.add_task(
      :name => :foobar, #
      :interval => 10 #        (   )
  )
Termtter::Client.execut
           e

•
• Termtter::Client.execute(“some_command
  some_arg”)
Termtter::API.twitter

• Rubytter
• Termtter::API.twitter.update(“hoge”)
•
config. {...} .set_default
•                config.plugins.



• config.plugins.hoge.set_default(:foo,:bar)

•                config.plugins.hoge.foo :bar
•
•
    story   fib
• lib/termtter         core

• lib/plugins        plugin

• lib/plugins/defaults
               plugin(
                              )
core


• core   core client.rb

•
•

•
•
• ujihisa
• [2010/3/18 6:42:20 AM] &ujihisa25:
  termtter             =

• [2010/3/18 6:42:32 AM] &ujihisa25:
                            termtter
• ujihisa
• [2010/3/18 6:42:20 AM] &ujihisa25:
  termtter             =

• [2010/3/18 6:42:32 AM] &ujihisa25:
                            termtter
•
sorah


•
• fork   commit   pull request

•
pull request

• github
  http://github.com/jugyo/termtter
     fork     clone

•                              commit&push

• http://github.com/jugyo/termtter
                   pull request
pull request



• Spec
pull request



• Spec
•
pull request



• Spec
•
pull request



• Spec
•              termtter
pull request



• Spec
•              termtter
pull request


• Spec
•              termtter
pull request

• Spec
•                 termtter


  http://ujm.tumblr.com/post/232805392/
  termtter-pull-spec
termtter room

• http://lingr.com/room/termtter
•             termtter
• termtter
•
end
end
Lingr   online.sg
   http://chat.onlinesg.org/




            end
few
less -> few
few


• gem install few
• git clone git://github.com/ujihisa/few
• git        /path/to/few/bin PATH
demo

Más contenido relacionado

Similar a Onsg10 Intro Termtter

APIテストあれこれ
APIテストあれこれAPIテストあれこれ
APIテストあれこれtzm_freedom
 
Programming Contest Hacks
Programming Contest HacksProgramming Contest Hacks
Programming Contest HacksKosei Moriyama
 
Twitter Start Guide : 초보자를 위한 트위터 완전정복 가이드
Twitter Start Guide : 초보자를 위한 트위터 완전정복 가이드 Twitter Start Guide : 초보자를 위한 트위터 완전정복 가이드
Twitter Start Guide : 초보자를 위한 트위터 완전정복 가이드 Jinho Jung
 
Twitter start guide for brandream
Twitter start guide for brandreamTwitter start guide for brandream
Twitter start guide for brandreamHome
 
Monitoring and Debugging your Live Applications
Monitoring and Debugging your Live ApplicationsMonitoring and Debugging your Live Applications
Monitoring and Debugging your Live ApplicationsRobert Coup
 
Go Web Development
Go Web DevelopmentGo Web Development
Go Web DevelopmentCheng-Yi Yu
 
20160708 データ処理のプラットフォームとしてのpython 札幌
20160708 データ処理のプラットフォームとしてのpython 札幌20160708 データ処理のプラットフォームとしてのpython 札幌
20160708 データ処理のプラットフォームとしてのpython 札幌Ryuji Tamagawa
 
TypeScript와 Flow: 
자바스크립트 개발에 정적 타이핑 도입하기
TypeScript와 Flow: 
자바스크립트 개발에 정적 타이핑 도입하기TypeScript와 Flow: 
자바스크립트 개발에 정적 타이핑 도입하기
TypeScript와 Flow: 
자바스크립트 개발에 정적 타이핑 도입하기Heejong Ahn
 
Gitting the Most From Git
Gitting the Most From GitGitting the Most From Git
Gitting the Most From GitChris Miller
 
Inside Of Mbga Open Platform
Inside Of Mbga Open PlatformInside Of Mbga Open Platform
Inside Of Mbga Open PlatformHideo Kimura
 
Unleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and InsightUnleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and InsightMatthew Russell
 
Unleashing twitter data for fun and insight
Unleashing twitter data for fun and insightUnleashing twitter data for fun and insight
Unleashing twitter data for fun and insightDigital Reasoning
 
tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02Hiroshi SHIBATA
 
Git for Android Developers
Git for Android DevelopersGit for Android Developers
Git for Android DevelopersTony Hillerson
 
Apex on Local - Better Alternative to Salesforce DX
Apex on Local - Better Alternative to Salesforce DXApex on Local - Better Alternative to Salesforce DX
Apex on Local - Better Alternative to Salesforce DXtzm_freedom
 

Similar a Onsg10 Intro Termtter (20)

The Git - (#1/2)
The Git - (#1/2)The Git - (#1/2)
The Git - (#1/2)
 
图解Git
图解Git图解Git
图解Git
 
APIテストあれこれ
APIテストあれこれAPIテストあれこれ
APIテストあれこれ
 
The git
The gitThe git
The git
 
Github basics
Github basicsGithub basics
Github basics
 
Programming Contest Hacks
Programming Contest HacksProgramming Contest Hacks
Programming Contest Hacks
 
Twitter Start Guide : 초보자를 위한 트위터 완전정복 가이드
Twitter Start Guide : 초보자를 위한 트위터 완전정복 가이드 Twitter Start Guide : 초보자를 위한 트위터 완전정복 가이드
Twitter Start Guide : 초보자를 위한 트위터 완전정복 가이드
 
Twitter start guide for brandream
Twitter start guide for brandreamTwitter start guide for brandream
Twitter start guide for brandream
 
Monitoring and Debugging your Live Applications
Monitoring and Debugging your Live ApplicationsMonitoring and Debugging your Live Applications
Monitoring and Debugging your Live Applications
 
Go Web Development
Go Web DevelopmentGo Web Development
Go Web Development
 
20160708 データ処理のプラットフォームとしてのpython 札幌
20160708 データ処理のプラットフォームとしてのpython 札幌20160708 データ処理のプラットフォームとしてのpython 札幌
20160708 データ処理のプラットフォームとしてのpython 札幌
 
TypeScript와 Flow: 
자바스크립트 개발에 정적 타이핑 도입하기
TypeScript와 Flow: 
자바스크립트 개발에 정적 타이핑 도입하기TypeScript와 Flow: 
자바스크립트 개발에 정적 타이핑 도입하기
TypeScript와 Flow: 
자바스크립트 개발에 정적 타이핑 도입하기
 
Gitting the Most From Git
Gitting the Most From GitGitting the Most From Git
Gitting the Most From Git
 
第 10 回 Webteko
第 10 回 Webteko第 10 回 Webteko
第 10 回 Webteko
 
Inside Of Mbga Open Platform
Inside Of Mbga Open PlatformInside Of Mbga Open Platform
Inside Of Mbga Open Platform
 
Unleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and InsightUnleashing Twitter Data for Fun and Insight
Unleashing Twitter Data for Fun and Insight
 
Unleashing twitter data for fun and insight
Unleashing twitter data for fun and insightUnleashing twitter data for fun and insight
Unleashing twitter data for fun and insight
 
tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02tDiary annual report 2009 - Sapporo Ruby Kaigi02
tDiary annual report 2009 - Sapporo Ruby Kaigi02
 
Git for Android Developers
Git for Android DevelopersGit for Android Developers
Git for Android Developers
 
Apex on Local - Better Alternative to Salesforce DX
Apex on Local - Better Alternative to Salesforce DXApex on Local - Better Alternative to Salesforce DX
Apex on Local - Better Alternative to Salesforce DX
 

Onsg10 Intro Termtter

Notas del editor