summaryrefslogtreecommitdiff
path: root/gas.py
blob: 40509e84ed5fe3654add4f56a43e4168d38b827c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# -*- coding: utf-8 -*-

import argparse
from board import DynamicFlyer






if __name__ == '__main__':

    parser = argparse.ArgumentParser()

    parser.add_argument('--header', help='Define the main title of the picture', type=str, required=True)
    parser.add_argument('--footer', help='Define a conclusion for the picture', type=str, required=True)
    parser.add_argument('--output', help='Set the output filename', type=str, required=True)

    args = parser.parse_args()



    flyer = DynamicFlyer(250)

    flyer.print_header(args.header)

    data = {
        100 : 100,
        200 : 123,
        400 : 700,
        600 : 650,
        900 : 900
    }

    color = (0.5, 0.2, 0.7)

    color = (0.047, 0.365, 0.533)

    flyer.render_commit_timeline(0, 1000, data, False, color)

    colors = [ (0.812, 0.176, 0.08), (0.04, 0.58, 0.255) ]

    colors = [ (0.643, 0.133, 0), (0, 0.459, 0.20) ]

    colors = [ (1.0, 0.353, 0.165), (0.118, 0.71, 0.392) ]

    data = {
        'Insertions' : 794,
        'Deletions' : 312
    }

    flyer.render_pie('Code', data, colors)

    data = {
        'Added' : 100,
        'Removed' : 13
    }

    flyer.render_pie('Files', data, colors)

    data = {
        'C' : 2489,
        'Python' : 631
    }

    flyer.render_pie('Languages', data, colors)

    data = {
        'Remaining' : 89,
        'Killed' : 31
    }

    flyer.render_pie('TODO / FIXME', data, colors)


    flyer.print_footer(args.footer)

    flyer.save(args.output)