Code Monkey home page Code Monkey logo

node-webremix's Introduction

Webremix

Converts your media urls and links to embedded HTML.

Installation

npm install webremix

How to Use

var remix = require('webremix');

remix.generate('http://amazinggifs.com/cats.gif look at these amazing cats!', function(err, resp) {
    console.log(resp);
});

Output becomes:

<div class="image-wrapper">
    <a href="http://amazinggifs.com/cats.gif" target="_blank">
        <img src="http://amazinggifs.com/cats.gif">
    </a>
</div> look at these amazing cats!

Video size options

If you want to pass in a different width and height for Youtube/Vimeo/Rdio or set a particular start time for youtube videos, pass in the following:

var options = {
    width: 500,
    height: 200,
    startTime: 29
};

remix.generate('https://www.youtube.com/watch?v=XYc6ZiV07ZE', options, function(err, resp) {
    console.log(resp);
});

Supported media

  • Regular links (http://whatever.org or whatever.org)
  • Links with image extensions of jpg|gif|png|jpeg
  • Instagram urls
  • Youtube urls
  • Vimeo urls
  • Soundcloud urls (will fall back to a regular link if the author has sharing disabled)
  • Rdio urls

Testing

npm test

node-webremix's People

Contributors

malachi-m avatar

Watchers

James Cloos avatar  avatar

Forkers

nathanbland

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.