From f0cd3c79e7ab4255218ff79311aca37ac2c97d9d Mon Sep 17 00:00:00 2001 From: kazix <tmakzmierczak@man.poznan.pl> Date: Thu, 11 Aug 2022 14:21:59 +0200 Subject: [PATCH] poprawne generowanie pliku, teraz kosmetyka --- main.py | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/main.py b/main.py index 24eeaf5..de8eecf 100644 --- a/main.py +++ b/main.py @@ -132,9 +132,8 @@ 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'] @@ -142,7 +141,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]) + project.attributes['visibility'], lic, last_act, c_user_tmp[0]]) print(8*"-") except: print('Something wrong or Cant connect to GitLab server, check credential') @@ -174,18 +173,7 @@ 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...") -- GitLab