Onsg10 Intro Termtter

1,572 views
1,493 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,572
On SlideShare
0
From Embeds
0
Number of Embeds
101
Actions
Shares
0
Downloads
3
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide















































































  • Onsg10 Intro Termtter

    1. 1. Termtter Introduce a Termtter Sora HARAKAMI sorah@tubusu.net 2010-03-28 Online.sg #10 (onsp2)
    2. 2. Hi • • Online.sg #10 (sp#2) rubysapporo
    3. 3. • RubySapporo Lingr • Lingr URL( ) • http://chat.onlinesg.org/ • http://lingr.com/room/onsg (Lingr )
    4. 4. • ( Sora HARAKAMI ) • http://codnote.net/ • 1( 2) • ( 80+) • Rubyist • termtter
    5. 5. Twitter • What’s Happening? --- #onsg10 now. • Twitter • (“ ” or true)
    6. 6. • Twitter API TL • API • •
    7. 7. ( ) • Twit • Tween • NatsuLion, NatsuLiPhone • YoruFukurou • Web (twitter.com) • movatwitter • Echofon • Vim • telnet • TwitterIRCGateway • tig.rb
    8. 8. Terminal Twitter • Terminal Twitter • ssh
    9. 9. Termtter
    10. 10. <(@)//_ Termtter
    11. 11. Termtter • Ruby Twitter • • • •
    12. 12. • • • •
    13. 13. Photo taken by niallkennedy http://www.flickr.com/photos/niallkennedy/5092992/
    14. 14. • 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
    15. 15. • gem install termtter
    16. 16. ( ) • git • • git clone git://github.com/jugyo/termtter • export PATH=/path/to/termtter/bin:$PATH • zshrc bashrc • • git pull
    17. 17. Photo taken by kjarrett http://www.flickr.com/photos/kjarrett/1805317057/
    18. 18. • `termtter` • • ~/.termtter/config
    19. 19. • ~/.termtter/config • Ruby • ( ) • config.password
    20. 20. • # termtter # • config.update_interval -- TL • config.timeout -- • config.retry -- • config.enable_ssl -- SSL • config.plugins.keyword.keywords -- TL • config.confirm -- (re :-( )
    21. 21. Photo taken by Kevin Steele http://www.flickr.com/photos/kevinsteele/463276653/
    22. 22. • `termtter` • • TL
    23. 23. • , • u, update • r, replies • l, list • show • re, reply • rt, retweet • fib
    24. 24. u,update • Twitter post • >u • updated =>
    25. 25. r, replies • replies • >r
    26. 26. l, list • TL • >l TL • > l {ID} @{ID} TL • > l {ID}/{SLUG} Twitter http://twitter.com/{ID}/{SLUG} • > l /{SLUG}
    27. 27. 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
    28. 28. re, reply • post reply • in_reply_to_status_id • reply • > re {TYPABLE_ID} hi! replied => hi!
    29. 29. 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}
    30. 30. fib • Twitter • fib {n} • n tweet
    31. 31. • termtter • git
    32. 32. • config Termtter::Client.init do |t| ~ end t.plug ‘plugin ’ • config t.plug # •
    33. 33. • easy_post • growl, growl2 • notify-send, notify-send2, notify-send3 • footer • channel • story
    34. 34. easy_post • TIG • > hogehoge • hogehoge commandnotfound • re hoge u
    35. 35. growl, growl2 • growl • TL growl • • growl -- ruby-growl ( ) • growl2 -- rubycocoa meow • growl • growl network
    36. 36. 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`
    37. 37. footer • • config.footer = “ ” • • footer • • termtter • footer
    38. 38. channel • • > c channel •
    39. 39. channel(2) • • @{ID} -- TL • _search -- • replies -- replies • main -- home_timeline • -- ( /watch sora_h/watch )
    40. 40. channel(3) • • config.plugins.channel.auto_reload_channel s = { :” ” => } • :hoge :@hoge :/list :” ”
    41. 41. story • • config.plugins.stdout.sweets ( : jugyo ujm sora_h lingr_termtter termtter hitode909 nanki sixeight)
    42. 42. story --- sora_h termtter nanki jugyo Twitter replies Twitter Twitter termtter hitode909 fib g
    43. 43. • Ruby • /path/to/termtter/lib/plugins/ foobar.rb • load
    44. 44. 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
    45. 45. Termtter::Client. register_command • command • Termtter::Client.register_command( :name => :foo, # :alias => :f, # :help => [‘foo, f’, ‘bar’] # :exec => lambda { |arg| # lambda arg ... })
    46. 46. Termtter::Client. register_hook • hook • hook • Termtter::Client.register_hook( :name => :piyopiyo, # :point => :foobar, #hook :exec => lambda {...} # hook )
    47. 47. 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
    48. 48. Termtter::Client.output • statuses • statuses => [status, status, ...] statuses Termtter::API.twitter.home_timeline ok
    49. 49. Termtter::Client.add_ta sk • • crontab • Termtter::Client.add_task( :name => :foobar, # :interval => 10 # ( ) )
    50. 50. Termtter::Client.execut e • • Termtter::Client.execute(“some_command some_arg”)
    51. 51. Termtter::API.twitter • Rubytter • Termtter::API.twitter.update(“hoge”) •
    52. 52. config. {...} .set_default • config.plugins. • config.plugins.hoge.set_default(:foo,:bar) • config.plugins.hoge.foo :bar
    53. 53. • • story fib
    54. 54. • lib/termtter core • lib/plugins plugin • lib/plugins/defaults plugin( )
    55. 55. core • core core client.rb •
    56. 56. • •
    57. 57.
    58. 58. • ujihisa • [2010/3/18 6:42:20 AM] &ujihisa25: termtter = • [2010/3/18 6:42:32 AM] &ujihisa25: termtter
    59. 59. • ujihisa • [2010/3/18 6:42:20 AM] &ujihisa25: termtter = • [2010/3/18 6:42:32 AM] &ujihisa25: termtter
    60. 60.
    61. 61. sorah • • fork commit pull request •
    62. 62. pull request • github http://github.com/jugyo/termtter fork clone • commit&push • http://github.com/jugyo/termtter pull request
    63. 63. pull request • Spec
    64. 64. pull request • Spec •
    65. 65. pull request • Spec •
    66. 66. pull request • Spec • termtter
    67. 67. pull request • Spec • termtter
    68. 68. pull request • Spec • termtter
    69. 69. pull request • Spec • termtter http://ujm.tumblr.com/post/232805392/ termtter-pull-spec
    70. 70. termtter room • http://lingr.com/room/termtter • termtter
    71. 71. • termtter •
    72. 72. end
    73. 73. end
    74. 74. Lingr online.sg http://chat.onlinesg.org/ end
    75. 75. few
    76. 76. less -> few
    77. 77. few • gem install few • git clone git://github.com/ujihisa/few • git /path/to/few/bin PATH
    78. 78. demo

    ×