Browse Source

Adding versions to profiles

add-file-preservation
Drew Short 5 years ago
parent
commit
db96427402
  1. 18
      acm-config-default.json
  2. 3
      acm.py
  3. 2
      setup.py

18
acm-config-default.json

@ -3,6 +3,7 @@
"profiles": { "profiles": {
"default": { "default": {
"jpeg": { "jpeg": {
"version": "1.2.1",
"processors": ["cjpeg"], "processors": ["cjpeg"],
"extensions": [ "extensions": [
"jpg", "jpg",
@ -12,6 +13,7 @@
"command": "cjpeg -optimize -quality 90 -progressive -outfile {output_file} {input_file}" "command": "cjpeg -optimize -quality 90 -progressive -outfile {output_file} {input_file}"
}, },
"png": { "png": {
"version": "1.2.1",
"processors": ["optipng"], "processors": ["optipng"],
"extensions": [ "extensions": [
"png" "png"
@ -20,6 +22,7 @@
"command": "optipng -o2 -strip all -out {output_file} {input_file}" "command": "optipng -o2 -strip all -out {output_file} {input_file}"
}, },
"video": { "video": {
"version": "1.2.1",
"processors": ["ffmpeg"], "processors": ["ffmpeg"],
"extensions": [ "extensions": [
"mp4", "mp4",
@ -29,6 +32,7 @@
"command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -c:v libvpx-vp9 -b:v 0 -crf 29 -c:a libopus {output_file}" "command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -c:v libvpx-vp9 -b:v 0 -crf 29 -c:a libopus {output_file}"
}, },
"audio": { "audio": {
"version": "1.2.1",
"processors": ["ffmpeg", "opusenc"], "processors": ["ffmpeg", "opusenc"],
"extensions": [ "extensions": [
"wav", "wav",
@ -40,6 +44,7 @@
}, },
"placebo": { "placebo": {
"jpeg": { "jpeg": {
"version": "1.2.1",
"processors": ["cp"], "processors": ["cp"],
"extensions": [ "extensions": [
"jpg", "jpg",
@ -50,6 +55,7 @@
"command": "cp {input_file} {output_file}" "command": "cp {input_file} {output_file}"
}, },
"png": { "png": {
"version": "1.2.1",
"processors": ["cp"], "processors": ["cp"],
"extensions": [ "extensions": [
"png" "png"
@ -59,6 +65,7 @@
"command": "cp {input_file} {output_file}" "command": "cp {input_file} {output_file}"
}, },
"video": { "video": {
"version": "1.2.1",
"processors": ["cp"], "processors": ["cp"],
"extensions": [ "extensions": [
"mp4", "mp4",
@ -69,6 +76,7 @@
"command": "cp {input_file} {output_file}" "command": "cp {input_file} {output_file}"
}, },
"audio": { "audio": {
"version": "1.2.1",
"processors": ["cp"], "processors": ["cp"],
"extensions": [ "extensions": [
"wav", "wav",
@ -81,6 +89,7 @@
}, },
"webp": { "webp": {
"jpeg": { "jpeg": {
"version": "1.2.1",
"processors": ["cwebp"], "processors": ["cwebp"],
"extensions": [ "extensions": [
"jpg", "jpg",
@ -90,6 +99,7 @@
"command": "cwebp -jpeg_like -q 90 -o {output_file} {input_file}" "command": "cwebp -jpeg_like -q 90 -o {output_file} {input_file}"
}, },
"png": { "png": {
"version": "1.2.1",
"processors": ["cwebp"], "processors": ["cwebp"],
"extensions": [ "extensions": [
"png" "png"
@ -100,6 +110,7 @@
}, },
"aggressive": { "aggressive": {
"jpeg": { "jpeg": {
"version": "1.2.1",
"processors": ["ffmpeg", "cjpeg"], "processors": ["ffmpeg", "cjpeg"],
"extensions": [ "extensions": [
"jpg", "jpg",
@ -109,6 +120,7 @@
"command": "export FILE={output_file} && export TEMP_FILE=${FILE}_tmp.jpg && ffmpeg -i {input_file} -vf scale=-1:720 ${TEMP_FILE} && cjpeg -optimize -quality 75 -progressive -outfile {output_file} ${TEMP_FILE} && rm ${TEMP_FILE}" "command": "export FILE={output_file} && export TEMP_FILE=${FILE}_tmp.jpg && ffmpeg -i {input_file} -vf scale=-1:720 ${TEMP_FILE} && cjpeg -optimize -quality 75 -progressive -outfile {output_file} ${TEMP_FILE} && rm ${TEMP_FILE}"
}, },
"png": { "png": {
"version": "1.2.1",
"processors": ["optipng"], "processors": ["optipng"],
"extensions": [ "extensions": [
"png" "png"
@ -117,6 +129,7 @@
"command": "optipng -o2 -strip all -out {output_file} {input_file}" "command": "optipng -o2 -strip all -out {output_file} {input_file}"
}, },
"video": { "video": {
"version": "1.2.1",
"processors": ["ffmpeg"], "processors": ["ffmpeg"],
"extensions": [ "extensions": [
"mp4", "mp4",
@ -126,6 +139,7 @@
"command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -vf scale=-1:720 -c:v libvpx-vp9 -b:v 0 -crf 38 -c:a libopus {output_file}" "command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -vf scale=-1:720 -c:v libvpx-vp9 -b:v 0 -crf 38 -c:a libopus {output_file}"
}, },
"audio": { "audio": {
"version": "1.2.1",
"processors": ["ffmpeg", "opusenc"], "processors": ["ffmpeg", "opusenc"],
"extensions": [ "extensions": [
"wav", "wav",
@ -137,6 +151,7 @@
}, },
"aggressive-webp": { "aggressive-webp": {
"jpeg": { "jpeg": {
"version": "1.2.1",
"processors": ["cwebp"], "processors": ["cwebp"],
"extensions": [ "extensions": [
"jpg", "jpg",
@ -146,6 +161,7 @@
"command": "export FILE={output_file} && export TEMP_FILE=${FILE}_tmp.jpg && ffmpeg -i {input_file} -vf scale=-1:720 ${TEMP_FILE} && cwebp -jpeg_like -q 75 -o {output_file} ${TEMP_FILE} && rm ${TEMP_FILE}" "command": "export FILE={output_file} && export TEMP_FILE=${FILE}_tmp.jpg && ffmpeg -i {input_file} -vf scale=-1:720 ${TEMP_FILE} && cwebp -jpeg_like -q 75 -o {output_file} ${TEMP_FILE} && rm ${TEMP_FILE}"
}, },
"png": { "png": {
"version": "1.2.1",
"processors": ["cwebp"], "processors": ["cwebp"],
"extensions": [ "extensions": [
"png" "png"
@ -154,6 +170,7 @@
"command": "cwebp -o {output_file} ${input_file}" "command": "cwebp -o {output_file} ${input_file}"
}, },
"video": { "video": {
"version": "1.2.1",
"processors": ["ffmpeg"], "processors": ["ffmpeg"],
"extensions": [ "extensions": [
"mp4", "mp4",
@ -163,6 +180,7 @@
"command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -vf scale=-1:720 -c:v libvpx-vp9 -b:v 0 -crf 38 -c:a libopus {output_file}" "command": "ffmpeg -hide_banner -loglevel panic -i {input_file} -vf scale=-1:720 -c:v libvpx-vp9 -b:v 0 -crf 38 -c:a libopus {output_file}"
}, },
"audio": { "audio": {
"version": "1.2.1",
"processors": ["ffmpeg", "opusenc"], "processors": ["ffmpeg", "opusenc"],
"extensions": [ "extensions": [
"wav", "wav",

3
acm.py

@ -17,6 +17,9 @@ from minio.error import NoSuchKey
# Size of the buffer to read files with # Size of the buffer to read files with
BUF_SIZE = 4096 BUF_SIZE = 4096
#Application Version
VERSION = "1.2.1"
########### ###########
# AsyncIO # # AsyncIO #

2
setup.py

@ -4,7 +4,7 @@ from distutils.core import setup
setup( setup(
name='Asset-Compression-Manager', name='Asset-Compression-Manager',
version='0.1.0',
version='1.2.1',
description='Helper Utility For Managing Compressed Assets', description='Helper Utility For Managing Compressed Assets',
author='Drew Short', author='Drew Short',
author_email='warrick@sothr.com' author_email='warrick@sothr.com'
Loading…
Cancel
Save