Last active
December 13, 2015 22:19
-
-
Save syusui-s/4983466 to your computer and use it in GitHub Desktop.
Revisions
-
syusui-s revised this gist
May 22, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- require 'twitpic-full' Plugin.create(:mikutter_twitpic_uploader) do UserConfig[:twitpic_upimg] = "" UserConfig[:twitpic_message] = "" twitpic = TwitPic::Client.new() -
syusui-s revised this gist
Mar 27, 2013 . 1 changed file with 44 additions and 45 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,51 +1,50 @@ # -*- coding: utf-8 -*- require 'twitpic-full' Plugin.create(:twitpic_uploader) do UserConfig[:twitpic_upimg] = "" UserConfig[:twitpic_message] = "" twitpic = TwitPic::Client.new() twitpic.configure do |conf| # 気にしたらいけない。 conf.api_key = "9b1d5ca2076eaa7029c83717dd641b47" conf.consumer_key = CHIConfig::TWITTER_CONSUMER_KEY conf.consumer_secret = CHIConfig::TWITTER_CONSUMER_SECRET conf.oauth_token = UserConfig[:twitter_token] conf.oauth_secret = UserConfig[:twitter_secret] end settings "Twitpicアップローダ" do input "ツイート内容", :twitpic_message; fileselect("アップロード画像", :twitpic_upimg, "~/") closeup post = ::Gtk::Button.new('アップロード') closeup attention = ::Gtk::Label.new("") attention.wrap = true post.signal_connect("clicked"){ post.sensitive = false upimg = UserConfig[:twitpic_upimg] message = UserConfig[:twitpic_message] if upimg != "" and FileTest.exist?(upimg) and (File.extname(upimg) =~ /^(\.jpg|\.jpeg|\.gif|\.png)$/i) == 0 then Thread.new{ attention.text = "アップロード中..." twitpic.upload(upimg, message) # returns media? }.next{ user = twitpic.users(:show, {:username => Service.primary.idname}) Service.primary.post :message => "#{message} http://twitpic.com/#{user['images'][0]['short_id']}" attention.text = "完了しました! あなたのタイムラインをご確認ください." UserConfig[:twitpic_message] = "" UserConfig[:twitpic_upimg] = "" }.terminate("Twitpicアップローダは、投稿に失敗しました.") Reserver.new(7){ attention.text = "" post.sensitive = true } else attention.text = "指定されたファイルが見つからないか、アップロードできない拡張子です. 中止." post.sensitive = true end } end end -
syusui-s revised this gist
Feb 21, 2013 . No changes.There are no files selected for viewing
-
syusui-s revised this gist
Feb 21, 2013 . 1 changed file with 43 additions and 43 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,49 +3,49 @@ require 'twitpic-full' Plugin.create(:twitpic_uploader) do UserConfig[:twitpic_upimg] = "" UserConfig[:twitpic_message] = "" twitpic = TwitPic::Client.new() twitpic.configure do |conf| # 気にしたらいけない。 conf.api_key = "9b1d5ca2076eaa7029c83717dd641b47" conf.consumer_key = CHIConfig::TWITTER_CONSUMER_KEY conf.consumer_secret = CHIConfig::TWITTER_CONSUMER_SECRET conf.oauth_token = UserConfig[:twitter_token] conf.oauth_secret = UserConfig[:twitter_secret] end settings "Twitpicアップローダ" do input "ツイート内容", :twitpic_message; fileselect("アップロード画像", :twitpic_upimg, "~/") closeup post = ::Gtk::Button.new('アップロード') closeup attention = ::Gtk::Label.new("") attention.wrap = true post.signal_connect("clicked"){ post.sensitive = false upimg = UserConfig[:twitpic_upimg] message = UserConfig[:twitpic_message] if upimg != "" and FileTest.exist?(upimg) and (File.extname(upimg) =~ /^(\.jpg|\.jpeg|\.gif|\.png)$/i) == 0 then Thread.new{ attention.text = "アップロード中..." twitpic.upload(upimg, message) # returns media? }.next{ user = twitpic.users(:show, {:username => Service.primary.idname}) Service.primary.post :message => "#{message} http://twitpic.com/#{user['images'][0]['short_id']}" attention.text = "完了しました! あなたのタイムラインをご確認ください." UserConfig[:twitpic_message] = "" UserConfig[:twitpic_upimg] = "" }.terminate("Twitpicアップローダは、投稿に失敗しました.") Reserver.new(7){ attention.text = "" post.sensitive = true } else attention.text = "指定されたファイルが見つからないか、アップロードできない拡張子です. 中止." post.sensitive = true end } end end -
syusui-s revised this gist
Feb 21, 2013 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- # twitpic-fullが必要です。# gem install twitpic-full で導入できます。 require 'twitpic-full' Plugin.create(:twitpic_uploader) do @@ -27,7 +28,7 @@ upimg = UserConfig[:twitpic_upimg] message = UserConfig[:twitpic_message] if upimg != "" and FileTest.exist?(upimg) and (File.extname(upimg) =~ /^(\.jpg|\.jpeg|\.gif|\.png)$/i) == 0 then Thread.new{ attention.text = "アップロード中..." twitpic.upload(upimg, message) # returns media? -
syusui-s revised this gist
Feb 21, 2013 . No changes.There are no files selected for viewing
-
syusui-s revised this gist
Feb 21, 2013 . 1 changed file with 12 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,19 @@ # -*- coding: utf-8 -*- require 'twitpic-full' Plugin.create(:twitpic_uploader) do UserConfig[:twitpic_upimg] = "" UserConfig[:twitpic_message] = "" twitpic = TwitPic::Client.new() twitpic.configure do |conf| # 気にしたらいけない。 conf.api_key = "9b1d5ca2076eaa7029c83717dd641b47" conf.consumer_key = CHIConfig::TWITTER_CONSUMER_KEY conf.consumer_secret = CHIConfig::TWITTER_CONSUMER_SECRET conf.oauth_token = UserConfig[:twitter_token] conf.oauth_secret = UserConfig[:twitter_secret] end settings "Twitpicアップローダ" do input "ツイート内容", :twitpic_message; fileselect("アップロード画像", :twitpic_upimg, "~/") @@ -20,7 +27,7 @@ upimg = UserConfig[:twitpic_upimg] message = UserConfig[:twitpic_message] if upimg != "" and FileTest.exist?(upimg) and (File.extname(upimg) =~ /^(\.jpg|\.jpeg|\.gif|\.png)$/) == 0 then Thread.new{ attention.text = "アップロード中..." twitpic.upload(upimg, message) # returns media? @@ -40,4 +47,4 @@ end } end end -
syusui-s revised this gist
Feb 21, 2013 . 1 changed file with 11 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ --- slug: :twitpic_uploader depends: mikutter: 0.2 plugin: - settings - twitpic-full version: 1.0 author: syusui_s name: Twitpicアップローダ description: Twitpic for mikutter -
syusui-s revised this gist
Feb 21, 2013 . 1 changed file with 0 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +0,0 @@ -
syusui-s revised this gist
Feb 21, 2013 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,3 @@ version: 1.0 author: syusui_s name: Twitpicアップローダ description: Twitpic for mikutter -
syusui-s renamed this gist
Feb 19, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
syusui-s revised this gist
Feb 19, 2013 . 2 changed files with 14 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ --- slug: :twitpic_uploader depends: mikutter: 0.2 plugin: - settings - twitpic-full version: 1.0 author: syusui_s name: Twitpicアップローダ description: Twitpic for mikutter This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- # twitpic-fullが必要です。# gem install twitpic-full で導入できます。 require 'twitpic-full' Plugin.create(:twitpic_uploader) do UserConfig[:twitpic_upimg] = "" UserConfig[:twitpic_message] = "" -
syusui-s revised this gist
Feb 19, 2013 . No changes.There are no files selected for viewing
-
syusui-s created this gist
Feb 19, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,41 @@ # -*- coding: utf-8 -*- require 'twitpic-full' Plugin.create(:twitpic_uploader) do UserConfig[:twitpic_upimg] = "" UserConfig[:twitpic_message] = "" settings "Twitpicアップローダ" do input "ツイート内容", :twitpic_message; fileselect("アップロード画像", :twitpic_upimg, "~/") closeup post = ::Gtk::Button.new('アップロード') closeup attention = ::Gtk::Label.new("") attention.wrap = true post.signal_connect("clicked"){ post.sensitive = false upimg = UserConfig[:twitpic_upimg] message = UserConfig[:twitpic_message] if upimg != "" and FileTest.exist?(upimg) and (File.extname(upimg) =~ /^(\.jpg|\.jpeg|\.gif|\.png)$/i) == 0 then Thread.new{ attention.text = "アップロード中..." twitpic.upload(upimg, message) # returns media? }.next{ user = twitpic.users(:show, {:username => Service.primary.idname}) Service.primary.post :message => "#{message} http://twitpic.com/#{user['images'][0]['short_id']}" attention.text = "完了しました! あなたのタイムラインをご確認ください." UserConfig[:twitpic_message] = "" UserConfig[:twitpic_upimg] = "" }.terminate("Twitpicアップローダは、投稿に失敗しました.") Reserver.new(7){ attention.text = "" post.sensitive = true } else attention.text = "指定されたファイルが見つからないか、アップロードできない拡張子です. 中止." post.sensitive = true end } end end