Пример #1
0
def main():
	session = util.promptLogin()
	accountname = util.promptInput("Enter the name of the user you want to track:\n")()
	numRepos = 0
	numLines = 0
	print("\nCounting lines for all of %s's repositories. This may take a while...\n" % accountname)
	for repository in session.iter_user_repos(accountname):
		repoLines = countRepoLines(repository)
		numLines += repoLines
		numRepos += 1
		print(repository, "contains", repoLines, "lines of code.")
	print("\nThere are", numRepos, "repositories, with a combined total of", numLines, "lines of code.")	
Пример #2
0
def main():
	session = util.promptLogin()
	outputName = util.promptInput("Enter the desired output filename: ")
	outputFile = open(outputName, 'w')
	print()
	for repo in session.iter_repos():
		print(repo)
		repoTodo = getTodoFile(repo)
		if (repoTodo != None):
			repoTodo.refresh()
			outputFile.write(DIVIDER_STRING)
			outputFile.write("# TO-DO List found in %s:\n" % repo.full_name)
			outputFile.write(DIVIDER_STRING)
			outputFile.write(repoTodo.decoded.decode("utf-8"))
			outputFile.write("\n\n\n")
	print("\nDone! All found to-do files have been combined and saved as %s." % outputName)