Last active
May 25, 2016 18:21
-
-
Save iamsortiz/ac3fb22646294d8a33bd71ebc968f34a to your computer and use it in GitHub Desktop.
Given some draw.io .png diagrams, generate jpg's for the original size, and for a smaller version JIRA embeded friendly
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
#!/bin/bash | |
# Given a folder structure | |
# | |
# * ./ | |
# * ./raw | |
# | |
# With the draw.ioong exports at raw | |
# | |
# It will leave all your JIRA-embed-ready images at ./ | |
# | |
# Recommendation: folder issueXX and drawio images as issueXX-whatever for better organization | |
find raw/*.png -printf "%f\n" | sed -e 's/\.[a-zA-Z0-9]*$//g' | xargs -n 1 -I {} bash -c 'convert raw/{}.png {}.jpg; convert raw/{}.png -resize 1200x1000\> {}_small.jpg' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment