This repository has been archived by the owner on Apr 9, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from robertdebock/ansiblefest
Ansiblefest
- Loading branch information
Showing
16 changed files
with
119 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
repository: | ||
description: Import and process RAW files. | ||
description: Process images | ||
homepage: https://robertdebock.nl/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ molecule/*/.molecule | |
*.log | ||
*.swp | ||
molecule/resources/out | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
--- | ||
# defaults file for y | ||
|
||
y_import_from: /tmp/import | ||
y_export_to: /tmp/export | ||
# y_presets is a list of presets that will be applied to images. | ||
# y_presets: | ||
# - name: monochrome | ||
|
||
y_convert_images: yes | ||
# y_import_from defines the path where to pickup files from. | ||
# This could be /dev/sdb1 (for some SD-card) for example. | ||
y_import_from: /tmp/import | ||
|
||
y_preset: | ||
- name: monochrome | ||
# y_export_to is the path where the images will be saved. | ||
y_export_to: /tmp/export |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
exceptions: | ||
- variation: CentOS 6 | ||
reason: Somehow ImageMagick creates a different file each run. Not idempotent. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,5 @@ provisioner: | |
converge: ../resources/playbook.yml | ||
scenario: | ||
name: centos-latest | ||
converge_sequence: | ||
- converge |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,4 @@ | ||
--- | ||
- name: save the year | ||
shell: set -o pipefail ; {{ y_exiftool_binary }} {{ image.path }} -d "%Y" | grep "Create Date" | awk '{print $NF}' | ||
args: | ||
creates: nothing | ||
executable: /bin/bash | ||
register: year | ||
changed_when: no | ||
check_mode: no | ||
|
||
- name: save the month | ||
shell: set -o pipefail ; {{ y_exiftool_binary }} {{ image.path }} -d "%m" | grep "Create Date" | awk '{print $NF}' | ||
args: | ||
creates: nothing | ||
executable: /bin/bash | ||
register: month | ||
changed_when: no | ||
check_mode: no | ||
|
||
- name: save the day | ||
shell: set -o pipefail ; {{ y_exiftool_binary }} {{ image.path }} -d "%d" | grep "Create Date" | awk '{print $NF}' | ||
args: | ||
creates: nothing | ||
executable: /bin/bash | ||
register: day | ||
changed_when: no | ||
check_mode: no | ||
|
||
- name: ensure directory structure exists | ||
file: | ||
path: "{{ y_export_path }}" | ||
state: directory | ||
|
||
- name: process images | ||
block: | ||
- name: processing {{ image.path | basename }} | ||
shell: dcraw -c "{{ y_command_options[y_preset] }}" "{{ image.path }}" > "{{ y_export_path }}/{{ (image.path | basename | splitext)[0] }}.pgm" | ||
args: | ||
creates: "{{ y_export_path }}/{{ (image.path | basename | splitext)[0] }}.pgm" | ||
|
||
- name: copying processed image back | ||
fetch: | ||
src: "{{ y_export_path }}/{{ (image.path | basename | splitext)[0] }}.pgm" | ||
dest: "{{ y_export_to }}/{{ (image.path | basename | splitext)[0] }}.pgm" | ||
flat: yes | ||
when: | ||
- y_convert_images | bool | ||
|
||
- name: copying unprocessed image back | ||
fetch: | ||
src: "{{ y_export_path }}/{{ (image.path | basename }}" | ||
dest: "{{ y_export_to }}" | ||
flat: yes | ||
when: | ||
- not y_convert_images | bool | ||
- name: apply presets | ||
include: "{{ item.name }}.yml" | ||
loop: "{{ y_presets }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
- name: convert to monochrome | ||
command: convert {{ image.path }} -monochrome {{ image.path }} | ||
changed_when: no |
Oops, something went wrong.