Más contenido relacionado メイドめーる14. ___ _ / u \ / \ /\ / し (>) (<) \ | ∪ ( __ 人 __ ) J | _______ _ \ u `⌒ ´ / | | | ノ \ | | | / ´ | | | | l | | | ___ _ / u \ / \ ─\ チラッ / し (>) (●) \ | ∪ ( __ 人 __ ) J | _______ _ \ u `⌒ ´ / | | | ノ \ | | | / ´ | | | | l | | | 試しに読んでみるお。 15. ___ _ / :::::::::::::::: \ / ::::::─ 三三─\ / :::::::: ( ○)三(○)\ |:::::::::::::::::::: ( __ 人 __ ) :::: | _______ _ \ ::::::::: |r┬-| , / .| | | ノ :::::::::::: ` ー '´ \ | | | / ::::::::::::::::::::: | | | |::::::::::::::::: l | | | 20 分しかないお・・・ 25. linux Ruby On Rails postfix Mail fetcher POP3 Mextractr lighttpd gcal api Apache 26. linux Ruby On Rails postfix Mail sender SMTP lighttpd gcal api Rake タスク 29. rails に渡す /etc/aliases hoge: "|( export RAILS_ENV=amp;quot;productionamp;quot; && cd /var/maidmail && ruby script/runner amp;quot;SchduleMailReceiver.receive(STDIN.read)amp;quot; )" 31. 問題 例外を吐くと .... This is the Postfix program at host snares.example.com. : The Postfix program >test@example.com< : Command died with status 1: "/var/MailApp/mailserver/test.rb". Command output: /usr/lib/ruby/1.8/logger.rb:518:in `initialize': Permission denied - /var/MailApp/mailserver/../log/MailServer.log (Errno::EACCES) from /usr/lib/ruby/1.8/logger.rb:518:in `open' from /usr/lib/ruby/1.8/logger.rb:518:in `open_logfile' from ユーザー宛にエラーメール 36. require 'net/pop' task :mail_fetcher => [:environment] do @config = YAML.load(IO.read("#{RAILS_ROOT}/config/mail_fetcher.yml")) daemonize() loop do pop = Net::POP3.new(@config[RAILS_ENV]['server']) pop.start(@config[RAILS_ENV]['username'], @config[RAILS_ENV]['password']) unless pop.mails.empty? pop.each_mail do |m| IncomingMailHandler.receive(m.pop) m.delete end end pop.finish sleep(SLEEP_TIME) end end 41. server = GoogleCalendar::Service.new( GCAL_ACCOUNT, GCAL_PASSWORD) calendar = GoogleCalendar::Calendar.new(server, GCAL_FEED) event = calendar.create_event event.st = Time.parse("2008-12-04 22:46:39") event.en = Time.parse("2008-12-04 23:46:39") event.where = " 場所 " event.title = " 予定 " event.desc =" 詳細 " event.save! GCalAPI :予定の登録 51. ユーザーを Google アクセス要求 URL に誘導 ユーザーが「許可」を押す アプリケーション アプリケーションに「一時トークン」が渡される 「一時トークン」を「永続トークン」と交換してもらう 「永続トークン」をつかって Google サービスにアクセス AuthSub のながれ 53. require 'gcalapi' require 'googlecalendar/auth_sub_util' @uri = GoogleCalendar::AuthSubUtil.build_request_url( 'http://www.example.com/responce', 'http://www.google.com/calendar/feeds/', false, #use_secure true #use_session ) GCalAPI で生成 56. トークンの交換 authsub_token = '' one_time_token = params[:token] session_token = GoogleCalendar:: AuthSubUtil. exchange_session_token(one_time_token) 57. トークンを使ってアクセス gserver = GoogleCalendar::ServiceAuthSub.new(user.calendarToken) calendar = GoogleCalendar::Calendar.new(gserver, GoogleCalendar::Calendar::DEFAULT_CALENDAR_FEED) event = calendar.create_event event.st = Time.parse("2008-12-04 22:46:39") event.en = Time.parse("2008-12-04 23:46:39") event.where = " 場所 " event.title = " 予定 " event.desc =" 詳細 " event.save! 62. <?xml version="1.0" encoding="utf-8"?> : <gd:extendedProperty name='what' value=" 定時株主総会 "/> <gd:who valueString="* メタデータ株式会社 "/> <gd:who valueString=" 野村直之 "/> <gd:when startTime="2008-10-23" valueString="10 月 23 日 "/> <gd:where valueString=" 東京都墨田区本所 "/> <gd:where valueString=" 弊社本店 A 会議室 "/> </entry> </feed> レスポンス 63. $ sudo gem install mextractr_webapi Bulk updating Gem source index for: http://gems.rubyforge.org Successfully installed mextractr_webapi-0.0.1 1 gem installed gem : mextractr_webapi mextractr_result = MextractrWebApi.new(MEXTRACTR_API_KEY).parse(text) mextractr_result['when'][0]['startTime'] mextractr_result['where'][0]['valueString'] 68. 2ch でも絶賛! 【ネット】メイドさんが Google カレンダーの予定をメールで届けてくれる「メイドめーる」 6 :なまえないよぉ~ : 2008/11/11( 火 ) 13:09:10 ID:TJ3qrp7g このメールの内容担当してるヤツは 30 代独身の堅太りなおっさんなんだろ? 11 :なまえないよぉ~ : 2008/11/11( 火 ) 19:20:14 ID:kf6HEfeT 絵とかデザインがいまいちなのが痛い。 72. 個人・ 商用 どちらでも利用可。 利用なさる方が全責任を持つこと。 利用に際し、第三者や当局などから当サイトに問い合わせやクレームが一切来ないように配慮しなければなりません。 連絡不要 ライセンシー不要 著作権表示不要 リンク不要 使用の際の 使用報告不要 加工可 すばらしい利用条件