24 October, 2008

Eclipse icons

How to extract icons from Eclipse


I've created it in few steps:

  1. Downloaded and unzipped eclipse

  2. Extracted all images from eclipse directories, subdirectories, zips and jars*

  3. Filtered only unique files*

  4. Sorted images by dimension (16x16, 24x24, 32x32, etc.)*

  5. Removed large images (that not look like icon)

  6. Created html pages (via PHP script)

* Via my shell scripts.

This is one script from this project:
#!/bin/bash

#Find and copy only unique files (with same size and checksums) from $SOURCE directory to $OUTPUT.

SOURCE=output
OUTPUT=images

rm -rf $OUTPUT
mkdir -p $OUTPUT

uniqProcess() {

echo >xqx_unique.idx
while read; do
echo -ne \\r$REPLY
echo $REPLY $(stat -c%s $REPLY)+$(md5sum $REPLY|cut -f 1 -d ' ')+$(cksum $REPLY|cut -f 1 -d ' ')>>xqx_unique.idx
done
sort -k 2 xqx_unique.idx|uniq -f 1|cut -f 1 -d ' '|xargs -I '{}' cp '{}' $OUTPUT
}

find $SOURCE -type f |uniqProcess