transloadify

command module
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2014 License: MIT Imports: 7 Imported by: 0

README

Build Status

transloadify

transloadify is a commandline utility to convert local media using Transloadit, without writing a single line of code.

transloadify comes as binaries for all platforms and can monitor directories for incoming media files.

transloadify if built on top of the Transloadit Go SDK

# Use -h for more help
transloadify -h

# Upload all files from ./input and process them using the steps defined in the template with the id 'tpl123id'.
# Download the results and put them into ./output.
# Watch the input directory to automatically upload all new files.
TRANSLOADIT_KEY=abc123 \
TRANSLOADIT_SECRET=abc123efg \
./transloadify \
  -input="./input" \
  -output="./output" \
  -template="tpl123id" \
  -watch

Instead of using a template id you can also load the steps from a local template file using the template-file option (see templates/imgresize.json, for example):

TRANSLOADIT_KEY=abc123 \
TRANSLOADIT_SECRET=abc123efg \
./transloadify \
  -input="./input" \
  -output="./output" \
  -template-file="./templates/imgresize.json" \
  -watch

Install

Download the tranloadify binary

curl http://releases.transloadit.com/transloadify/transloadify-linux-amd64-latest \
  -o ./transloadify && chmod 755 $_

Use the binary

./transloadify -h

Daemonize

To run transloadify in the background as a daemon on Linux, continuously monitoring a directory for new media, and converting it according to your wishes, you can use a convenience argument that generates an Upstart file:

TRANSLOADIT_KEY=abc123 \
TRANSLOADIT_SECRET=abc123efg \
./transloadify \
  -input="./input" \
  -output="./output" \
  -template-file="./templates/imgresize.json" \
  -watch \
  -upstart \
|sudo tee /etc/init/transloadify.conf

Transloadify will now start on boot, and you can control it like so:

sudo start transloadify
sudo restart transloadify
sudo stop transloadify
sudo status transloadify

Logs will be written to syslog under the transloadify tag so you can redirect them using e.g. rsyslog, but by default they're accessible in the mail syslog

sudo tail -f /var/log/syslog

Contribute

If you want to get into transloadify development, here are the steps:

Set up Go

If you haven't already, download Go for your platform.

Paths

You don't need GOROOT

unset GOROOT

Set GOPATH to your projects directory, e.g.:

export GOPATH=~/go
Get the SDK & Dependencies
mkdir -p $GOPATH/src/github.com/transloadit && \
 cd $_ && \
 git clone https://github.com/transloadit/go-sdk && \
 git clone https://github.com/transloadit/transloadify && \
 cd transloadify
Run transloadify in debug mode
go run transloadify.go -h
Build
make build
Release

Releasing requires the AWS Command Line Interface and write access to the transloadify S3 bucket, hence this can only be done by Transloadit's staff.

Depending on SemVer impact, any of the following will release a new version

make release bump=major
make release bump=minor
make release bump=patch

This means:

License

MIT Licensed

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