mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Remove unneeded scripts
This commit is contained in:
parent
93b31af2d3
commit
d0009cd38a
@ -1,64 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
def get_all_paths(root):
|
||||
path = os.path.join(root, "addons")
|
||||
fpaths = []
|
||||
for f in os.listdir(path):
|
||||
fpath = os.path.join(path, f, "README.md")
|
||||
if not os.path.exists(fpath):
|
||||
fpaths.append(fpath)
|
||||
return fpaths
|
||||
|
||||
def add_readme(path):
|
||||
name = os.path.split(os.path.dirname(path))[-1]
|
||||
name = "ace_"+name
|
||||
print("\n# COMPONENT: {}".format(name))
|
||||
|
||||
description = input("Desc: ")
|
||||
|
||||
maintainers = [
|
||||
"KoffeinFlummi",
|
||||
"commy2",
|
||||
"esteldunedain",
|
||||
"CorruptedHeart",
|
||||
"PabstMirror",
|
||||
"bux578",
|
||||
"Glowbal",
|
||||
"walterpearce",
|
||||
"NouberNou"
|
||||
]
|
||||
for (i, m) in enumerate(maintainers):
|
||||
print("({}) {}".format(i, m), end="")
|
||||
if i+1 < len(maintainers):
|
||||
print(", ", end="")
|
||||
else:
|
||||
print("")
|
||||
mstring = input("Maintainers: ")
|
||||
|
||||
content = name + "\n" + "=" * len(name) + "\n\n"
|
||||
content += description + "\n\n\n"
|
||||
content += "## Maintainers\n\n"
|
||||
content += "The people responsible for merging changes to this component or answering potential questions.\n\n"
|
||||
for i in mstring.split(","):
|
||||
mname = maintainers[int(i)]
|
||||
content += "- [{}](https://github.com/{})\n".format(mname, mname)
|
||||
|
||||
f = open(path, "w")
|
||||
f.write(content)
|
||||
f.close()
|
||||
|
||||
def main():
|
||||
projectroot = os.path.realpath(__file__)
|
||||
projectroot = os.path.dirname(os.path.dirname(projectroot))
|
||||
|
||||
paths = get_all_paths(projectroot)
|
||||
print(len(paths))
|
||||
|
||||
for path in paths:
|
||||
add_readme(path)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -1,13 +0,0 @@
|
||||
import os
|
||||
|
||||
for root, dirs, files in os.walk(os.getcwd()):
|
||||
for filename in files:
|
||||
oldname = filename
|
||||
newname = filename.replace('fn_', 'fnc_')
|
||||
|
||||
print os.path.join(root,oldname)
|
||||
print newname
|
||||
if newname != oldname:
|
||||
print os.path.join(root,oldname)
|
||||
print oldname + ' -> ' + newname
|
||||
os.rename(os.path.join(root,oldname), os.path.join(root,newname))
|
Loading…
Reference in New Issue
Block a user