Pythontr

husonet | Tarih: 19.10.2013

Ekran görüntüsünü alıp browser (web) üzerinden yayınlama

Python un SimpleHTTPServer ekran görüntüsünü alıp yayınlayan betik.

Gerekli Paketler
aptitude install scrot


vim /bin/ekran_goruntusu.sh
#!/bin/bash

mkdir -p /tmp/screenshot
scrot /tmp/screenshot/screenshot.png
echo '<html><head><title>anlık ekran goruntusu</title></head><body><img src="screenshot.png" /></body></html>' > /tmp/screenshot/index.html

x-terminal-emulator -vb +sb -fg NavajoWhite1 -bg black -cr yellow \
-fn "-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1" \
-T "Capture Screen" -e /bin/bash -c \
"/sbin/ifconfig eth | grep 'inet addr:' | cut -d: -f2 | cut -d' ' -f1; \
echo -e '

'; \
cd /tmp/screenshot && python -m SimpleHTTPServer 9999"



Openbox kısayol ekleme
         <keybind key="W-c">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Capture Screen</name>
</startupnotify>
<command>~/bin/ekran_goruntusu.sh</command>
</action>
</keybind>