Completed
Push — master ( 291ee9...9d841e )
by Matěj
20s queued 12s
created

generate_contributors   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 3

1 Function

Rating   Name   Duplication   Size   Complexity  
A main() 0 13 3
1
#!/usr/bin/env python2
2
3
import os.path
4
import codecs
5
import ssg
6
7
def main():
8
    contributors_md, contributors_xml = ssg.contributors.generate()
9
10
    root_dir = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
11
    with codecs.open(os.path.join(root_dir, "Contributors.md"),
12
                     mode="w", encoding="utf-8") as f:
13
        f.write(contributors_md)
14
15
    with codecs.open(os.path.join(root_dir, "Contributors.xml"),
16
                     mode="w", encoding="utf-8") as f:
17
        f.write(contributors_xml)
18
19
    print("Don't forget to commit Contributors.md and Contributors.xml!")
20
21
22
if __name__ == "__main__":
23
    main()
24