分页: 2 / 3

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-01 10:43
Steve Jobs
对不去irc的来说一点用都没 :em03

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-01 10:49
eexpress
那IM难道你也不用啊。
反正有人用。 lol

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-01 10:50
Steve Jobs
im基本废弃了,扣扣一星期不上2次

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-01 11:21
nmsfan
eexpress 写了:这都干嘛呢。贴图,irc经常用的啊。

截图贴图组合用。文件管理器右键贴图。方便嘛。
这个还真是
聊天没有贴图+这个贴图工具,不错。
用的到的时候再来找.........

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-01 14:18
Methuselar
还是Python KISS...

代码: 全选

#!usr/bin/python
# 打开
with open(__import__("sys").stdin.read(), "r+b") as fi: content = __import__("base64").b64encode(fi.read()); 
# 上传
fw = __import__("urllib2").urlopen("http://api.imgur.com/2/upload", __import__("urllib").urlencode({"key" : "XXX", "image" : content,})); 
# 输出
print (__import__("re").search("\<original\>(.*)\<\/original\>", fw.read())).group(1); fw.close();


Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-01 14:23
eexpress
带api帐号的,谈不上KISS了吧。

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-02 15:15
fanhe
楼主啊
软件没个使用说明, 叫别人怎么用啊

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-02 15:19
eexpress
没写说明。pl的,都是内部带帮助的搞法。我也还没用POD。

nautilus的图片,右键菜单有2个项目。

cli下,也可以带参数,随便测试。gui的,基本一看就明白。
● pasteimg.pl -h
NAME
paste-img - Paste image to serval web hosts

SYNOPSIS
paste-img [OPTION]... [IMAGE_FILE]...

OPTION

-s, --select
Select web host name. Can use short name as key word, such as "kimag" could refer to "kimag.es". All avoid host names can be list by using "-l".

-l, --list
List all hosts name avoid.

-h, --help
This help.

-n, --name
Nick name send to web host if support. default name is your login id name.

AUTHOR
Written by eexpress ([email protected]).

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-02 17:17
c43035
photor 写了:
nmsfan 写了:贴图哦
不知道有啥用
:em06 :em06

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-11 22:00
ChenFengyuan
重写吧,改来改去就这样咯。。。。 :em05 :em05 :em05 :em05

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-16 1:18
eexpress
灭cfy去。 lol

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-16 22:18
eexpress

代码: 全选

● diff pasteimg.pl deb/usr/bin/pasteimg.pl 
40,42d39
< use Net::DBus; 
< $bus = Net::DBus->session->get_service('org.freedesktop.Notifications')
< ->get_object('/org/freedesktop/Notifications','org.freedesktop.Notifications');
46d42
< 	$bus->Notify("paste-img", 0, "info", "准备截图", "光标改变后,使用鼠标截图。。。", [], { }, -1);
51a48,50
> use Net::DBus; 
> $bus = Net::DBus->session->get_service('org.freedesktop.Notifications')
> ->get_object('/org/freedesktop/Notifications','org.freedesktop.Notifications');

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-16 23:19
ChenFengyuan
eexpress 写了:

代码: 全选

● diff pasteimg.pl deb/usr/bin/pasteimg.pl 
40,42d39
< use Net::DBus; 
< $bus = Net::DBus->session->get_service('org.freedesktop.Notifications')
< ->get_object('/org/freedesktop/Notifications','org.freedesktop.Notifications');
46d42
< 	$bus->Notify("paste-img", 0, "info", "准备截图", "光标改变后,使用鼠标截图。。。", [], { }, -1);
51a48,50
> use Net::DBus; 
> $bus = Net::DBus->session->get_service('org.freedesktop.Notifications')
> ->get_object('/org/freedesktop/Notifications','org.freedesktop.Notifications');
还是重写吧 :em05
ps: 我只能用其中之一....ee的deb依赖没写好啊.......

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-18 8:48
ChenFengyuan
求只截图不上传的参数!!!! :em11

Re: 将 paste-img 改得更加 KISS

发表于 : 2011-07-18 8:53
ChenFengyuan
ChenFengyuan 写了:求只截图不上传的参数!!!! :em11
哎,算了.我alias了
alias ss='/usr/bin/import -frame /dev/shm/screen-shot.jpg && opera /dev/shm/screen-shot.jpg'