forked from MapComplete/MapComplete
		
	Add small theme listing
This commit is contained in:
		
							parent
							
								
									3cec4eccff
								
							
						
					
					
						commit
						27126dc278
					
				
					 1 changed files with 7 additions and 7 deletions
				
			
		| 
						 | 
					@ -424,13 +424,13 @@ def clean_input(contents):
 | 
				
			||||||
        yield row
 | 
					        yield row
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def contributor_count(stats):
 | 
					def contributor_count(stats, index=1, item = "contributor"):
 | 
				
			||||||
    seen_contributors = set()
 | 
					    seen_contributors = set()
 | 
				
			||||||
    for line in stats:
 | 
					    for line in stats:
 | 
				
			||||||
        contributor = line[1]
 | 
					        contributor = line[index]
 | 
				
			||||||
        if(contributor in seen_contributors):
 | 
					        if(contributor in seen_contributors):
 | 
				
			||||||
            continue
 | 
					            continue
 | 
				
			||||||
        print("New contributor " + str(len(seen_contributors) + 1) + ": "+contributor)
 | 
					        print("New " + item + " " + str(len(seen_contributors) + 1) + ": "+contributor)
 | 
				
			||||||
        seen_contributors.add(contributor)
 | 
					        seen_contributors.add(contributor)
 | 
				
			||||||
        print(line)
 | 
					        print(line)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -440,10 +440,10 @@ def main():
 | 
				
			||||||
        stats = list(clean_input(csv.reader(csvfile, delimiter=',', quotechar='"')))
 | 
					        stats = list(clean_input(csv.reader(csvfile, delimiter=',', quotechar='"')))
 | 
				
			||||||
        print("Found " + str(len(stats)) + " changesets")
 | 
					        print("Found " + str(len(stats)) + " changesets")
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        contributor_count(stats)
 | 
					        contributor_count(stats, 3, "theme")
 | 
				
			||||||
        create_graphs(stats)
 | 
					        # create_graphs(stats)
 | 
				
			||||||
        create_per_theme_graphs(stats, 15)
 | 
					        # create_per_theme_graphs(stats, 15)
 | 
				
			||||||
        create_per_contributor_graphs(stats, 25)
 | 
					        # create_per_contributor_graphs(stats, 25)
 | 
				
			||||||
    print("All done!")
 | 
					    print("All done!")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue