File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change @@ -71,20 +71,7 @@ def group_by_languages(repos):
7171
7272 return languages
7373
74- username = "basemax"
75- profile = check_user (username )
76-
77- try :
78- # print(profile)
79- # print(profile["public_repos"])
80- public_repos = profile ["public_repos" ]
81- except IndexError :
82- public_repos = 0
83-
84- if public_repos :
85- all_repos = get_all_repos (username , public_repos )
86- groups = group_by_languages (all_repos )
87-
74+ def generate_html (groups ):
8875 print ("<h1>" + profile ["name" ] + " GitHub</h1>" )
8976
9077 for language , repos in groups .items ():
@@ -100,6 +87,24 @@ def group_by_languages(repos):
10087 print (" </li>" )
10188
10289 print ("</ul>\n " )
103- print (res )
90+
91+ username = "basemax"
92+ profile = check_user (username )
93+
94+ try :
95+ # print(profile)
96+ # print(profile["public_repos"])
97+ public_repos = profile ["public_repos" ]
98+ except IndexError :
99+ public_repos = 0
100+
101+ if public_repos :
102+ all_repos = get_all_repos (username , public_repos )
103+
104+ groups = group_by_languages (all_repos )
105+ # print(groups)
106+
107+ # generate HTML output
108+ generate_html (groups )
104109else :
105110 print ("Error: No public repositories or maybe network problem!" )
You can’t perform that action at this time.
0 commit comments