<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>You Look Too Cool &#187; はてな</title>
	<atom:link href="http://stabucky.com/wp/archives/tag/%e3%81%af%e3%81%a6%e3%81%aa/feed" rel="self" type="application/rss+xml" />
	<link>http://stabucky.com/wp</link>
	<description>ゆるくつくる - stabuckyのブログ。</description>
	<lastBuildDate>Thu, 17 May 2012 12:09:09 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>PHPで「はてなハイク」へ投稿</title>
		<link>http://stabucky.com/wp/archives/2126</link>
		<comments>http://stabucky.com/wp/archives/2126#comments</comments>
		<pubDate>Sun, 05 Dec 2010 00:56:57 +0000</pubDate>
		<dc:creator>stabucky</dc:creator>
				<category><![CDATA[デジタル]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[はてな]]></category>

		<guid isPermaLink="false">http://stabucky.com/wp/?p=2126</guid>
		<description><![CDATA[PHPで、はてなハイクのボットを作ることにしました。 Twitterのボットは作ったことがあります。 しかし、はてなハイクと認証の方式が違います。Twitterの投稿はOAuth認証ですが、はてなハイクはベーシック認証です。 ネットで調べて見つけたのがこちらのページ。 はてブの WebHook を利用して PHP スクリプトではてなハイクに投稿するサンプル &#8211; カミクズヒロイ /bin そのものズバリのサンプルが載っていたので、そのまま使わせていただきます。ありがとうございます。 サンプル function haikuPost&#40;$st, $kw, $id, $pw, $src, $url&#41;&#123; &#160; &#160; require_once 'HTTP/Request.php'; &#160; &#160; $req = &#38;new HTTP_Request&#40;&#41;; &#160; &#160; $req-&#62;setURL&#40;$url&#41;; &#160; &#160; $req-&#62;setBasicAuth&#40;$id, $pw&#41;; &#160; &#160; $req-&#62;setMethod&#40;HTTP_REQUEST_METHOD_POST&#41;; &#160; &#160; $req-&#62;addPostData&#40;'keyword', $kw&#41;; &#160; &#160; $req-&#62;addPostData&#40;'status', $st&#41;; &#160; &#160; $req-&#62;addPostData&#40;'source', $src&#41;; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://stabucky.com/wp/archives/2126/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPressからMovableTypeへ移行したい</title>
		<link>http://stabucky.com/wp/archives/984</link>
		<comments>http://stabucky.com/wp/archives/984#comments</comments>
		<pubDate>Fri, 29 Jan 2010 10:27:02 +0000</pubDate>
		<dc:creator>stabucky</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[MovableType]]></category>
		<category><![CDATA[はてな]]></category>

		<guid isPermaLink="false">http://stabucky.com/wp/?p=984</guid>
		<description><![CDATA[このブログはWordPressを使っています。 はてなハイクで投稿した内容をバックアップを兼ねて、このブログに貼り付けていたのですが、(似たような投稿を表示するプラグイン)で、このはてなハイクばかりが表示されるという不具合があります。10日分をまとめて貼り付けているため文章が長く、言葉の一致数が相対的に多いからかもしれません。 というわけで、このはてなハイクのまとめをこのブログから外し、はてなダイアリーに移行しようと思います。 はてなダイアリーは他のブログからのインポートに対応しています。 しかしそのデータ形式はMovableType形式(MT形式)のみのようです。 一方、WordPressは内容のエクスポートに対応していますが、出力形式はXML形式のみ。 つまり、このままでは移行することができません。 ネットで調べてみたところ、MovableTypeからWordPressへの移行については情報が多いのですが、逆にWordPressからMovableTypeへの移行については、とても少ないのです。 エクスポートしたXML形式のデータをMT形式に変換する方法が見つかりません。 ようやく見つけた「PHPを使って変換する方法」を試しましたがダメ。 「MovableTypeをインストールしてXML形式をインポートする方法」というのがあり、実現性は高そう。しかし、そもそもMovableTypeが嫌でWordPressに乗り換えたのに今さら、という気がします。 途方に暮れて、昨夜は寝てしまいました。 今朝、ひらめいたのは「MySQLからデータを引き抜いてMT形式に整形する方法」。そもそもWordPressのデータはすべてMySQLにデータベース化されて保存されているのです。何もXML形式に変換したものをさらに変換する必要はないのです。 というわけで、この方法を採用することにします。 ただし、MT形式に整形するプログラムを自分で書かなければならないので、いつになることか。 追記 成功しました。 You Look Too Cool » WordPressからMovableTypeへの移行]]></description>
		<wfw:commentRss>http://stabucky.com/wp/archives/984/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>はてなハイクとTwitterのAPIの違い</title>
		<link>http://stabucky.com/wp/archives/636</link>
		<comments>http://stabucky.com/wp/archives/636#comments</comments>
		<pubDate>Sat, 21 Feb 2009 02:21:10 +0000</pubDate>
		<dc:creator>stabucky</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[はてな]]></category>

		<guid isPermaLink="false">http://stabucky.com/wp/?p=636</guid>
		<description><![CDATA[はてなハイクのAPIはTwitterと互換性があるとのこと。 私はJavaScriptではてなハイクとTwitterの過去の投稿を抽出しているのですが、確かに同じコードで動きます。 しかし若干、異なる点があるので、書いておきます。 URL はてなハイクの場合 http://h.hatena.ne.jp/api/statuses/user_timeline/stabucky.json Twitterの場合 http://twitter.com/statuses/user_timeline/stabucky.json ユーザーIDを指定して記事をJSON形式で取得する場合のURLです。 当然、最初は違いますが、途中からは同じ。 日時 はてなハイクの場合 「2009-02-20T22:57:59Z」 Twitterの場合 「Fri Feb 20 22:57:59 +0000 2009」 「2009年2月20日 22:57:59」が上のように表記されます。両方とも標準時ですので、日本時間だと「2009年2月21日 7:57:59」です。 JSON形式で取得する場合の添え字は「created_at」。 JavaScriptで変換するならば次のようなコード。 function hatenadate&#40;td&#41; &#123; &#160; &#160; re=/^(....)-(..)-(..)T(..:..:..)Z$/; &#160; &#160; pat=&#34;$2/$3/$1 $4 UTC+0000&#34; &#160; &#160; rep=new Date&#40;td.replace&#40;re,pat&#41;&#41;; &#160; &#160; return&#40;rep.toLocaleString&#40;&#41;&#41;; &#125; function twitterdate&#40;td&#41;&#123; &#160; &#160; re=/^(.+) (.+) (..) (..:..:..) (.+) (.+)$/; &#160; [...]]]></description>
		<wfw:commentRss>http://stabucky.com/wp/archives/636/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>はてなハイクの過去の投稿を貼り付けた</title>
		<link>http://stabucky.com/wp/archives/90</link>
		<comments>http://stabucky.com/wp/archives/90#comments</comments>
		<pubDate>Tue, 06 Jan 2009 16:02:02 +0000</pubDate>
		<dc:creator>stabucky</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[はてな]]></category>

		<guid isPermaLink="false">http://stabucky.com/wp/?p=90</guid>
		<description><![CDATA[はてなハイクを利用しています。 はてなハイクAPIを使うと簡単にデータが取り出せます。 JSON形式にしてJavaScriptで過去の投稿を整形してみました。 せっかくなのでこのブログに貼り付けてみました。 ありがたいのはブラウザで表示されている文章をコピーして、WordPressの編集画面に貼り付けると、リンクや画像も期待通りに貼り付けられること。 これはとても便利です。 編集画面の「精度」の高さはWordPressの優れた点の一つだと思います。 追記 2010年1月29日にはてなダイアリーに貼り付け直しました。]]></description>
		<wfw:commentRss>http://stabucky.com/wp/archives/90/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>はてなブックマークのiPhone用ブックマークレット</title>
		<link>http://stabucky.com/wp/archives/38</link>
		<comments>http://stabucky.com/wp/archives/38#comments</comments>
		<pubDate>Tue, 02 Dec 2008 12:15:48 +0000</pubDate>
		<dc:creator>stabucky</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[はてな]]></category>

		<guid isPermaLink="false">http://stabucky.com/wp/?p=38</guid>
		<description><![CDATA[シンプルに。 はてなブックマーク用のブックマークレットです。 探すといろいろ出てくるのですが、シンプルなのがないので自分で試してみました。 これで充分だと思います。 はてなブックマーク]]></description>
		<wfw:commentRss>http://stabucky.com/wp/archives/38/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

