Skip to content

Commit

Permalink
a bug with duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
grammarware committed Jul 28, 2012
1 parent f155137 commit 669cd35
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lists.py
Expand Up @@ -22,7 +22,7 @@
names[n] = content.split("* Перевод: '''")[1].split("'''")[0]
for link in content.split('[[')[1:]:
link = link.split(']]')[0].split('|')[0]
if link not in refd:
if link.replace(' ','-') not in refd:
refd.append(link.replace(' ','-'))
f.close()
refd.sort()
Expand All @@ -42,9 +42,13 @@
f = open('%s.wiki' % namelist(status),'w')
if b:
f.writelines(b)
b = []
for n in found:
if sts[n] == status:
f.write("* '''[[%s]]''': [[%s|%s]]\n" % (n,n,names[n]))
b.append("* '''[[%s]]''': [[%s|%s]]\n" % (n,n,names[n]))
if b:
b.sort()
f.writelines(b)
f.write("--''Список обновлён %s''" % date)
f.close()
print 'Done, %i conferences to write.' % cx

0 comments on commit 669cd35

Please sign in to comment.