Skip to content
Snippets Groups Projects
Commit f0cd3c79 authored by kazix's avatar kazix
Browse files

poprawne generowanie pliku, teraz kosmetyka

parent 739ea5d8
No related branches found
No related tags found
No related merge requests found
...@@ -132,9 +132,8 @@ try: ...@@ -132,9 +132,8 @@ try:
print(j_project['projects'][x]['owners'][y]['owner_name'] + '<' + print(j_project['projects'][x]['owners'][y]['owner_name'] + '<' +
j_project['projects'][x]['owners'][y]['owner_mail'] + '>' + ';') j_project['projects'][x]['owners'][y]['owner_mail'] + '>' + ';')
c_user_tmp.append(j_project['projects'][x]['owners'][y]['owner_name'] + '<' + 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) print(c_user_tmp)
# c_owners = j_project['projects'][x]['owners'] # c_owners = j_project['projects'][x]['owners']
...@@ -142,7 +141,7 @@ try: ...@@ -142,7 +141,7 @@ try:
# for c_owner in c_owners: # for c_owner in c_owners:
# c_user.append(c_owner['owner_name'] + ':' + c_owner['owner_mail']) # c_user.append(c_owner['owner_name'] + ':' + c_owner['owner_mail'])
c_project.append([project.attributes['id'], project.attributes['name_with_namespace'], 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*"-") print(8*"-")
except: except:
print('Something wrong or Cant connect to GitLab server, check credential') 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: ...@@ -174,18 +173,7 @@ with open('gitlab-projects.csv', 'w', encoding='UTF8', newline='') as f:
# for project in projects: # 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(new_csv)
print("This is the end...") print("This is the end...")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment