Browse Source

Fixing bug with data files

add-file-preservation 1.3.1
Drew Short 5 years ago
parent
commit
4889048b17
  1. 36
      acm-config-default.json
  2. 4
      acm.py
  3. 2
      setup.py

36
acm-config-default.json

@ -3,7 +3,7 @@
"profiles": { "profiles": {
"default": { "default": {
"jpeg": { "jpeg": {
"version": "1.2.1",
"version": "1.3.1",
"processors": ["cjpeg"], "processors": ["cjpeg"],
"extensions": [ "extensions": [
"jpg", "jpg",
@ -13,7 +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",
"version": "1.3.1",
"processors": ["optipng"], "processors": ["optipng"],
"extensions": [ "extensions": [
"png" "png"
@ -22,7 +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",
"version": "1.3.1",
"processors": ["ffmpeg"], "processors": ["ffmpeg"],
"extensions": [ "extensions": [
"mp4", "mp4",
@ -32,7 +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",
"version": "1.3.1",
"processors": ["ffmpeg", "opusenc"], "processors": ["ffmpeg", "opusenc"],
"extensions": [ "extensions": [
"wav", "wav",
@ -44,7 +44,7 @@
}, },
"placebo": { "placebo": {
"jpeg": { "jpeg": {
"version": "1.2.1",
"version": "1.3.1",
"processors": ["cp"], "processors": ["cp"],
"extensions": [ "extensions": [
"jpg", "jpg",
@ -55,7 +55,7 @@
"command": "cp {input_file} {output_file}" "command": "cp {input_file} {output_file}"
}, },
"png": { "png": {
"version": "1.2.1",
"version": "1.3.1",
"processors": ["cp"], "processors": ["cp"],
"extensions": [ "extensions": [
"png" "png"
@ -65,7 +65,7 @@
"command": "cp {input_file} {output_file}" "command": "cp {input_file} {output_file}"
}, },
"video": { "video": {
"version": "1.2.1",
"version": "1.3.1",
"processors": ["cp"], "processors": ["cp"],
"extensions": [ "extensions": [
"mp4", "mp4",
@ -76,7 +76,7 @@
"command": "cp {input_file} {output_file}" "command": "cp {input_file} {output_file}"
}, },
"audio": { "audio": {
"version": "1.2.1",
"version": "1.3.1",
"processors": ["cp"], "processors": ["cp"],
"extensions": [ "extensions": [
"wav", "wav",
@ -89,7 +89,7 @@
}, },
"webp": { "webp": {
"jpeg": { "jpeg": {
"version": "1.2.1",
"version": "1.3.1",
"processors": ["cwebp"], "processors": ["cwebp"],
"extensions": [ "extensions": [
"jpg", "jpg",
@ -99,7 +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",
"version": "1.3.1",
"processors": ["cwebp"], "processors": ["cwebp"],
"extensions": [ "extensions": [
"png" "png"
@ -110,7 +110,7 @@
}, },
"aggressive": { "aggressive": {
"jpeg": { "jpeg": {
"version": "1.2.1",
"version": "1.3.1",
"processors": ["ffmpeg", "cjpeg"], "processors": ["ffmpeg", "cjpeg"],
"extensions": [ "extensions": [
"jpg", "jpg",
@ -120,7 +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",
"version": "1.3.1",
"processors": ["optipng"], "processors": ["optipng"],
"extensions": [ "extensions": [
"png" "png"
@ -129,7 +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",
"version": "1.3.1",
"processors": ["ffmpeg"], "processors": ["ffmpeg"],
"extensions": [ "extensions": [
"mp4", "mp4",
@ -139,7 +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",
"version": "1.3.1",
"processors": ["ffmpeg", "opusenc"], "processors": ["ffmpeg", "opusenc"],
"extensions": [ "extensions": [
"wav", "wav",
@ -151,7 +151,7 @@
}, },
"aggressive-webp": { "aggressive-webp": {
"jpeg": { "jpeg": {
"version": "1.2.1",
"version": "1.3.1",
"processors": ["cwebp"], "processors": ["cwebp"],
"extensions": [ "extensions": [
"jpg", "jpg",
@ -161,7 +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",
"version": "1.3.1",
"processors": ["cwebp"], "processors": ["cwebp"],
"extensions": [ "extensions": [
"png" "png"
@ -170,7 +170,7 @@
"command": "cwebp -o {output_file} ${input_file}" "command": "cwebp -o {output_file} ${input_file}"
}, },
"video": { "video": {
"version": "1.2.1",
"version": "1.3.1",
"processors": ["ffmpeg"], "processors": ["ffmpeg"],
"extensions": [ "extensions": [
"mp4", "mp4",
@ -180,7 +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",
"version": "1.3.1",
"processors": ["ffmpeg", "opusenc"], "processors": ["ffmpeg", "opusenc"],
"extensions": [ "extensions": [
"wav", "wav",

4
acm.py

@ -18,7 +18,7 @@ from minio.error import NoSuchKey
BUF_SIZE = 4096 BUF_SIZE = 4096
#Application Version #Application Version
VERSION = "1.3.0"
VERSION = "1.3.1"
########### ###########
@ -603,7 +603,7 @@ def clean_files(ctx, context, context_data, dry_run, files):
print(f'ERROR: {s3_bucket}:{file_identity} {e}', file=sys.stderr) print(f'ERROR: {s3_bucket}:{file_identity} {e}', file=sys.stderr)
for file_data_identity in found_data_objects: for file_data_identity in found_data_objects:
if not f'/{file_data_identity}' in found_data_files:
if not file_data_identity in found_data_files:
if dry_run: if dry_run:
removed_files.append(f'{s3_data_bucket}:{file_data_identity}') removed_files.append(f'{s3_data_bucket}:{file_data_identity}')
else: else:

2
setup.py

@ -4,7 +4,7 @@ from distutils.core import setup
setup( setup(
name='Asset-Compression-Manager', name='Asset-Compression-Manager',
version='1.3.0',
version='1.3.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