From XastirWiki
Jump to: navigation, search

Xastir includes the ability to take a snapshot of the currently displayed view.

Snapshots were originally created to allow putting Xastir images into web pages, updated every 5 minutes. Nowadays you can change the timing between 1 and 30 minutes for the snapshots, and using scripts you can scan images for other purposes.

You can cause a snapshot to occur by enabling Snapshot in the File menu. It takes a snapshot of the current Xastir view starting immediately when the toggle button is first enabled and thereafter at the configured interval. This means you can change views and disable/enable to take an immediate snapshot each time as well.

You can also send a "SIGUSR1" signal from another process and Xastir will take a snapshot. The feature was added so that someone could press a button on a web page and cause Xastir to make a new snapshot.

For Example, from the shell you can do:

   kill -SIGUSR1 `cat ~/.xastir/xastir.pid`

Snapshots will are stored under ~/.xastir/tmp/

xastir creates xnapshot.png, then in X minutes (depends on configure - > timing -> snapshot interval) it creates a new snapshot.png.

If you want a series of snapshots to give some sort of history, you'll have to copy snapshot.png to somewhere useful to prevent Xastir from overwriting the file every next time it does a snapshot.

Here's one way to do it. It assumes you're using bash as your shell (if you're running linux or a non-ancient OS X, you most likely are). Open a terminal window and:

   mkdir snapshots-go-here
   x=10000
   while [ 1 ]; do
       if [ -f .xastir/tmp/snapshot.png ]; then
               mv .xastir/tmp/snapshot.png snapshots-go-here/snapshot-${x}.png
               x=$(($x + 1))
       fi
       sleep 30
   done



This HowTo was partially pulled from the FAQ and from a posting by Jason kg4wsv on the Xastir mailing list. --N8ysz 14:43, 5 October 2006 (EDT)