README
¶
transloadify
Transloadit utility - convert your local media without writing a single line of code
transloadify provides the functionality of our Go SDK's Client.Watch for simple watching and automated uploading and processing of files. This way you don't have to write a single line of code to get an existing folder converted, even when new files get added to it
# 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 examples/imgresize.json, for example):
TRANSLOADIT_KEY=abc123 \
TRANSLOADIT_SECRET=abc123efg \
./transloadify \
-input="./input" \
-output="./output" \
-template-file="./examples/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="./examples/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
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 && \
cd go-sdk && \
go get github.com/transloadit/go-sdk/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:
- Aborts unless working tree is clean
- Build to
./bin - Test
- Bumps specified SemVer part in
./VERSION - Commits the file with msg "Release v"
- Creates a Git tag with this version
- Pushes commit & tag to GitHub
- Runs gobuild.io on this tag for most platforms, saving to
./builds - Uploads them to S3 as
s3://releases.transloadit.com/transloadify/transloadify-<platform>-<arch>-<version>withpublic-readaccess, making the file accessible as e.g. http://releases.transloadit.com/transloadify/transloadify-darwin-amd64-v0.1.0 and http://releases.transloadit.com/transloadify/transloadify-darwin-amd64-latest - Clears the
./buildsdirectory
License
Documentation
¶
There is no documentation for this package.