Skip to content
/ Optimus Public

Command line tool to track and optimise all the images under a git repo

Notifications You must be signed in to change notification settings

xleon/Optimus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppVeyor NuGet NuGet Codecov

Optimus

Command line tool to track and optimise all the images under a git repo

asciicast

Install

Make sure you have dotnet core installed at your machine.

dotnet tool install -g optimustool

Update

Once installed, you can update to the latest version with:

dotnet tool update -g optimustool

Please check releases at https://github.com/xleon/Optimus/releases

Uninstall

dotnet tool uninstall -g optimustool

Use

cd /your/project/path
optimus

or

optimus /your/project/absolute/path

The first time you run the command a configuration json file will be created in your project root (OptimusConfiguration.json). You must edit the file with your TinyPNG API key/s (Get your key at https://tinypng.com/developers). Multiple keys can be used. When a key reaches its monthly limits the next one will be used.

{
  "tinyPngApiKeys": [
    "api-key-1",
    "api-key-2"
  ],
  "fileExtensions": [
    ".jpg",
    ".jpeg",
    ".png"
  ]
}

The tool will scan all images (only files added to git) with the extensions specified in the configuration file and will start optimising each one with TinyPNG API. Optimised files will be tracked in a text file at your project root called OptimusFileTracker.txt.

Both OptimusConfiguration.json and OptimusFileTracker.txt should be added to git so that either you or other developers can optimise only the added or modified images.

Deleted or modified images from the file system will be untracked before optimisation starts, so you should not have to worry about them.

About

Command line tool to track and optimise all the images under a git repo

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages