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

sharpmachine

v1.2.6

Published

Interactive CLI for batch image sharp optimizing and resizing images

Downloads

83

Readme

Sharp Machine

Sharp Machine is an image optimizing program cli meant to be installed globally. After execution Sharp Machine will scan for images and optimize them according to config set up via interactive cli.

You can resize, crop and force format and edit whole sharp module config (will open your fav editor) via cli command.

Uses sharp npm module as base for image manipulation.

Installation

npm i -g sharpmachine

Run sharp machine

Navigate to a folder with images and run

sharpmachine 
                            |_|                                                         

Welcome to sharp machine

SharpMachine

  1. Either type folder name, or type "." for current folder (required)
  2. Enter output folder (required)

Commands

If selected folder contains images (png, jpg, gif, webp), you can :

  1. Optimize images with default config; Images will optimized with 80 quality, unless specified via cli, the images will not be resized.

  2. Optimize images to webp format with default config; Images will optimized with 80 quality, unless specified via cli, the images will not be resized.

For both options cli will ask for resizing options, if specified yes, cli will demand width (number: required), height (number: leave empty to keep the aspect ration) and image quality (0 - 100)

  1. Custom Config; custom config option will open your favorite text editor, where global sharp image config resides:
 {
    "quality":90,
    "rotate":false,
    "trim":false,
    "jpegQuality":90,
    "pngQuality":90,
    "webpQuality":90,
    "jpegProgressive":true,
    "cropFocus":"left top",
    "width":false,
    "height":false,
    "pngCompressionLevel":9,
    "pngCompressionSpeed":4,
    "toFormat":"",
    "useMozJpeg":false
 }

edit, save and quit

Configuration options and types can be found at: https://sharp.pixelplumbing.com/en/stable/api-operation/

  1. Show Stats (yes/no) Shows simple statistics on executed files. (Slower)

  2. Add watermark to images, cli will ask for watermark addition, in order to make this work put watermark.png into input folder. Sharpmachine will add the watermark image in the bottom right corner, please note that watermark should be smaller than the pictures you are optimizing

Contribution

All requests are more than welcome

ToDo

  • Select files from the list
  • Improve progress bars
  • Improve verbose statistics

License:

Type: ISC

Author: Lukasz Celitan, "Spaceghost", https://spaceout.pl, [email protected]