firefox自动程序关联
发表于 : 2009-09-10 0:06
响应pythonist的号召,为ubuntu自由世界人们谋福利.
我连夜赶出一个python script来实现firefox的自动关联
我提供的是一个module,可以作general usage.
在(http://forum.ubuntu.com.cn/viewtopic.php?f=74&t=225502)帖子里面, 我写了一个简单的cli (install.py),用来设置firefox和网络电视程序关联.
script 使用
import auto_firefox_association as auto
auto.autoAssociate(added,EXT_PRO,profile="Profile0",fox="firefox")
added is a list of protocols, eg. ['pps','tvod']
EXT_PRO is external program which will be associated to the list of protocols, with full path. eg. /home/xxx/pps-mplayer/mypps
profile is the profile name firefox used, if you don't know it, use the default
fox is the firefox name with verison, eg. firefox-3.5, firefox-3.6
old prefs.js and mimeTypes.rdf will be automatically saved.
希望这个script可以省去大家的时间.
some废话(忙人免看):
自打,09-08-27注册到这个bbs以来,我这个新手感觉无比开心,有找到组织的感觉.感觉这里的朋友很热情,很喜欢这里的氛围.
我是一个geek+nerd,很孤僻又不想孤僻.到这个论坛后,我终于感到不孤独了.哈哈. 很希望和各位交朋友,交流技术.请大家多多关照.
我连夜赶出一个python script来实现firefox的自动关联
我提供的是一个module,可以作general usage.
在(http://forum.ubuntu.com.cn/viewtopic.php?f=74&t=225502)帖子里面, 我写了一个简单的cli (install.py),用来设置firefox和网络电视程序关联.
script 使用
import auto_firefox_association as auto
auto.autoAssociate(added,EXT_PRO,profile="Profile0",fox="firefox")
added is a list of protocols, eg. ['pps','tvod']
EXT_PRO is external program which will be associated to the list of protocols, with full path. eg. /home/xxx/pps-mplayer/mypps
profile is the profile name firefox used, if you don't know it, use the default
fox is the firefox name with verison, eg. firefox-3.5, firefox-3.6
old prefs.js and mimeTypes.rdf will be automatically saved.
希望这个script可以省去大家的时间.
some废话(忙人免看):
自打,09-08-27注册到这个bbs以来,我这个新手感觉无比开心,有找到组织的感觉.感觉这里的朋友很热情,很喜欢这里的氛围.
我是一个geek+nerd,很孤僻又不想孤僻.到这个论坛后,我终于感到不孤独了.哈哈. 很希望和各位交朋友,交流技术.请大家多多关照.