Skip to content

Commit

Permalink
better tagging of contributors: disregard “meta” manipulations descri…
Browse files Browse the repository at this point in the history
…bed as “tagging”
  • Loading branch information
grammarware committed Jan 19, 2013
1 parent db504fd commit 1bbec4d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion topics/documents/wiki/genHome.py
Expand Up @@ -16,7 +16,7 @@
,
['abridge', 'abstractize', 'addH', 'addV', 'anonymize', 'appear', 'chain', 'concretize', 'deanonymize', 'define', 'designate', 'detour', 'deyaccify', 'disappear', 'distribute', 'downgrade', 'dump', 'eliminate', 'equate', 'extract', 'factor', 'fold', 'horizontal', 'importG', 'inject', 'inline', 'introduce', 'lassoc', 'massage', 'narrow', 'permute', 'project', 'rassoc', 'redefine', 'remove', 'removeH', 'removeV', 'renameT', 'renameL', 'renameN', 'renameS', 'replace', 'undefine', 'unfold', 'unite', 'unlabel', 'upgrade', 'vertical', 'widen', 'yaccify','bypass','concatT','splitT','splitN']
,
['RetireTs', 'RetireSs', 'RetireLs', 'Enforce naming', 'Reroot2top', 'Retire top', 'SubGrammar', 'AllV', 'AllH', 'AllD', 'AllDV', 'AllDeyacc', 'Retire lazy', 'ANF|Abstract Normal Form', 'FoldG', 'Retire seplists', 'Retire iterations', 'Inline chains']
['RetireTs', 'RetireSs', 'RetireLs', 'RenameAll', 'Reroot2top', 'Retire top', 'SubGrammar', 'VerticalAll', 'HorizontalAll', 'DistributeAll', 'VerticalDistributeAll', 'AllDeyacc', 'Retire lazy', 'ANF|Abstract Normal Form', 'FoldG', 'Retire seplists', 'Retire iterations', 'UnchainAll']
]

l = len(h)
Expand Down
2 changes: 1 addition & 1 deletion topics/documents/wiki/texts
Submodule texts updated from 7c0a12 to 8da786
19 changes: 11 additions & 8 deletions topics/documents/wiki/updFiles.py
Expand Up @@ -15,24 +15,26 @@
if txt.find('@wiki')>-1:
for where in txt.split('@wiki{')[1].split('}')[0].split(','):
g = where[0].upper()+where[1:]
good = os.path.join(root, f).split('projects/slps/')[1]
if g in maps.keys():
maps[g].append(os.path.join(root, f).split('projects/slps/')[1])
maps[g].append(good)
else:
maps[g] = [os.path.join(root, f).split('projects/slps/')[1]]
maps[g] = [good]
rd.close()

# traversing command line tools
for root, dirs, filenames in os.walk('/Users/zaytsev/projects/slps/shared/tools/'):
# traversing command line tools, generators, wrappers and python repo
for root, dirs, filenames in os.walk('/Users/zaytsev/projects/slps/shared/'):
for f in filenames:
rd = open(os.path.join(root,f),'r')
txt = ''.join(rd.readlines())
if txt.find('# wiki: ')>-1:
for where in txt.split('# wiki: ')[1].split('\n')[0].split(','):
for where in txt.split('# wiki:')[1].split('\n')[0].split(','):
g = where[0].upper()+where[1:]
good = os.path.join(root, f).split('projects/slps/')[1]
if g in maps.keys():
maps[g].append(os.path.join(root, f).split('projects/slps/')[1])
maps[g].append(good)
else:
maps[g] = [os.path.join(root, f).split('projects/slps/')[1]]
maps[g] = [good]
rd.close()

for aff in maps.keys():
Expand All @@ -54,7 +56,7 @@
else:
before = lines
f.close()
print 'Yes',aff
# print 'Yes',aff
except IOError:
print 'No',aff
before = []
Expand All @@ -65,6 +67,7 @@
for link in maps[aff]:
if link not in links:
links.append(link)
print 'Added',link,'to',aff
f = open('texts/%s.md' % aff,'w')
for line in before:
f.write(line)
Expand Down
26 changes: 9 additions & 17 deletions topics/documents/wiki/updPeople.py
Expand Up @@ -75,29 +75,21 @@ def rname(x):
worked[aff] = []
for rf in maps[aff]:
print 'Checking up',rf
f = os.popen('git log --follow --pretty=format:%%an -- ~/projects/slps/%s | sort | uniq' % rf)
# f = os.popen('git log --follow --pretty=format:%%an -- ~/projects/slps/%s | sort | uniq' % rf)
f = os.popen('git log --follow --pretty=format:%%an:%%s -- ~/projects/slps/%s | grep -v tag | sed \'s/:.*//\' | sort | uniq' % rf)
for line in f.readlines():
if line.strip() not in worked[aff]:
worked[aff].append(line.strip())
f.close()
links = []
after = []
changed = False
try:
f = open('texts/%s' % aff,'r')
lines = f.readlines()
rlines = replaceSection(lines,fmt1,['* [`%s`](../blob/master/%s)\n' % (link,link) for link in maps[aff]])
rlines = replaceSection(rlines,fmt2,sorted(['* [%s (@%s)](https://github.com/%s)\n' % (rname(pers),pers,pers) for pers in worked[aff]]))
if lines != rlines:
changed = True
f.close()
print 'Yes',aff
except IOError:
rlines = replaceSection([],fmt1,['* [`%s`](../blob/master/%s)\n' % (link,link) for link in maps[aff]])
rlines = replaceSection(rlines,fmt2,sorted(['* [%s (@%s)](https://github.com/%s)\n' % (rname(pers),pers,pers) for pers in worked[aff]]))
changed = True
print 'No',aff
if changed:
f = open('texts/%s' % aff,'r')
lines = f.readlines()
rlines = replaceSection(lines,fmt1,['* [`%s`](../blob/master/%s)\n' % (link,link) for link in maps[aff]])
rlines = replaceSection(rlines,fmt2,sorted(['* [%s (@%s)](https://github.com/%s)\n' % (rname(pers),pers,pers) for pers in worked[aff]]))
f.close()
# print 'Yes',aff
if lines != rlines:
f = open('texts/%s' % aff,'w')
for line in rlines:
f.write(line)
Expand Down
1 change: 1 addition & 0 deletions topics/mutation/naming/enforce.py
@@ -1,5 +1,6 @@
#!/Library/Frameworks/Python.framework/Versions/3.1/bin/python3
# -*- coding: utf-8 -*-
# wiki: RenameAll
import os,sys
sys.path.append(os.getcwd().split('slps')[0]+'slps/shared/python')
import BGF3
Expand Down

0 comments on commit 1bbec4d

Please sign in to comment.