Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mattn
Created December 31, 2015 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattn/833b9741299887bdb8a0 to your computer and use it in GitHub Desktop.
Save mattn/833b9741299887bdb8a0 to your computer and use it in GitHub Desktop.
function! s:hatebu()
let c = 0
for line in readfile('list.txt')
let res = webapi#http#get(printf('http://api.b.st-hatena.com/entry.count?url=%s', webapi#http#encodeURI(line)))
let c += res.content
endfor
return c
endfunction
echo s:hatebu()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment