Revision: 4809 Author: leogregianin Date: 2008-01-05 12:46:18 +0000 (Sat, 05 Jan 2008)
Log Message: ----------- possible range with languages, p.e. -fromlang:no--zh-classical
Modified Paths: -------------- trunk/pywikipedia/featured.py
Modified: trunk/pywikipedia/featured.py =================================================================== --- trunk/pywikipedia/featured.py 2008-01-05 12:00:04 UTC (rev 4808) +++ trunk/pywikipedia/featured.py 2008-01-05 12:46:18 UTC (rev 4809) @@ -328,8 +328,9 @@ elif arg.startswith('-fromlang:'): fromlang=arg[10:].split(",") try: + # BUG: range with zh-min-nan (3 "-") if len(fromlang)==1 and fromlang[0].index("-")>=0: - ll1,ll2=fromlang[0] + ll1,ll2=fromlang[0].split("--",1) if not ll1: ll1="" if not ll2: ll2="zzzzzzz" fromlang=[ll for ll in featured_name.keys() if ll>=ll1 and ll<=ll2]