25 June 2012

Script for spell checking of pdfs.

In one shot
# pdftotext -raw -nopgbrk file.pdf - | aspell list | sort | uniq -c


Or exporting to txt first and then using the spell checker.
# pdftotext -raw -nopgbrk file.pdf file.txt
# aspell list < file.txt | sort | uniq -c

13 June 2012

Taking snapshots programmatically of specific sections/windows.

[In Linux]

Identify the window with xwininfo
For the whole screen you can just specify 'root'.

Take a shot like

import -window "your window name" file.png


Open it in kolourpaint and select the section you want to capture. On
the botom of Kolourpaint you should see something like
x0,y0- xN,yN WxL

Now you can do

import -window "your window" -crop WxL+x0+y0 file.png


If you are going to take many, you want them sorted (just an idea)

import -window "your window" -crop WxL+x0+y0 shot-`date
"+%Y-%m-%d_%H:%M:%S"`.png


To create them periodically you just need to use the command watch


keywords: specific duration delay screenshots script
Too Cool for Internet Explorer