Giter VIP home page Giter VIP logo

tweemat's Introduction

Easily link the contents of any entity within a Tweet from the Twitter API.


Build Status


Tweemat is a lightweight script that takes any entity from a Twitter API timeline and nicely formats it for the web. From the plain text contents of tweet's text, it will find all mentions of users, media, links, and hashtags and replace them with their proper links and display URLs. Tweemat is capable of being used within Node.JS, AMD, or the browser.

Downloading

Node.js

npm install tweemat --save

Bower

bower install --save tweemat

Other

  1. Clone the repo: git clone https://github.com/dcompute/tweemat.git or download the latest ZIP.

  2. Move ./tweemat/src/tweemat.js to the desired directory within your project.

Adding to Your Project

Node.js

var Tweemat = require('tweemat');

Browser

<script src="tweemat.js"></script>

Require.js

require.config({
  paths: {
    "Tweemat": "path/to/tweemat",
  }
});

define(["Tweemat"], function (Tweemat) {
  ...
});

Using

Tweemat is designed for use on single tweet representations. To work with a tweet, create an object from the Tweemat constructor by passing it a single tweet representation.

var tweet = new Tweemat(twitterTimeline[tweetIndex]);
return '<li>' + tweet.linkAllEntities() + '</li>';

Documentation

JSDoc output for Tweemat can be found in the Wiki.

tweemat's People

Contributors

dcompute avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.