Warning: this is a htmlized version!
The original is across this link.
#######
#
# E-scripts on Gimp.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/a/e/gimp.e>
#           or at <http://angg.twu.net/e/gimp.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/a/.emacs[.html]>,
#                 <http://angg.twu.net/a/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######



######
#
# Gimp
#
######

pdsc /debian/main/source/graphics/gimp_1.0.0-1.dsc
cd /usr/src/gimp-1.0.0/
find * -name '*\.[ch]' > .files.ch
etags $(<.files.ch)
glimpseindex -H . -F < .files.ch

# (find-fline "/debian/main/source/graphics/")
# (find-fline "/debian/main/source/graphics/gimp-data-extras_0.99a.orig.tar.gz")



######
#
# Gimp: installing the binaries
#
######

# (find-fline "/var/lib/dpkg/info/type1inst.list")
cd ~/HASH/
dpkg -iE type1inst freetype1 xmbdfed xfstt

# (find-fline "/var/lib/dpkg/info/gimp.list")
# (find-fline "/usr/share/gimp/scripts/")
# (find-fline "/usr/share/gimp/scripts/egg.scm")
# (find-fline "/usr/share/gimp/scripts/web-browser.scm")
# (find-fline "/usr/doc/gimp/")



######
#
# Gimp: plugin-doc
#
######

rm -Rv /usr/src/plugin-doc/
mkdir /usr/src/plugin-doc/
cd /usr/src/plugin-doc/
tar -xvzf /snarf/http/www.oberlin.edu/~kturner/gimp/doc/plugin-doc.tgz
lynx index.html



######
#
# Gimp: script-fu tutorial
#
######

rm -Rv /usr/src/script-fu-tutorial/
cd /usr/src/
tar -xvzf /snarf/http/www.soulfry.com/script-fu-tutorial/script-fu-tutorial.tar.gz
cd /usr/src/script-fu-tutorial/
edrxnetscape /usr/src/script-fu-tutorial/index.html

lynx /usr/src/script-fu-tutorial/lesson4.html
# (find-fline "/usr/src/script-fu-tutorial/scripts/")



#######
#
# Gimp: my first script-fu's
#
#######

# (find-gimpfile "plug-ins/gee/gee.c" "plug_in_the_egg")
# (find-gimpfile "app/batch.c")
# (find-gimpfile "app/interface.c" 118)
# (find-gimpfile "app/menus.c")

lynx /snarf/http/www.rru.com/~meo/gimp/faq-user.html
lynx /snarf/http/www.rru.com/~meo/gimp/faq-dev.html

l /snarf/http/www.gimp.org/~adrian/scripts/test.scm
l /snarf/http/www.rru.com/~meo/gimp/rand-noted.c

# (find-gimpfile "plug-ins/script-fu/")
# (find-gimpfile "plug-ins/script-fu/script-fu-console.c")
# (find-gimpfile "plug-ins/script-fu/script-fu.c" "extension_script_fu_console")
# (find-gimptag "gimp_install_procedure")
# (find-gimpfile "app/")
# (find-gimpfile "app/fileops.c")
# (find-gimpfile "plug-ins/jpeg/jpeg.c")

gglimpse gimp_install_procedure
gglimpse procedural_db_register




######
#
# siod
#
######

# (find-fline "/snarf/ftp/ftp.std.com/pub/gjc/siod.tar.gz")




######
#
# gimp: batch mode
#
######

man gimp
gimp -n --no-data --no-splash -b 
gimp --no-splash
gimp --no-splash --console-messages
gimp --no-splash --debug-handlers

lynx /snarf/http/adrian.gimp.org/batch/index.html

gimp -n -b '(let () (script-fu-mono3 30 60 200 100 150) (gimp-quit 0))'

# Como é que eu faço "progn" em Scheme?




######
#
# gimp-tcl
#
######

psne http://rrnet.com/~erich/gimp/gimptcl/index.html
gimp -b '(gimp-procedural-db-dump "/home/root/ogimp2")'

tar -tvzf /snarf/http/rrnet.com/~erich/gimp/gimptcl/gimptcl.tar.gz

rm -Rv /usr/src/gimptcl
mkdir  /usr/src/gimptcl
cd     /usr/src/gimptcl
tar -xvzf /snarf/http/rrnet.com/~erich/gimp/gimptcl/gimptcl.tar.gz
mv -iv gimp-0.99.14/plug-ins/gimptcl/* .
rm -Rv gimp-0.99.14

# (find-fline "/usr/src/gimptcl/")




#######
#
# glib/gtk+ 1.1.12 (with some workarounds)
#
#######

psne $FDEBIAN/dists/potato/main/source/libs/gtk+1.1.12_1.1.12-1.diff.gz
psne $FDEBIAN/dists/potato/main/source/libs/gtk+1.1.12_1.1.12-1.dsc
psne $FDEBIAN/dists/potato/main/source/libs/gtk+1.1.12_1.1.12.orig.tar.gz

psne $FDEBIAN/dists/potato/main/source/libs/glib1.1.12_1.1.12-1.diff.gz
psne $FDEBIAN/dists/potato/main/source/libs/glib1.1.12_1.1.12-1.dsc
psne $FDEBIAN/dists/potato/main/source/libs/glib1.1.12_1.1.12.orig.tar.gz

# (find-glibfile "debian/rules")
# (find-glibfile "odrb")
# (find-fline "/usr/bin/dh_movefiles")
# (find-fline "/var/lib/dpkg/info/debmake.list")
# (find-fline "/var/lib/dpkg/info/debhelper.list")



pdsc $SDEBIAN/dists/potato/main/source/libs/glib1.1.12_1.1.12-1.dsc
# debian/rules binary				|& tee odrb
debian/rules build install libglib1.1.12-dev	|& tee odrb
dpkg --contents ../libglib1.1.12-dev_1.1.12-1_i386.deb


make install		|& tee omi
dpkg -i /usr/src/libglib1.1.12_1.1.12-1_i386.deb
dpkg -i /usr/src/libglib1.1.12-dev_1.1.12-1_i386.deb

make install		|& tee omi

pdsc $SDEBIAN/dists/potato/main/source/libs/gtk+1.1.12_1.1.12-1.dsc
# debian/rules binary	|& tee odrb
# libgtk1.1.12-doc is ok, and I don't want libgtk1.1.12-dbg, so:
debian/rules build install libgtk1.1.12 libgtk1.1.12-dev \
			|& tee odrb

make install		|& tee omi

A_LONG=(
libglib1.1.12-dev_1.1.12-1_i386.deb
libglib1.1.12_1.1.12-1_i386.deb
libgtk1.1.12-dev_1.1.12-1_i386.deb
libgtk1.1.12-doc_1.1.12-1_all.deb
libgtk1.1.12_1.1.12-1_i386.deb
)

A=(
libglib1.1.12-dev
libglib1.1.12
libgtk1.1.12-dev
libgtk1.1.12-doc
libgtk1.1.12
)





# (code-c-d "glib" "/usr/src/glib1.1.12-1.1.12/")
# (code-c-d "gtk+" "/usr/src/gtk+1.1.12-1.1.12/")
# (find-glibfile "")
# (find-gtk+file "")

# (find-gtk+file "debian/rules" "\nbinary:")
# (find-gtk+file "debian/rules" "\nbinary-arch:")

# (find-glibfile "")

# (find-gtk+file "Makefile")
# (find-gtk+file "Makefile" "\ninstall:")
# (find-gtk+file "Makefile")
# (find-gtk+file "Makefile")

# (find-gtk+file "odrb")
# (find-gtk+file "po/Makefile")
# (find-gtk+file "po/Makefile.in")
# (find-gtk+file "po/Makefile.in.in" 54)

Precisa do gettext.

# (find-fline "/usr/src/glib1.1.12-1.1.12/")
# (find-fline "/usr/src/glib1.1.12-1.1.12/glib-config")
dpkg --contents /usr/src/libglib1.1.6_1.1.6-1_i386.deb
dpkg --contents /usr/src/libglib1.1.6-dev_1.1.6-1_i386.deb
dpkg --contents	/usr/src/libglib1.1.12_1.1.12-1_i386.deb
dpkg --contents	/usr/src/libglib1.1.12-dev_1.1.12-1_i386.deb

pdsc $SDEBIAN/dists/potato/main/source/libs/gtk+1.1.12_1.1.12-1.dsc
debian/rules binary	|& tee odrb

dpkg --purge libglib-dev
dpkg --purge libglib1.1.6-dev
dpkg --purge libglib1.1.6
dpkg --purge libgtk1.1.6-dev
dpkg --purge libgtk1.1.6
dpkg --purge libglib1.1.12-dev
dpkg --purge libglib1.1.12
dpkg --purge libgtk1.1.12-dev
dpkg --purge libgtk1.1.12

dpkg -L libglib1.1.12-dev

pdsc /snarf/ftp/ftp.eecs.umich.edu/pub/linux/debian/dists/potato/main/source/libs/gtk+1.1.12_1.1.12-1.dsc
debian/rules |& tee odrb





#######
#
# gimp 1.1.0 (hamm)
#
#######

pdsc $SDEBIAN/dists/potato/main/source/graphics/gimp1.1_1.1.0-1.dsc
cd /usr/src/gimp1.1-1.1.0/
debian/rules binary	|& tee odrb

dpkg -i	/usr/src/gimp1.1-nonfree_1.1.0-1_i386.deb	\
	/usr/src/gimp1.1_1.1.0-1_i386.deb		\
	/usr/src/libgimp1.1.0-dev_1.1.0-1_i386.deb	\
	/usr/src/libgimp1.1.0_1.1.0-1_i386.deb



configure: warning: *** AA plug-in will not be built (AA library not found) ***
checking for TIFFReadScanline in -ltiff... no
checking for TIFFWriteScanline in -ltiff... no
checking for TIFFFlushData in -ltiff34... no
configure: warning: *** TIFF plug-in will not be built (TIFF library not found)
***
checking for jpeg_destroy_decompress in -ljpeg... no
configure: warning: *** JPEG plug-in will not be built (JPEG library not found)
***
checking for png_read_info in -lpng... no
configure: warning: *** PNG plug-in will not be built (PNG library not found) ***
configure: warning: *** PNG plug-in will not be built (PNG header file not found) ***
checking for GetMPEGFrame in -lmpeg... no
configure: warning: *** MPEG plug-in will not be built (MPEG library not found)
***
checking for xd_checkin in -lxdelta... no
checking for xd_checkout in -lxdelta... no
configure: warning: *** XD plug-in will not be built (XDELTA library not found)
***



######
#
# Gimp 1.1.1
#
######

    7332 dists/potato/main/source/graphics/gimp1.1_1.1.0-1.diff.gz
     582 dists/potato/main/source/graphics/gimp1.1_1.1.0-1.dsc
 4902922 dists/potato/main/source/graphics/gimp1.1_1.1.0.orig.tar.gz

psne $FDEBIAN/dists/potato/main/source/graphics/gimp1.1_1.1.0-1.diff.gz
psne $FDEBIAN/dists/potato/main/source/graphics/gimp1.1_1.1.0-1.dsc
psne $FDEBIAN/dists/potato/main/source/graphics/gimp1.1_1.1.0.orig.tar.gz

cd $SDEBIAN/dists/potato/main/source/graphics/



pdsc $SDEBIAN/dists/potato/main/source/graphics/gimp1.1_1.1.0-1.dsc
cd /usr/src/gimp1.1-1.1.0/

# O default do 1.1 é compilar com -g; eu não quero isso.
# (find-fline "/usr/src/gimp1.1-1.1.0/debian/rules" "build-stamp:")
# (find-fline "/usr/src/gimp1.1-1.1.0/Makefile" "CFLAGS")
#
dh_testdir			|& tee odt
./configure --prefix=/usr	|& tee oc
make CFLAGS='-O2 -Wall'		|& tee om
touch build-stamp

debian/rules binary		|& tee odrb
# (find-fline "/usr/src/gimp1.1-1.1.0/odrb")

cd /usr/src/
laf *gimp*deb
mv -iv *gimp*deb .debs






# (find-fline "/usr/src/gimp1.1-1.1.0/debian/rules")

# (find-zshnode "Jobs & Signals")

cd /home/root/.gimp-1.1/
sort menurc

# (find-fline "/home/root/.gimp-1.1/menurc")

# (find-fline "/usr/doc/gimp1.1/")

zcat /usr/doc/gimp1.1/Wilber.xcf.gz > ~/GIMP/Wilber.xcf






A=(
aalib-bin
aalib1
aalib1-dev
libjpeg6a
libjpegg-dev
libjpegg6a
libmpeg-dev
libmpeg-doc
libmpeg1
libtiff-tools
libtiff3g
libtiff3g-dev
)
cd ~/HASH/
dpkg -iE $A



#####
#
# menus
#
#####

cd ~/.gimp-1.1/
cat menurc |
  perl -nle 'm/"(.*)" "(.*)"/ && print "$1\t\t$2"' |
  sort > ~/o

# (find-fline "~/o")



#####
#
# imagemagick
#
#####

# (find-vldifile "imagemagick.list")
# (find-fline "/usr/doc/imagemagick/")

# (eeman "ImageMagick")



cd /hdd3/scans/
mogrify -quality 50 -format jpeg [a-z]*.tif
mkdir fullq50
mv -v *.jpeg fullq50

cd /hdd3/scans/
mogrify -quality 75 -geometry 50% -format jpeg [a-z]*.tif
mkdir halfq75
mv -v *.jpeg halfq75



mogrify -geometry 30% -quality 50 -format jpeg - < entrada9.tif > entrada9.tn.jpg



function mog () {
  mogrify -quality 50