[Cle-devel] Re: [Cle-devel] 一個用awk來查詢p ydict字典檔的小程式

Chung-Yen Chang cle-devel@linux.org.tw
Fri, 22 Feb 2002 18:28:11 +0800 (CST)


edit your "/usr/X11R6/bin/pydict"
大約在500行左右找到
command = g_command + " '^" + inp + "=.*$' " + dict_path + lower(word[0])
+ '.lib'
改成
command = g_command + " '^" + inp + "=.*$' " + dict_path + lower(inp[0])
+ '.lib'

即可

On Fri, 22 Feb 2002, samuel.lu wrote:

> 請問一下我要如何加入這個patch,即patch 指令該如何下?
>
> ---------------------------------------------------------------------------------------------------------------------
> 呂俊興
> Samuel Lu
> Taipei , Taiwan
> Tel : 29998261#876
> Fax : 29998497
> samuel.lu@comtrendcorp.com
>
> On Fri, 22 Feb 2002 05:19:44 +0000 (UTC)
> ha shao <hashao@-hashao.-hypermat.-com> wrote:
>
> > In article <mailman.1014270785.32257.cle-devel@linux.org.tw>, 陳勇志
> > wrote:
> > > I've written an utility used to query the pydict dictionary files,
> > > and this little program is written in awk script.
> > > It is nice to do the query job in text mode.Just try it and have fun.
> > >
> >
> > It's nice but pydict also do console dictionary lookup. Just
> > do:
> >
> > pydict -e test
> >
> > or
> > pydict -h
> >
> > Of course my version of pydict have a bug in console English
> > lookup. Need the patch:
> >
> >
> > --- /usr/bin/pydict-real	Fri Dec  8 19:06:54 2000
> > +++ pydict-real	Fri Feb 22 13:15:47 2002
> > @@ -503,7 +503,7 @@
> >  			console_c_dict()
> >  			return
> >  		else:
> > -			command = g_command + " '^" + inp + "=.*$' " + dict_path +
> > lower(word[0]) + '.lib'
> > +			command = g_command + " '^" + inp + "=.*$' " + dict_path +
> > lower(inp[0]) + '.lib'
> >  			result_line = os.popen(command,'r').readline()
> >  			#if result_lines:
> >  			if result_line:
> > --
> > Best regard
> > hashao
> > _______________________________________________
> > Cle-devel mailing list
> > Cle-devel@linux.org.tw
> > https://www.linux.org.tw/mailman/listinfo/cle-devel
> _______________________________________________
> Cle-devel mailing list
> Cle-devel@linux.org.tw
> https://www.linux.org.tw/mailman/listinfo/cle-devel
>

-- 
                         Chung-Yen Chang (candyz@linux.org.tw)
         Chinese Linux Extension Project -- http://cle.linux.org.tw/
     Chinese Linux Documentation Project -- http://www.linux.org.tw/CLDP/
            Internationalization Project -- http://i18n.linux.org.tw/
                 X Chinese Input Project -- http://xcin.linux.org.tw/
  Software Liberty Association of Taiwan -- http://www.softwareliberty.org/