tinyjpg

command module
v0.0.7-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2018 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

TinyJPG Filesystem watcher and image compress

Go Report Card

JPEG image compress watcher based Filesystem event notification github.com/rjeczalik/notify

screenshot

Build

For compilation you need to install Golang1.8

~ $ apt install libmagickwand-dev imagemagick
~ $ git clone https://github.com/OrlovEvgeny/TinyJPG && cd TinyJPG
~ $ go get -u github.com/rjeczalik/notify
~ $ mkdir build && go build -o ./build/tinyjpg-watcher *.go

Start

I recommend using supervisor

example config

~ $ vim /etc/supervisor/conf.d/tinyjpg.conf

write

[program:tinyjpg]
command=/home/TinyJPG/build/tinyjpg-watcher -path=/home/www/example.com/images -verbose=true -worker=10
directory=/home/TinyJPG/build
environment=ENVIRONMENT=production
autorestart=true
user=root
redirect_stderr=true
stderr_logfile=/var/log/tinyjpg/log.err.log
stdout_logfile=/var/log/tinyjpg/log.out.log
~ $ mkdir -p /var/log/tinyjpg
~ $ service supervisor restart

or use Tmux

~ $ ./build/tinyjpg-watcher -path=/home/www/example.com/images -verbose=true -worker=10

Args:

  • path - required. Path to watch new files, default /home/www
  • verbose - optional. Verbose log out, default true
  • worker - optional. Amount start workers process, default 5

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL