You are not logged in.

#1 2006-06-03 15:35:38

twiistedkaos
Member
Registered: 2006-05-20
Posts: 666

Hardcore Scrot(ing)

Alright, so I am trying to accomplish this with scrot:

1.) take a screenshot and make a thumbnail from it
2.) make a directory with the same filename, then move the contents their.

Thisb is what I have sofar:

scrot '/home/josh/screenshot/%Y-%m-%d-%H:%M:%S.png' -e 'mkdir $f_scrot & mv $f $f_scrot'

That right there takes a screenshot, makes a folder, then moves the screenshot to the folder. But I can't figure out how to do the same with thumbnails. I've tried multiple different things and none will work. Any help please? Yes, I am making scrot more complex then it really is tongue

Edit
For anyone who doesn't know, scrot has it's own thumbnail option:

--thumb 20%

Offline

#2 2006-06-03 16:50:25

Sigi
Member
From: Thurgau, Switzerland
Registered: 2005-09-22
Posts: 1,121

Re: Hardcore Scrot(ing)

I wrote a little script to do this job without scrot (this one runs if I press my PrintScreen-Button):

#!/bin/bash
cd ~/screenshots
name=screenshot_"$(date +%d_%m_%y_%T)"
import -windows root "$name".png
convert -thumbnail 16% "$name".png "$name"_thumb.png

Is scrot better in performing such tasks?

Cheers Sigi


Dammit, haven't been here in a while. Still rocking Arch. smile

Offline

#3 2006-06-03 17:25:06

twiistedkaos
Member
Registered: 2006-05-20
Posts: 666

Re: Hardcore Scrot(ing)

Sigi wrote:

I wrote a little script to do this job without scrot (this one runs if I press my PrintScreen-Button):

#!/bin/bash
cd ~/screenshots
name=screenshot_"$(date +%d_%m_%y_%T)"
import -windows root "$name".png
convert -thumbnail 16% "$name".png "$name"_thumb.png

Is scrot better in performing such tasks?

Cheers Sigi

Thanks for the script, and no, both import and scrot will dot he same task with the same effectivness. I was just use to scrot tongue

Well, your script gave me an idea, so I careated my own wink

#!/bin/bash
#Since scrot is gay, and doesn't work the way I want it to
#I'll force it to work the way I want it to :P
name="$(date +%d-%m-%y_%I:%M:%S)" 
sdir=$HOME"/screenshots/"
png=$sdir$name'.png'
scrot $png --thumb 20%
mkdir $sdir$name
mv $png $sdir$name
mv $sdir$name"-thumb.png" $sdir$name

Offline

Board footer

Powered by FluxBB