Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

標準出力のログを見やすい形式に変更

  • Loading branch information...
commit a238c7cacde3f26892772ae91a1564d9f70a94eb 1 parent 4f20145
@mitukiii authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 make_booth_stream.rb
View
7 make_booth_stream.rb
@@ -9,6 +9,7 @@
module MakeBooth
ACTIVITY_URI = 'ws://ws.makebooth.com:5678/'
+ HOST = 'http://makebooth.com'
IMAGE_HOST = 'http://img.makebooth.com'
IMAGE_SMALL = IMAGE_HOST + '/scale/c.50x50.'
@@ -26,9 +27,13 @@ def connect
def stream(message)
data = JSON.parse(message)
- $stdout.puts data.inspect
text = data['text'].gsub(/<\/?[^>]*>/, '')
+ date = DateTime.parse(data['created_at'])
+
+ $stdout.puts text
+ $stdout.puts ' link: ' + HOST + data['image_file_link_path']
+ $stdout.puts ' date: ' + date.strftime('%Y/%m/%d %H:%M')
options = {}
if data['user_image_file_name']
Please sign in to comment.
Something went wrong with that request. Please try again.