ubuntu下的截图脚本
-
- 帖子: 142
- 注册时间: 2005-11-05 23:18
不错!我照着http://forum.ubuntu.org.cn/viewtopic.php?t=2234&highlight=写了一个图形化的脚本:
分享!
代码: 全选
#!/bin/bash
UI="zenity --title="抓图工具""
ERROR_FILE="/tmp/screen_shot_error_message.txt"
SLEEP=`$UI --entry --text="请输入抓图前要延时的秒数:" \
--entry-text="4"`
if [ -z $SLEEP ];then
exit;
fi
FILE=`$UI --file-selection --title="选择需要保存抓图文件的位置" --save --filename="/tmp/screenshot.png"`
if [ -z $FILE ]; then
exit;
fi
sleep $SLEEP
#清空错误文件
echo > $ERROR_FILE
RESULT=`import "$FILE" 2> $ERROR_FILE`
if [ -s $ERROR_FILE ]; then
$UI --title="抓图失败!详细错误信息如下:" --text-info --filename=$ERROR_FILE --width="500"
else
$UI --info --text="抓图成功!文件保存在$FILE。"
fi
- Element
- 帖子: 3537
- 注册时间: 2005-09-10 16:04
- 来自: DG-GD-China
HOHO~~
好玩,以后就可以任意抓图了,不用print screen了。
好玩,以后就可以任意抓图了,不用print screen了。
囧 http://element.blog.ubuntu.org.cn/
Ubuntu Jaunty Jackalope...
AMD Barton 2600+
MSI K7N2 Delta-L
Kingston DDR400 512M*2+256M*1
nVidia FX5200
Seagate 80G(Jaunty Jackalope)
Seagate 160G(XXxxXX)
SyncMaster 732N
Ubuntu Jaunty Jackalope...
AMD Barton 2600+
MSI K7N2 Delta-L
Kingston DDR400 512M*2+256M*1
nVidia FX5200
Seagate 80G(Jaunty Jackalope)
Seagate 160G(XXxxXX)
SyncMaster 732N
-
- 帖子: 1
- 注册时间: 2006-10-18 0:45
-
- 帖子: 29
- 注册时间: 2007-10-31 20:47
Re: ubuntu下的截图脚本
如果再加上一个右键取消功能就好了
- qq274980
- 帖子: 69
- 注册时间: 2009-04-09 9:16
Re: ubuntu下的截图脚本
compiz 里面有一个“截屏” 插件,使用方法与这个基本一样,我一直用 

- 我就是我2
- 帖子: 1215
- 注册时间: 2008-12-13 10:55
- 来自: the Earth
- 联系:
Re: ubuntu下的截图脚本
好东西,收藏了。 

苏东坡问佛印道:“人人皆念观世音菩萨,观世音菩萨念谁?”
佛印答道:“念观世音菩萨。”
苏东坡诧异:“为何亦念观世音菩萨?”
曰:“求人不如求己。”
自然灋則
dropbox 誰好奇,誰來點
勞碌一生又如何,虛度一生又如何,你過得開心嗎?人活著就要開心嘛!
佛印答道:“念观世音菩萨。”
苏东坡诧异:“为何亦念观世音菩萨?”
曰:“求人不如求己。”
自然灋則
dropbox 誰好奇,誰來點
勞碌一生又如何,虛度一生又如何,你過得開心嗎?人活著就要開心嘛!
- qq274980
- 帖子: 69
- 注册时间: 2009-04-09 9:16
Re: ubuntu下的截图脚本
诶,半夜被挖坟的邮件吵醒了, 

- O_O_BOT
- 帖子: 2461
- 注册时间: 2009-05-20 19:32
Re: ubuntu下的截图脚本
代码: 全选
#!/usr/bin/perl -w
#usage pasteub file1 file2 .. .. (all you file paste as code)
#usage pasteub -s file1 -co str -c type -p name .. .. (file1 paste as screenshot, str paste as code)
use strict;
use WWW::Mechanize;
use Getopt::Long;
my $pastebin_url = "http://paste.ubuntu.org.cn";
my %f = (
code2 => '',
screenshot => '',
class => 'actionscript',
poster => 'test'
);
GetOptions ( \%f,
"code2=s",
"screenshot=s",
"class=s",
"poster=s"
) || die $!;
my $mech = WWW::Mechanize->new();
$mech->get($pastebin_url);
die $! unless ($mech->success());
unless ($f{code2} || $f{screenshot}) {
$f{code2} = join "", <>;
}
$mech->form_name('editor');
$mech->set_fields(%f);
$mech->submit_form( button => 'paste');
die unless ($mech->success);
my $paste = $mech->uri();
print $paste . "\n";
system "echo -n $paste | xsel -i";
system "echo $paste >>./history";
system "beep -f 1000 -n -f 2000 -n -f 1500";
system "notify-send \"Paste OK\" \"URL in you clip\"";
exec "firefox $paste ";
paste 的贴图脚本
代码: 全选
#!/bin/bash
cd ~/screenshot/
beep -r 1 -f 2345
if [ $1 -eq 0 ] ; then
scrot -sb `date +%Y-%m-%d-%H-%M-%S`.png
elif [ $1 -eq 1 ] ; then
#scrot -sb `date +%Y-%m-%d-%H-%M-%S`.png -e 'upimage $f'
scrot -sb `date +%Y-%m-%d-%H-%M-%S`.png -e 'pasteub -s $f -p "me" '
elif [ $1 -eq 2 ] ; then
xsel -o | pasteub -p "me"
iif [ $1 -eq 3 ] ; then
scrot -sb `date +%Y-%m-%d-%H-%M-%S`.png -e 'pasteub -s $f -p "me" -co "`xsel -o`"'
fi
irc 聊天室
ubuntu-cn 的irc 频道为
irc.ubuntu.com 8001 #ubuntu-cn
UTF8编码 可用 irssi xchat pidgin weechat 登录
http://webchat.freenode.net/?channels=ubuntu-cn
[url]irc://irc.freenode.net/ubuntu-cn[/url]
ubuntu-cn 的irc 频道为
irc.ubuntu.com 8001 #ubuntu-cn
UTF8编码 可用 irssi xchat pidgin weechat 登录
http://webchat.freenode.net/?channels=ubuntu-cn
[url]irc://irc.freenode.net/ubuntu-cn[/url]
- 543082593
- 帖子: 234
- 注册时间: 2008-11-07 8:41
Re: ubuntu下的截图脚本
太强了 哈哈 不错 

fall again
smooth criminal
they don't care about us
billie jean
beat it
dangerous
the lost children
childhood
ben
i will be there
speechless
she is out of my life
rock with you
...
LOVE U FOREVER
smooth criminal
they don't care about us
billie jean
beat it
dangerous
the lost children
childhood
ben
i will be there
speechless
she is out of my life
rock with you
...
LOVE U FOREVER
-
- 帖子: 627
- 注册时间: 2008-11-08 18:34