GithubHelp home page GithubHelp logo

nooshu / node-countdown-gif Goto Github PK

View Code? Open in Web Editor NEW
74.0 5.0 55.0 241 KB

Using Node to generate a countdown Gif. Serve or download it as required.

License: MIT License

JavaScript 60.61% HTML 39.39%

node-countdown-gif's Introduction

Gif countdown generator

The very simple app I have created allows you to generate a countdown timer animated gif depending on the URL parameters you provide. View demo. Now no longer maintained.

URL Parameters (*required)

  • time* - Date & time when your countdown will end [e.g. 2016-06-24T20:35]
  • frames - number of frames (also number of seconds) the countdown will run before looping [defaults to 30]
  • width - width in pixels [defaults to 200]
  • height - height in pixels [defaults to 200]
  • bg - hex colour code for the background [defaults to 000000]
  • color - hex colour code for the text [defaults to ffffff]
  • name - filename used for the generated gif [defaults to 'default']

Generate Examples

These trigger a download. Change the URL from /generate to /serve when used in an image tag.

Versions

Tested with and designed for:

  • node 6.0.0
  • cairo 1.8.6

License

MIT

node-countdown-gif's People

Contributors

nooshu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node-countdown-gif's Issues

Heroku deployment

Hi,

Thank you for sharing this useful repo.

I'm encountering some difficulties deploying it to heroku.

Can you describe the steps you followed to do so, please ?

createCanvas is not a function

Hey, firstly I love this build and have managed to deploy it to Heroku!

I was looking at adding web fonts support and have been looking at the registerFont utility method. However if I tweak the code from:

const Canvas = require('canvas');
........
this.canvas = new Canvas(this.width, this.height);

To either:

const Canvas = require('canvas');
........
this.canvas = Canvas.createCanvas(this.width, this.height);

or:

const { createCanvas } = require('canvas');
........
this.canvas = createCanvas(this.width, this.height);

I get an error telling me that createCanvas is not a function, the same if I add registerFont.

I'm using canvas 2.6.0 and node 11.8.0, any ideas?

Thanks,

Dan

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.