Giter Club home page Giter Club logo

letsenhance's Introduction

letsenhance

Command line client for letsenhance.io - Enhance images in a directory

Install

npm i -g letsenhance

Or download one of the executables from releases

Usage:

Command line

letsenhance [options] email password /path/source /path/dest

Node

const Enhancer = require('letsenhance');

async function enhance() {
const enhancer = new Enhancer(options);
  let err = await enhancer.login(email, password);
  if (err) {
    return console.log('Login failed.');
  }

  err = await enhancer.enhanceDir(sourcePath, destPath);
  if (err) {
    return console.log(`Error while processing: ${err}`);
  }

  console.log('Processing complete!');
}

enhance();

Options:

--type string - JPEG (default) or PNG; PNG yields a larger file that maintains its quality across any subsequent alterations (jpeg does not);

--version string - magic (default, for photographs), boring (for everything else), color-enhance, tone-enhance;

--mode string - Auto (default); Auto is the only supported transformation mode at the moment;

--maxParallel number - 10 (default); how many files to process at a time; use a lower value if you encounter frequent issues;

--attempts number - 6 (default); how many times to re-attempt an operation after a 'soft' failure; the default value should suffice;

--progressInterval number - 15 (default); how many seconds to wait before checking a file's progress; use a greater value if an error message suggests it (e.g. 30 or higher);

--stopOnFirstFailedFile boolean - true (default) or false; stop the entire process on a 'hard' failure (used to prevent wasting available transformations);

Example with options:

letsenhance --type PNG --version boring --maxParallel 8 --progressInterval 30 [email protected] joespassword /path/source /path/dest

Notes:

Options must be placed before the email string.
If the paths or password contain spaces, use quotes: '/path to a dir' or "/path to another dir".
Make sure there are only images in the source path directory; other files will cause errors and eventually halt the process. Hidden files starting with '.' are ignored.
Don't use an option without a value, it may lead to unexpected results.

letsenhance's People

Contributors

kesarion avatar

Stargazers

 avatar  avatar

Watchers

 avatar

letsenhance's Issues

Login broken?

Hi,

Is this CLI still working?

I managed to install pretty easily (thanks for making it user-friendly), however it throws an error that the login information is incorrect even though it is.

Thanks,

Stephen.

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.