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

dummage

v0.2.0

Published

dummy image generator

Downloads

2

Readme

dummage

dummage is a dummy image generator

Getting started

This module depends on gm, so first, you should download and install GraphicsMagick.

In Mac OS X

brew install graphicsmagick

then

npm install dummage

And, add some image to "./img/#{theme}", you can get "/dummage/#{theme}".

use Express

var dummage = require("dummage")();
var app = require("express")();
app.use( dummage.middleware() );
app.listen(3000, function(){
	console.log("listen 3000")
});
  • http://localhost:3000/dummage/any: random image

  • http://localhost:3000/dummage/blank: blank image

  • http://localhost:3000/dummage/person: random person image

  • http://localhost:3000/dummage/person/300x200: random person image(crop 300px x 200px)

without Express

var dummage = require("dummage")();

dummage.any(function(err,data){
	// random image
});
dummage.blank(function(err, data){
	// blank image
});

dummage.routes("person", function(err, data){
	// random person image
});

Option

  • root: dummy image path root (dafault: "dummage")

Photo

  • https://unsplash.com/
  • http://www.pexels.com/
  • http://www.gratisography.com/

Thanks to these website.

To reduce module size

find . -name "*jpg" -exec convert {} -resize 640x640 {} \;  

crop

  • http://localhost:3000/dummage/any/400x200: crop image (gravity is "Center")

colorize

"colorize" use gm#colorize

  • http://localhost:3000/dummage/any:0x001313: colorize image (to Red)
  • http://localhost:3000/dummage/any:0x001313/600x200: colorize image and crop you can add hex after ":". Then separate hex to RGB.

use stand-alone

If you want to use dummage with stand-alone mode

npm install -g dummage

Then you can use Commandline Interface.

% dummage -p 8888

You can access http://localhost:8888/dummage/any and so on.

Why I make this ?

Yes, there are many dummy image service, but I think those are too slowly to give a presentation of prototype. I need more quicky dummy image generator.