:help!
結果↓
E478: 慌てないでください!
tipsというよりイースターエッグかな...
【Blosxom】bookmarksプラグインを導入
:e ftp://user@server/path/to/file/file.txt
Enter Password:
:help mbyteで出てくるメアドも既に使えません。
scriptencoding utf-8
function! JsonHandler(data)
return a:data
endfunction
function! GetJsonP(url)
let ret = system("curl -s \"" . a:url . "?callback=JsonHandler\"")
let org = &enc
let &enc = "utf-8"
let ret = substitute(ret, '\\u\([0-9a-zA-Z]\{4\}\)', '\=nr2char("0x".submatch(1))', 'g')
exe "let val = " . iconv(ret, "utf-8", org)
let &enc = org
return val
endfunction
function! GetJson(url)
let ret = system("curl -s \"" . a:url . "\"")
let org = &enc
let &enc = "utf-8"
let ret = substitute(ret, '\\u\([0-9a-zA-Z]\{4\}\)', '\=nr2char("0x".submatch(1))', 'g')
exe "let val = " . iconv(ret, "utf-8", org)
let &enc = org
return val
endfunction
if exists("json")
unlet json
endif
if exists("jvar")
unlet jvar
endif
let json = GetJson("http://b.hatena.ne.jp/entry/json/?url=http://mattn.kaoriya.net/web/hatena/20070726110753.htm")
for jvar in json["bookmarks"]
echo jvar["user"] . " - " . jvar["comment"]
endfor
実行結果は以下の通り(参考:はてブでアーーーーッ!!!)
yheld - アーーーーッ!!!フヒヒ、サーセンwwww
parkbench -
ku0522 - アーーッ!!
tyoro1210 - アーーーーッ!!!
mattn - 自分でアーーーーッ!!!
また、del.icio.usの場合は通常のJSONにデフォルトのコールバックが含まれてしまいますので、vimでは解釈出来ません。しかしJSONPならばメソッドを指定する事で左記javascriptが消えてくれます。専用にGetJsonPという関数を用意しました。
if exists("json")
unlet json
endif
if exists("jvar")
unlet jvar
endif
let json = GetJsonP("http://del.icio.us/feeds/json/mattn.jp")
for jvar in json
echo jvar["d"] . " - " . jvar["u"]
endfor
とする事で(参考:mattn.jp in del.icio.us)
FlashVillage.com - FREE Flash Templates - http://www.flashvillage.com/
その対応に意味はあるのか (Yak blog) - http://www.greenspace.info/mt/2007/07/31/post_38.html
Top Rated - Free Stock Photos - http://public-domain-photos.com/
Niconorati (ニコノラティ) - ブログで今話題のニコニコ動画 - http://pulpsite.net/niconorati/
SourceForge、「優秀なオープンメ[スプロジェクト」の投票結果を発・- ZDNet Japan - http://japan.zdnet.com/oss/story/0,3800075264,20353786,00.htm
IT戦記 - style.cssText の使い処に関する考察 - http://d.hatena.ne.jp/amachang/20070730/1185788557
void GraphicWizardsLair( void ); // Ustream.tvの凄いところは、Flashで実用的なIRCクライアントを作っちゃったところ - http://www.otsune.com/diary/2007/07/30/1.html#200707301
カイ氏伝: Wikipediaの「RSSリーダー」がとんでもない件 - http://blogging.from.tv/archives/000564.html
美輪明宏のチンコの有無を返すAPI作った | dzfl::blog - http://dzfl.jp/blog/2007/07/29/miwa-mojo-api/
美輪明宏のチンコの有無を配信するRSS作った - PRESS RELEASE on VOX - http://asada.vox.com/library/post/%E7%BE%8E%E8%BC%AA%E6%98%8E%E5%AE%8F%E3%81%AE%E3%83%81%E3%83%B3%E3%82%B3%E3%81%AE%E6%9C%89%E7%84%A1%E3%82%92%E9%85%8D%E4%BF%A1%E3%81%99%E3%82%8Brss%E4%BD%9C%E3%81%A3%E3%81%9F.html
Cookie Manager | Javascript Code | All Things Webby - http://insin.woaf.net/code/javascript/cookiemanager.html
[N] 無料で使える18のアプリケーション&ウェブサービス - http://netafull.net/lifehack/021313.html
flivpee - Google Code - http://code.google.com/p/flivpee/
MOONGIFT: ≫ オープンメ[スのFlashムービープレーヤ「Flivpee」:オープンメ[スを毎日紹介 - http://www.moongift.jp/2007/07/flivpee/
TechCrunch Japanese アーカイブ ≫ Pownceが、ついにAPIを公開 - http://jp.techcrunch.com/archives/pownce-moving-to-open-api-eventually/
といった結果が得られます。このブログを応援する