npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

elsewhere-profiles

v0.0.3

Published

Extracts profiles for an individaul from across social media sites

Downloads

11

Readme

elsewhere-profiles

The elsewhere-profiles is a Social media profile aggregator, it is part of a collection of node.js modules that enable the discovery of profiles and identities an indivdaul creates across the web.

Install

npm install elsewhere-profiles

or

git clone http://github.com/glennjones/elsewhere-profiles.git
cd elsewhere-profiles
npm link

Use

with list of URLs

var parser = require("elsewhere-profiles");

parser.parseUrls('http://glennjones.net/about', function(data){
    // do something with data
});

with JSON from elsewhere-mapper module

var parser = require("elsewhere-profiles");

parser.parseElsewhereJson({ data object... },  function(data){
    // do something with data
});

Options and internal cache

var parser = require("elsewhere-profiles");
var options = {'cacheTimeLimit': 360000}

parser.parseUrls('http://glennjones.net/about', options, function(data){
    // do something with data
});

Elsewhere use an in memory cache for the html it has fetched from web pages during its operation. The options object contains a property called cacheTimeLimit which can be use to set the refresh gap, by default it is set 360000ms equal to 1 hour.

You can also replace the cache with your own functionally if you provide an object contain the following interface:

{ function get (url) { returns data }

function has(url) {
  returns true || false
}

function fetch (url, callback) {
  fires callback(null, data);
}

function set(url, data) {
  returns object
}

}

Add the object to the options.cache property

Response

This will return JSON. This is an example where three urls where given: http://www.flickr.com/people/glennjonesnet/, http://www.linkedin.com/in/glennjones, http://upcoming.yahoo.com/user/62673/

{ 
    "profiles": [{
        "profile": {
            "adr": [{
                "locality": "Brighton",
                "country-name": "United Kingdom"
            }],
            "note": ["Glenn Jones is a director and a founder of Madgex. Equally as passionate about interaction design and coding, he is currently addicted to exploring ideas of the semantic web and data portability."],
            "url": ["http://www.glennjones.net"]
        },
        "identity": {
            "name": "Flickr",
            "domain": "flickr.com",
            "matchedUrl": "http://www.flickr.com/people/glennjonesnet/",
            "userName": "glennjonesnet",
            "sgn": "sgn://flickr.com/?ident=glennjonesnet",
            "endPoints": [{
                "schema": "hCard",
                "contentType": "Profile",
                "mediaType": "Html",
                "url": "http://flickr.com/people/glennjonesnet/"
            }, {
                "schema": "None",
                "contentType": "Images",
                "mediaType": "Html",
                "url": "http://flickr.com/photos/glennjonesnet/"
            }],
            "frequency": 0,
            "icon16": "http://l.yimg.com/g/favicon.ico"
        }
    }, {
        "profile": {
            "adr": [{
                "locality": "Brighton, United Kingdom"
            }],
            "fn": "Glenn Jones",
            "n": {
                "given-name": ["Glenn"],
                "family-name": ["Jones"]
            },
            "photo": ["http://m3.licdn.com/mpr/pub/image-gHqDu1tz7mTBl71NNV7WML3hcO_1GoUWgH-d6cqcc_u1-ekTgHqd9Kozc4DJGoTXS4Iw/glenn-jones.jpg"],
            "title": ["Creative Director at Madgex and Owner, Madgex"],
            "note": "Madgex"
        },
        "identity": {
            "name": "Linked-in",
            "domain": "linkedin.com",
            "matchedUrl": "http://www.linkedin.com/in/glennjones",
            "userName": "glennjones",
            "sgn": "sgn://linkedin.com/?ident=glennjones",
            "endPoints": [{
                "schema": "hCard",
                "contentType": "Profile",
                "mediaType": "Html",
                "url": "http://linkedin.com/in/glennjones"
            }, {
                "schema": "hResume",
                "contentType": "Resume",
                "mediaType": "Html",
                "url": "http://linkedin.com/in/glennjones"
            }],
            "frequency": 5,
            "icon16": "http://s3.licdn.com/scds/common/u/img/favicon_v3.ico"
        }
    }],
    "combinedProfile": {
        "adr": [{
            "locality": "Brighton",
            "country-name": "United Kingdom"
        }],
        "url": ["http://www.glennjones.net"],
        "note": ["Glenn Jones is a Director and founder of Madgex. Equally as passionate about interaction design and coding, he is currently addicted to exploring ideas of the semantic web and data portability. <br />"],
        "fn": "Glenn Jones",
        "nickname": ["glennjones"],
        "n": {
            "given-name": ["Glenn"],
            "family-name": ["Jones"]
        },
        "photo": ["http://m3.licdn.com/mpr/pub/image-gHqDu1tz7mTBl71NNV7WML3hcO_1GoUWgH-d6cqcc_u1-ekTgHqd9Kozc4DJGoTXS4Iw/glenn-jones.jpg"],
        "title": ["Creative Director at Madgex and Owner, Madgex"]
        ],
        "username": "glennjones",
        "highestFrequencySite": "http://glennjones.net/",
        "accounts": [ {
            "name": "Flickr",
            "domain": "flickr.com",
            "profileUrl": "http://flickr.com/people/glennjonesnet/",
            "userName": "glennjonesnet",
            "sgn": "sgn://flickr.com/?ident=glennjonesnet",
            "icon16": "http://l.yimg.com/g/favicon.ico",
            "frequency": 0
        }, {
            "name": "Linked-in",
            "domain": "linkedin.com",
            "profileUrl": "http://linkedin.com/in/glennjones",
            "userName": "glennjones",
            "sgn": "sgn://linkedin.com/?ident=glennjones",
            "icon16": "http://s3.licdn.com/scds/common/u/img/favicon_v3.ico",
            "frequency": 5
        },]
    },
    "noProfilesFound": [ {
        "name": "Upcoming",
        "domain": "upcoming.yahoo.com",
        "matchedUrl": "http://upcoming.yahoo.com/user/62673/",
        "userId": "62673",
        "sgn": "sgn://upcoming.yahoo.com/?pk=62673",
        "endPoints": [{
            "schema": "hCard",
            "contentType": "Profile",
            "mediaType": "Html",
            "url": "http://upcoming.yahoo.com/user/62673/"
        }],
        "frequency": 3,
        "icon16": "http://upcoming.yahoo.com/favicon.ico"
    }]
}

Using the server API

Once you've cloned the project and run npm install, run the server $ node bin/elsewhere-profiles and then point your browser at localhost:8882 to try it out.

The server API will takes a comma delimited list of URLs. Alternatively you can also pass it a JSON string from the output of the elsewhere-mapper node.js module. Finally it supports a callback querystring item for use with any of the other three data types.

GET http://localhost:8882/?urls=http%3A%2F%2Ftwitter.com%2Fglennjones&callback=myFunction

Contributing to the project

Please use github to ask me to pull your additions or corrections.

Support or Contact

Having trouble with elsewhere-profiles? Please raise an issue at: https://github.com/glennjones/elsewhere-profiles/issues

License

The project is open sourced under MIT licenses. See the license.txt file within the project source.