From ce0992ecb26668825afbbb9743c3d4fb6f935a90 Mon Sep 17 00:00:00 2001
From: kazix <tmakzmierczak@man.poznan.pl>
Date: Thu, 11 Aug 2022 15:05:39 +0200
Subject: [PATCH] Revert "poprawne generowanie pliku, teraz kosmetyka"

This reverts commit f0cd3c79e7ab4255218ff79311aca37ac2c97d9d.
---
 main.py | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/main.py b/main.py
index de8eecf..24eeaf5 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...")
-- 
GitLab