diff --git a/main.py b/main.py index de8eecfcd44db4124d09fc39b48f2428c295cf3e..24eeaf594a9af9bd05f57c74ecf855cff3e8914a 100644 --- a/main.py +++ b/main.py @@ -132,8 +132,9 @@ try: print(j_project['projects'][x]['owners'][y]['owner_name'] + '<' + j_project['projects'][x]['owners'][y]['owner_mail'] + '>' + ';') + c_user_tmp.append(j_project['projects'][x]['owners'][y]['owner_name'] + '<' + - j_project['projects'][x]['owners'][y]['owner_mail'] + '>' + ' ') + j_project['projects'][x]['owners'][y]['owner_mail'] + '>' + ';') print(c_user_tmp) # c_owners = j_project['projects'][x]['owners'] @@ -141,7 +142,7 @@ try: # for c_owner in c_owners: # c_user.append(c_owner['owner_name'] + ':' + c_owner['owner_mail']) c_project.append([project.attributes['id'], project.attributes['name_with_namespace'], - project.attributes['visibility'], lic, last_act, c_user_tmp[0]]) + project.attributes['visibility'], lic, last_act, c_user_tmp]) print(8*"-") except: print('Something wrong or Cant connect to GitLab server, check credential') @@ -173,7 +174,18 @@ with open('gitlab-projects.csv', 'w', encoding='UTF8', newline='') as f: # for project in projects: +# new_project_csv = [] +# new_project_csv.append(new_jproject) +# with open('gitlab-projects.json', encoding='utf8') as f: +# j_data = json.load(f) +# new_json_file_csv = pd.read_json(j_data, orient='index') +# # new_json_file_csv = pd.json_normalize(j_data, max_level=3) +# # flatten(j_project) +# df = pd.DataFrame(new_json_file_csv) +# df.to_csv("gitlab-projects.csv", encoding='utf-8', index=False) +# # with open("gitlab-projects.csv", "w", encoding='utf8') as outfile: +# # outfile.write(new_jproject_html) # print(new_csv) print("This is the end...")