Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Xchat screenshot script, made from 100% pure boredom< Next Oldest | Next Newest >
undertow Offline





Group: Members
Posts: 48
Joined: Mar. 2005
Posted: Mar. 06 2005,08:42 QUOTE

So here's a little Xchat plug i couldnt help but make.  It requires that you have imagemagick and lynx both installed to use it, and is kind of a mess since Im fairly new to scripting and Xchat.  Im sure someone could take the idea and spin it into a nice, clean perl plugin for xchat (and not the bash script that it is) with a little more knowledge than i have.  any how:
The jist: type /snapshot in a channel, and it takes a full screenshot, saves it to /opt/monkey/htdocs, starts the server, gets your IP from whatismyip.com, posts it to the channel.  Then, it waits 5 minutes and shuts the server down.
Youll need to edit /opt/monkey/htdocs/index.html to contain a link to the .jpg of course.
Here's /usr/bin/snapshot:
(remember to chmod x it if you copy)
---start---

#!/bin/bash
sudo /opt/imagemagick/bin/import -w root /opt/monkey/htdocs/myscreen.jpg
sudo chmod a+rx /opt/monkey/htdocs/myscreen.jpg
sudo /opt/monkey/bin/banana start  > /dev/null

echo   "  ---Screenshot"

sleep 5m

sudo killall -9 monkey

echo "Screenshot Server Killed."

----end-----

Youll need to open up Xchat, and under Settings > User Commands...
add a new command, like so:

SNAPSHOT           /exec -o snapshot &  lynx -source whatismyip.com | perl -ne '/Your ip is ([\d.]+) /  and print($1), exit'

thanks to a friend, Katie, for the perl part!
Back to top
Profile PM 
0 replies since Mar. 06 2005,08:42 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Xchat screenshot script

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code