Changes between Version 41 and Version 42 of u/madams


Ignore:
Timestamp:
06/02/15 14:23:55 (10 years ago)
Author:
madams
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/madams

    v41 v42  
    3939= Scripts =
    4040
     41[[CollapsibleStart(Image Compressor (bash))]]
     42
     43* Utilizes ghost script.
     44* Takes an image and compresses it. Good for larger vector images.
     45* [https://barmaidsamass.wordpress.com/2015/03/26/bash-script-w-gs-compressing-pdfs/ Wrote a blog post on it for shits and giggles].
     46
     47{{{
     48#!/bin/bash                                                                                                                       
     49#Script compressor.sh                                                                                                             
     50
     51files=$@
     52
     53if [ "$files" == "" ];
     54then
     55    echo "Error: No files specified, dude."
     56    exit
     57fi
     58
     59for i in $files;
     60do
     61    echo \"$i\"
     62    gs \
     63        -o "${i%.pdf}-comp.pdf" \
     64        -sDEVICE=pdfwrite \
     65        -dColorConversionStrategy=/LeaveColorUnchanged \
     66        -dColorsampleMonoImages=false \
     67        -dColorsampleGrayImages=false \
     68        -dColorsampleColorImages=false \
     69        -dAutoFilterColorImages=false \
     70        -dAutoFilterGrayImages=false \
     71        -dColorImageFilter=/FlateEncode \
     72        -dGrayImageFilter=/FlateEncode \
     73        "${i}"
     74done
     75}}}
     76[[CollapsibleEnd]]
     77
     78
    4179[[CollapsibleStart(Name Changer (python))]]
     80
     81* For post processing elements (in particular column density maps).
     82* Changes the name of the file easily so you don't have to do funky visualization stuff in visit.
     83
    4284{{{
    4385import os
     
    5698
    5799[[CollapsibleStart(.okc to .csv Converter (python))]]
     100
     101* Reads in .okc files, converts the data in the .okc to proper units, spits out a .csv so you can import the data into excel.
     102
    58103{{{
    59104#!/usr/bin/env python