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 | |
#creates a montage of images from a selection of | |
#properly named files. The top left is 0, 0. The bottom | |
#right is presumed to be 7, 15. A subset of the map | |
#can be built with the correct inputs to the script. | |
#REQUIRES IMAGEMAGICK | |
#------------------------------ INPUTS -----------------------------# | |
#the first parameter passed to the shell script |
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 | |
#based on code found here: | |
#http://jcornuz.wordpress.com/2007/10/26/imagemagick-and-bash-batch-power/ | |
#This script takes an image with a lot of extra border, trims it down | |
#and then re-adds a 20 pixel border evenly around the edge. | |
#REQUIRES IMAGEMAGICK AND GHOSTSCRIPT | |
#the tiles will be put in a directory called... | |
MYDIR="PROCESSED" |
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 | |
#Leaves the stats area intact and a 2px black | |
#border on the other edges. Saves file to a | |
#sub-direcotry | |
if [ ! -d ./PROCESSED ]; then mkdir ./PROCESSED; | |
fi | |
# processes all pngs | |
if ls | grep png; then for p in *.png; |
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 | |
#Crops an image file to a specified size and offset, | |
#renames with same prefix as original. | |
#REQUIRES ImageMagick. | |
Y1=$1 | |
Y2=$2 | |
X1=$3 | |
X2=$4 |
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 | |
#Reduce time by running process for just the part of the | |
#grid actually represented | |
Y1=$1 | |
Y2=$2 | |
X1=$3 | |
X2=$4 | |
#used in prefix generation |
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
mogrify *.png -gravity South -crop 1200x860+0+0 +repage *.png | |
convert -delay 50 *.png -colors 256 -loop 0 toT5_50.gif | |
convert toT5_50.gif -resize 310x215 tot5_50_tumb.gif | |
#Also could have used percentage resize: | |
#convert toT5_50.gif -resize 25% -colors 256 toT5_50_tumb.gif |
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
#REQUIRES FFMPEG | |
mogrify *.png -gravity south -crop 1240x860+0+0 +repage *.png | |
ffmpeg -framerate 4 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p output.mp4 |
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 | |
#This image scans the top left corner of an image for a | |
#green spot at particular locations. | |
#Values shifted for use in the Moon Temple | |
#y values work for Manji Temple but not X | |
#Reduce time by running process for just the part of the | |
#grid actually represented | |
Y1=$1 |
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
#http://www.cyberciti.biz/faq/howto-get-current-date-time-in-python/ | |
#https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior | |
#http://learnpythonthehardway.org/book/ex12.html | |
import datetime | |
filename= "mydata.txt" | |
logtime = datetime.datetime.now() |
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
#http://learnpythonthehardway.org/book/ex16.html | |
#http://stackoverflow.com/questions/11584247/how-can-i-simplify-this-series-of-target-write-commands | |
#http://stackoverflow.com/questions/12790983/multiline-file-read-in-python | |
from sys import argv | |
script, filename = argv | |
title_lines = 2 |