1
CRight 2014-09-14 22:59:36 +08:00 via Android
支持!Linux上这类软件太少了。
|
2
jacob 2014-09-14 23:25:10 +08:00 via iPhone
好。谢楼主
|
3
em70 2014-09-15 01:01:47 +08:00
linux厂商都在做系统本身,很少商业公司做开发工具,其实windows为啥统治桌面,不是系统本身多好,因为微软创业就是BASIC编译器起家的,最擅长为程序员服务,即使到今天VS仍然是最先进的IDE环境,社区也活跃.linux现状很难改变了,不过还有一个机会,那就是android,把这个分支发展为桌面,希望很大.
|
4
polythene 2014-09-15 01:20:34 +08:00
赞,加油!
|
5
wenLiangcan 2014-09-15 10:49:15 +08:00
试试
|
6
wenLiangcan 2014-09-15 11:00:28 +08:00
好吧,Arch 用户表示不知怎么解决依赖。。。。
|
7
lcqtdwj OP @wenLiangcan 额,对Arch不熟悉,可以打成rpm包,但是有的依赖不知道Arch有没有。希望有Arch熟悉的小伙伴能够帮忙,打个方便的包。
|
10
wenLiangcan 2014-09-15 14:36:08 +08:00
@lcqtdwj 就是那几个叫 gi 什么的依赖没有。。。
|
11
Killian 2014-09-17 22:44:19 +08:00
赞!确实需要一个简洁界面的 English Dictionary。为了学英语,我的观点是尽量用英文的解释来解释英文,所以我比较喜欢 Collins 词典。http://www.collinsdictionary.com/ 它有两个词典,一个English,一个English for learner (这里边的解释很易懂)。我现在在用python写一个抓取程序。我把大概的程序贴下,楼主觉得有用可以加到在线翻译的选项里。希望以后能在github上合作~
# -*- coding: utf-8 -*- """ Lookup word in Collins website version 0.1 """ import urllib, urllib2 import re import codecs from BeautifulSoup import BeautifulSoup def selectDic(): # which dictionary is used, 4 options datasets = ['american', 'american-cobuild-learners', 'english', 'english-cobuild-learners'] # For simplicity, 'american-cobuild-learners' for default # dic = 'american-cobuild-learners' dic = 'american' return dic def lookupWord(): # Get the lookup word # Again, for illustration, we fixed the look-up word to 'geek' word = 'world' return word def getQuery(dic, word): query = {} query['dataset'] = dic query['q'] = word return query def parsePage(content, word): soup = BeautifulSoup(content) #Find the explanation part, id name is corresponding to the lookup word idname = word + "_1" rel = soup.findAll('div', id=idname) # unicode is for phonetic symbols rel = unicode.join(u'\n',map(unicode,rel)) # There are icons for pronunciation request, for now, I deleted~~ # Hope this can be added regx = r'(<img.*/>)'; m = re.search(regx, rel) if m: rel = rel.replace(m.group(0), '') # For now, I save the result to a html to testify correctness # If it is a chrome extention, it can be shown immediately~~ head = '<html><head><title>Page title</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>' tail = '</body></html>' page = head + ''.join(rel) + tail return page def savePage(rel): f = codecs.open('dic.html','w','utf-8') f.write(rel) f.close() def queryPost(): try: baseurl = "http://www.collinsdictionary.com/search"; timeout = 10; dic = selectDic() word = lookupWord() query = getQuery(dic, word) data = urllib.urlencode(query); page = urllib2.urlopen(baseurl, data, timeout) content = page.read(); rel = parsePage(content, word) savePage(rel) except: print "Error" if __name__ == "__main__": queryPost() print "Done" |
12
Killian 2014-09-17 22:54:15 +08:00
啊,我忘了,有道是有Collins的 English for Learners 结果的 =.=
没在linux环境下,也就没看楼主软件的结果,想当然了 whatever,祝GouYong get better and better |