Created
November 19, 2012 15:06
-
-
Save lucasdinonolte/4111160 to your computer and use it in GitHub Desktop.
Nifty CLI Wrapper around Trustlinkers API
This file contains 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 characters
#!/usr/bin/env coffee | |
http = require "http" | |
domain = process.argv[2] | |
http.get "http://trustlinker.de/api/domain.json?url=#{domain}", (res) -> | |
res.setEncoding "utf8" | |
res.on "data", (data) -> | |
data = JSON.parse data | |
output = """ | |
============ | |
#{domain} | |
============ | |
Age\t\t#{data.data.age} | |
A-Record\t#{data.data.ipv4} (#{data.data.countrycode}) | |
PR #{data.data.pagerank}\t Dompop #{data.data.domainpop}\t WOT #{data.data.WOT} | |
""" | |
console.log output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copy source to /bin/gimme
sudo chmod +x /bin/gimme
Have fun doing stuff like: gimme google.de