HTTPS SSH
Mac OSX Installation instructions

1.  Install XCode and the XCode Command Line tools
2.  Agree to the XCode License
3.  Install MacPorts for your version of OSX
4.  Download a Portfile which supports +jp2 in ImageMagick: 
    https://trac.macports.org/export/115021/trunk/dports/graphics/ImageMagick/Portfile
5.  Move port file to an install directory (~/ImageMagick)
6.  cd ~/ImageMagick
7.  Install ImageMagick with jp2 support: sudo port install +jpeg2
8.  Install Perl5 Magick: sudo port install p5-perlmagick
9.  Install Exiftool: http://www.sno.phy.queensu.ca/~phil/exiftool/ 
    Note: you may need to change your security preferences to allow installation of software from anywhere.
10. Install Mercurial: sudo port install mercurial
11. Install perl libraries:
    sudo cpan install Image::Magick
    sudo cpan install Image::ExifTool	
    sudo cpan install File::Slurp
12. Install kakadu http://www.kakadusoftware.com/executables/KDU733_Demo_Apps_for_OSX108_140118.dmg
13. Pull latest code from repository: hg clone https://kirkhess@bitbucket.org/kirkhess/hathitrustremediate

Usage information
./remediate.pl {input directory} {output directory}
eg:
./remediate.pl input output

Note: input must contain directories named with the HathiTrust OBJID. Output does not need to exist.
For Linux, replace mac ports with your package manager (apt-get or yum).

Windows Installation Instructions

1. Install Perl x64: http://www.activestate.com/activeperl/downloads/thank-you?dl=http://downloads.activestate.com/ActivePerl/releases/5.16.3.1604/ActivePerl-5.16.3.1604-MSWin32-x64-298023.msi
2. Install ImageMagick: http://www.imagemagick.org/download/binaries/ImageMagick-6.8.9-0-Q16-x64-dll.exe
    a. On select additional tasks, check Install PerlMagick for ActiveState Perl v5.16.3
    b. /bin/PerlMagick/ppm install Image-Magick.ppd
3. Install Mercurial: http://bitbucket.org/tortoisehg/files/downloads/tortoisehg-2.11.2-hg-2.9.2-x64.msi
4. Install Kakadu: http://www.kakadusoftware.com/executables/kdu733_demo_apps_for_win32_140118.msi
5. Install Perl libraries:
    cpan install Image::Magick
    cpan install Image::ExifTool	
    cpan install File::Slurp
6. Pull latest code from repository: hg clone https://kirkhess@bitbucket.org/kirkhess/hathitrustremediate