From a2159bcc4c0d657743dc62fad9b4d6238aaa7ddb Mon Sep 17 00:00:00 2001 From: kronpatel Date: Sun, 24 Aug 2025 14:29:57 +0530 Subject: [PATCH 1/9] Python-Add --- validator.py | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 validator.py diff --git a/validator.py b/validator.py new file mode 100644 index 0000000..ae0f9b3 --- /dev/null +++ b/validator.py @@ -0,0 +1,76 @@ +import json +import sys +import os + +REQUIRED_FIELDS = ["name", "profession", "quote", "github"] + +TEMPLATE_VALUES = { + "name": "Your Name", + "profession": "Your Profession", + "quote": "\"Your favourite quote\"
- Said By Me", + "github": "https://github.com" +} + +def is_template_entry(card): + """Check if the entry is a template or not""" + return all(card.get(k) == v for k, v in TEMPLATE_VALUES.items() if k in card) + +def validate_json(file_path): + errors = [] + + if not os.path.exists(file_path): + errors.append(f"❌ File not found: {file_path}") + return errors + + try: + with open(file_path, "r", encoding="utf-8") as f: + data = json.load(f) + except json.JSONDecodeError as e: + errors.append(f"❌ JSON Syntax Error: {str(e)}") + return errors + + if "cardDetails" not in data: + errors.append("❌ Missing 'cardDetails' key at root level.") + return errors + + seen = set() + + for idx, card in enumerate(data["cardDetails"], start=1): + # Template entries ko skip karo + if is_template_entry(card): + continue + + # Required field check + for field in REQUIRED_FIELDS: + if field not in card or not str(card[field]).strip(): + errors.append(f"❌ Entry {idx} missing required field: {field}") + + # Duplicate check (by Name + GitHub link) + fingerprint = ( + card.get("name", "").strip().lower(), + card.get("github", "").strip().lower() + ) + if fingerprint in seen: + errors.append( + f"❌ Duplicate entry found at index {idx} → Name: '{card.get('name')}', GitHub: {card.get('github')}" + ) + else: + seen.add(fingerprint) + + return errors + + +if __name__ == "__main__": + if len(sys.argv) < 2: + print("❌ Usage: python validator.py ") + sys.exit(1) + + file_path = sys.argv[1] + errors = validate_json(file_path) + + if errors: + print("\n".join(errors)) + sys.exit(1) + else: + print("✅ JSON Validation Passed! All required fields and no duplicates.") + sys.exit(0) \ No newline at end of file From 6877eb1c21416b77a3861219c45a6835aaddc069 Mon Sep 17 00:00:00 2001 From: jeturgavli Date: Sun, 24 Aug 2025 02:46:26 -0700 Subject: [PATCH 2/9] report added #1 --- .gitignor | 0 reports/normal_report.txt | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 .gitignor create mode 100644 reports/normal_report.txt diff --git a/.gitignor b/.gitignor new file mode 100644 index 0000000..e69de29 diff --git a/reports/normal_report.txt b/reports/normal_report.txt new file mode 100644 index 0000000..7ea5ad3 --- /dev/null +++ b/reports/normal_report.txt @@ -0,0 +1,18 @@ +❌ Entry 55 missing required field: quote +❌ Entry 56 missing required field: quote +❌ Entry 57 missing required field: quote +❌ Entry 58 missing required field: quote +❌ Entry 59 missing required field: quote +❌ Duplicate entry found at index 89 → Name: 'Brian kyalo', GitHub: https://github.com/kyalo3 +❌ Duplicate entry found at index 99 → Name: 'Mblessing Muchafa CoderBlee', GitHub: https://github.com/CoderBlee +❌ Entry 103 missing required field: quote +❌ Entry 104 missing required field: quote +❌ Duplicate entry found at index 125 → Name: ' Elísio Massaqui', GitHub: https://github.com/elisioMassaqui +❌ Entry 150 missing required field: github +❌ Entry 176 missing required field: quote +❌ Entry 180 missing required field: quote +❌ Entry 181 missing required field: quote +❌ Entry 196 missing required field: quote +❌ Entry 196 missing required field: github +❌ Entry 211 missing required field: profession +❌ Entry 211 missing required field: quote From 596dee33cce25213f05a664c1c7d244018cb730a Mon Sep 17 00:00:00 2001 From: jeturgavli Date: Sun, 24 Aug 2025 03:03:12 -0700 Subject: [PATCH 3/9] update validator.py file and remote added #2 --- reports/with_name_report.txt | 18 ++++++++++++++++ validator.py | 40 ++++++++++++++++++++++++------------ 2 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 reports/with_name_report.txt diff --git a/reports/with_name_report.txt b/reports/with_name_report.txt new file mode 100644 index 0000000..04f065d --- /dev/null +++ b/reports/with_name_report.txt @@ -0,0 +1,18 @@ +❌ Error in Entry 55 ('Meryem Ahmaine') → missing required field: quote +❌ Error in Entry 56 ('Ch.Sai Pradyumna Goud') → missing required field: quote +❌ Error in Entry 57 ('Morris Bundi') → missing required field: quote +❌ Error in Entry 58 ('Salma Hussien') → missing required field: quote +❌ Error in Entry 59 ('zehor-l') → missing required field: quote +❌ Error in Entry 89 ('Brian kyalo') → Duplicate entry (GitHub: https://github.com/kyalo3) +❌ Error in Entry 99 ('Mblessing Muchafa CoderBlee') → Duplicate entry (GitHub: https://github.com/CoderBlee) +❌ Error in Entry 103 ('Dhel Malith') → missing required field: quote +❌ Error in Entry 104 ('Jim Hatley') → missing required field: quote +❌ Error in Entry 125 (' Elísio Massaqui') → Duplicate entry (GitHub: https://github.com/elisioMassaqui) +❌ Error in Entry 150 ('Aaron Muti') → missing required field: github +❌ Error in Entry 176 ('Ahmed Bentabet') → missing required field: quote +❌ Error in Entry 180 ('Ayush gupta') → missing required field: quote +❌ Error in Entry 181 ('Gamila Programmer') → missing required field: quote +❌ Error in Entry 196 ('Wairimu Maringa') → missing required field: quote +❌ Error in Entry 196 ('Wairimu Maringa') → missing required field: github +❌ Error in Entry 211 ('Shiv Patle') → missing required field: profession +❌ Error in Entry 211 ('Shiv Patle') → missing required field: quote diff --git a/validator.py b/validator.py index ae0f9b3..daa4d45 100644 --- a/validator.py +++ b/validator.py @@ -4,6 +4,7 @@ REQUIRED_FIELDS = ["name", "profession", "quote", "github"] +# Template values to skip TEMPLATE_VALUES = { "name": "Your Name", "profession": "Your Profession", @@ -12,52 +13,62 @@ } def is_template_entry(card): - """Check if the entry is a template or not""" + """Check kare ki entry template hai ya nahi""" return all(card.get(k) == v for k, v in TEMPLATE_VALUES.items() if k in card) def validate_json(file_path): errors = [] + valid_names = [] if not os.path.exists(file_path): errors.append(f"❌ File not found: {file_path}") - return errors + return errors, valid_names try: with open(file_path, "r", encoding="utf-8") as f: data = json.load(f) except json.JSONDecodeError as e: errors.append(f"❌ JSON Syntax Error: {str(e)}") - return errors + return errors, valid_names if "cardDetails" not in data: errors.append("❌ Missing 'cardDetails' key at root level.") - return errors + return errors, valid_names - seen = set() + seen = set() # track duplicates for idx, card in enumerate(data["cardDetails"], start=1): - # Template entries ko skip karo + # Skip template entries if is_template_entry(card): continue + name = card.get("name", f"(unknown at index {idx})") + has_error = False + # Required field check for field in REQUIRED_FIELDS: if field not in card or not str(card[field]).strip(): - errors.append(f"❌ Entry {idx} missing required field: {field}") + errors.append(f"❌ Error in Entry {idx} ('{name}') → missing required field: {field}") + has_error = True - # Duplicate check (by Name + GitHub link) + # Duplicate check (by Name + GitHub link) fingerprint = ( card.get("name", "").strip().lower(), card.get("github", "").strip().lower() ) if fingerprint in seen: errors.append( - f"❌ Duplicate entry found at index {idx} → Name: '{card.get('name')}', GitHub: {card.get('github')}" + f"❌ Error in Entry {idx} ('{name}') → Duplicate entry (GitHub: {card.get('github')})" ) + has_error = True else: seen.add(fingerprint) - return errors + # Add to valid list if no errors + if not has_error: + valid_names.append(name) + + return errors, valid_names if __name__ == "__main__": @@ -66,11 +77,14 @@ def validate_json(file_path): sys.exit(1) file_path = sys.argv[1] - errors = validate_json(file_path) + errors, valid_names = validate_json(file_path) if errors: print("\n".join(errors)) sys.exit(1) else: - print("✅ JSON Validation Passed! All required fields and no duplicates.") - sys.exit(0) \ No newline at end of file + print("✅ JSON Validation Passed!") + print("👥 Valid Entries:") + for n in valid_names: + print(f" - {n}") + sys.exit(0) From 06fed7bcac82e0c2f4912231a6d856a51ce167f2 Mon Sep 17 00:00:00 2001 From: kronpatel Date: Sun, 24 Aug 2025 17:21:33 +0530 Subject: [PATCH 4/9] cardDetails.json-update and Check --- cardDetails.json | 49 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/cardDetails.json b/cardDetails.json index ebe91d8..b055585 100644 --- a/cardDetails.json +++ b/cardDetails.json @@ -488,30 +488,35 @@ { "name": "Meryem Ahmaine", "profession": "Full stack developer", + "quote" : "Clean code is the best documentation", "github": "https://github.com/meryemahmaine", "linkedin": "https://www.linkedin.com/in/meryem-ahmaine-aa76a728b/" }, { "name": "Ch.Sai Pradyumna Goud", "profession": "Apspiring Full stack developer", + "quote": "Push yourself harder than you push to GitHub", "github": "https://github.com/saipradyumnagoud", "linkedin": "https://www.linkedin.com/in/saipradyumnagoudch/" }, { "name": "Morris Bundi", "profession": "Machine Learning", + "quote": "Talk is cheap. Show me the code", "github": "https://github.com/morrisbmm", "linkedin": "https://www.linkedin.com/in/morris-bundi-1873721bb//" }, { "name": "Salma Hussien", "profession": "Software Engineer", + "quote":"Good developers write code; great developers share it.", "github": "https://github.com/Sallmahussien", "linkedin": "https://www.linkedin.com/in/sallma-ahmed/" }, { "name": "zehor-l", "profession": "Apspiring Engineer", + "quote":"The best coders debug more than they brag", "github": "https://github.com/zehor-l", "linkedin": "https://linkedin.com/in/zehor-lahlah" }, @@ -770,17 +775,6 @@ "LinkedIn": "https://linked/in.com/Sergius-Nyah/", "email": "mailto://sergiusnyah@gmail.com" }, - { - "name": "Brian kyalo", - "profession": "Software Developer", - "quote": "\"Keep Pushing\"
- Said by Alcatraz", - "twitter": "https://twitter.com", - "dribbble": "https://dribbble.com", - "behance": "https://behance.com", - "github": "https://github.com/kyalo3", - "linkedin": "https://linkedin.com/brian-kyalo-531394281/", - "email": "mailto:kyalokimeu0@gmail.com" - }, { "name": "J R Jewell", "profession": "Web Developer", @@ -859,15 +853,6 @@ "linkedin": "https://www.linkedin.com/in/akash-g-gaonkar-345656256/", "email": "akashggaonkar@gmail.com" }, - { - "name": "Mblessing Muchafa CoderBlee", - "profession": "Student| CyberSecurity| SoftwareEngineer| Data Analysis", - "quote": "\"Everything has its own time, hold on as there is light at the end of the tunnel\"
- Said by GamuchiraiM", - "twitter": "https://twitter.com/kamoblessingg", - "github": "https://github.com/CoderBlee", - "linkedin": "https://www.linkedin.com/in/blessing-muchafa-772305247/", - "email": "gamuchiraiblessing7@gmail.com" - }, { "name": "Sabeha Khan", "profession": "Computer Science Student", @@ -897,6 +882,7 @@ { "name": "Dhel Malith", "profession": "Junior Cybersecurity Analyst", + "quote":"To protect data is to protect people", "twitter": "https://twitter.com/ThomasObote1?s=09", "github": "https://github.com/thomasobote211", "linkedin": "https://www.linkedin.com/in/thomas-obote-a7b5131b3?utm_source=share&utm_campaign=share_via&utm_content=profile&utm_medium=android_app", @@ -905,6 +891,7 @@ { "name": "Jim Hatley", "profession": "Programmer", + "quote":"Knowledge grows by sharing, not saving", "github": "https://github.com/jhatley75", "email": "jimdhatley@gmail.com" }, @@ -1090,15 +1077,6 @@ "linkedin": "https://www.linkedin.com/in/f%C3%A9lixdomingos/", "email": "Félix:felixsdomingos93@gmail.com" }, - { - "name": " Elísio Massaqui", - "profession": "Web FrontEnd & Mobile Developer", - "quote": "When you believe so much in something, that thing becomes real. -Mr.Robot", - "twitter": "https://twitter.com/elisio_massaqui", - "github": "https://github.com/elisioMassaqui", - "linkedin": "https://www.linkedin.com/in/el%C3%ADsio-massaqui-202635291/", - "email": "elisiomassaqui8@gmail.com" - }, { "name": "Anish Yakkanti", "profession": "Texas A&M Student", @@ -1309,6 +1287,7 @@ "name": "Aaron Muti", "profession": "Data Engineer", "quote": "\"Sangala Waya\"
- Markus Wings", + "github":"https://github.com/aaron-muti-420", "email": "mailto:aaron@forestdigitalacademy.com" }, { @@ -1531,6 +1510,7 @@ { "name": "Ahmed Bentabet", "profession": "SWE Student", + "quote":"Backend runs the world; security keeps it alive", "github": "https://github.com/ahmedbentabet", "linkedin": "https://www.linkedin.com/in/ahmedbentabet/" }, @@ -1564,6 +1544,7 @@ { "name": "Ayush gupta", "profession": "Student", + "quote":"Think like a programmer, solve like a scientist", "github": "https://github.com/ayushgupta35", "linkedin": "https://linkedin.com/ayushgupta1", "email": "mailto:ayushg3512@gmail.com" @@ -1571,7 +1552,8 @@ { "name": "Gamila Programmer", "profession": "Frontend Developer", - "github": "https://github.com/gameliaprogrammer", + "quote":"Frontend is not just coding, it’s art in motion", + "github": "https://github.com/GamilaCoding", "linkedin": "https://www.linkedin.com/in/jamila-developer/", "email": "mailto:youremail@gmail.com" }, @@ -1701,7 +1683,8 @@ { "name": "Wairimu Maringa", "profession": "Tech", - "Quote": "be free and live fully" + "quote": "be free and live fully", + "github":"https://github.com/WairimuMaringa" }, { "name": "Rachael Odetayo", @@ -1834,8 +1817,8 @@ }, { "name": "Shiv Patle", - "Profession" : "MERN stack Developer | Full Stack Developer", - "quota" : "it doesn't matter when you start, but how you finish that matters!", + "profession" : "MERN stack Developer | Full Stack Developer", + "quote" : "it doesn't matter when you start, but how you finish that matters!", "github" : "https://github.com/Shiv-Patel-24", "linkedin": "https://www.linkedin.com/in/shiv-patel-94b542223?" } From 578c5d49e3b4143a7d7adf04d51d943897fd37a3 Mon Sep 17 00:00:00 2001 From: jeturgavli Date: Sun, 24 Aug 2025 05:29:19 -0700 Subject: [PATCH 5/9] validator.py and reports file added for email validation --- reports/Email_Valid_Report.txt | 48 ++++++++++++++++++++++++++++++++++ validator.py | 6 +++++ 2 files changed, 54 insertions(+) create mode 100644 reports/Email_Valid_Report.txt diff --git a/reports/Email_Valid_Report.txt b/reports/Email_Valid_Report.txt new file mode 100644 index 0000000..1674b2f --- /dev/null +++ b/reports/Email_Valid_Report.txt @@ -0,0 +1,48 @@ +⚠️ Warning in Entry 3 ('Anushanga Kaluarachchi') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 22 ('Gloria Ebubechukwu Okeke') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 24 ('Keron Patel') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 27 ('Jetur Gavli') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 28 ('Dubem Obinwanne') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 29 ('Paul Danso Asare') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 30 ('Mkpandiok, Idorenyin Monday') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 31 ('Abigail Sylvie') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 32 ('Joana Lawer') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 33 ('KPIDIBA De'Indja Florento-David') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 35 ('Abdulai Bah') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 53 ('Patrick Nyangoto Orangi') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 68 ('Claudia Varona') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 70 ('Tracy Sambu') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 72 ('James Wainaina') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 77 ('FRANCK KASONGO') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 78 ('Jerry Onyango') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 79 ('Chad Peter') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 80 ('Tsafac Nkombong Regine Cyrille') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 83 ('Ikegah Oliver') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 84 ('Mwofoh Adriel') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 90 ('John Irem') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 91 ('Elísio Massaqui') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 93 ('Ambrose Matata') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 96 ('Mblessing Muchafa CoderBlee') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 97 ('AkashGGaonkar') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 99 ('Tony B. Nya') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 101 ('Dhel Malith') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 102 ('Jim Hatley') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 106 ('Mblessing Muchafa') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 111 ('Amin Vahdani') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 119 ('Wesley Perrang') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 122 ('Félix Domingos') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 138 ('Tenneh Kanneh') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 151 ('Ezeliora Godsfavour') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 154 ('Haram Yoon') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 155 ('Penn Junior') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 156 ('Veríssimo Cassange') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 157 ('Derrick Ampire') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 158 ('Riccardi Dalexis') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 160 ('Tataw Clarkson') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 163 ('Mamolateli Mokhethi') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 164 ('Mba Blessing Nnenna') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 170 ('Pariya Hajipour') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 174 ('Kamangu Maeti') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 183 ('Silvia Wachira') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 197 ('Gilbert Kamau') → 'email' should start with 'mailto:' +⚠️ Warning in Entry 207 ('Stephen ZAKANE') → 'email' should start with 'mailto:' diff --git a/validator.py b/validator.py index daa4d45..649fb02 100644 --- a/validator.py +++ b/validator.py @@ -63,6 +63,12 @@ def validate_json(file_path): has_error = True else: seen.add(fingerprint) + + # Email validation + email = card.get("email","").strip() + if email and not email.startswith("mailto:"): + errors.append(f"⚠️ Warning in Entry {idx} ('{name}') → 'email' should start with 'mailto:'") + has_error = True # Add to valid list if no errors if not has_error: From 22ac50b912082ca5710345419622b69bb0e6ee6a Mon Sep 17 00:00:00 2001 From: kronpatel Date: Sun, 24 Aug 2025 18:20:22 +0530 Subject: [PATCH 6/9] cardDetails.json File Fix --- cardDetails.json | 96 ++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/cardDetails.json b/cardDetails.json index b055585..dbfc6d9 100644 --- a/cardDetails.json +++ b/cardDetails.json @@ -24,7 +24,7 @@ "quote": "\"Do an one thing at a time\"
- Said By Me", "github": "https://github.com/Anushanga2001", "linkedin": "https://www.linkedin.com/in/anushanga-kaluarachchi-30969825b/", - "email": "anushanga2001@gmailcom" + "email": "mailto:anushanga2001@gmailcom" }, { "name": "Naman Singh Rana", @@ -198,7 +198,7 @@ "quote": "\"Who you give the key to your life drives it. \"
- Said By Johnpaul Ezemma", "github": "https://github.com/gloriaebubeokeke", "linkedin": "https://www.linkedin.com/in/gloria-okeke-e-j/", - "email": "okekeebubechukwu1@gmail.com" + "email": "mailto:okekeebubechukwu1@gmail.com" }, { "name": "Cheikh Babacar GOUDIABY", @@ -217,7 +217,7 @@ "twitter": "https://twitter.com/keron_1826", "github": "https://github.com/kronpatel", "linkedin": "www.linkedin.com/in/keron-patel-18262k600", - "email": "keronpatel5656@gmail.com" + "email": "mailto:keronpatel5656@gmail.com" }, { "name": "Maybell Obadoni", @@ -244,7 +244,7 @@ "twitter": "https://x.com/Jetur_Gavli_23", "github": "https://github.com/jeturgavli", "linkedin": "https://www.linkedin.com/in/jeturgavli/", - "email": "jeturgavli1in1@gmail.com" + "email": "mailto:jeturgavli1in1@gmail.com" }, { "name": "Dubem Obinwanne", @@ -255,7 +255,7 @@ "behance": "https://behance.com", "github": "https://github.com/DubemObi/", "linkedin": "https://www.linkedin.com/in/chidubem-obinwanne-0a113819a/", - "email": "dubemobiwon@gmail.com" + "email": "mailto:dubemobiwon@gmail.com" }, { "name": "Paul Danso Asare", @@ -266,7 +266,7 @@ "behance": "https://behance.com", "github": "https://github.com/colorwhite-git", "linkedin": "https://www.linkedin.com/in/paul-danso-asare/", - "email": "pauldasare@gmail.com" + "email": "mailto:pauldasare@gmail.com" }, { "name": "Mkpandiok, Idorenyin Monday", @@ -275,7 +275,7 @@ "github": "https://github.com/idorenyin9010", "linkedin": "http://linkedin.com/in/idorenyin-mkpandiok-b989a322a", "twitter": "https://x.com/@MkpandiokM", - "email": "idorenyinmkpandiok@gmail.com" + "email": "mailto:idorenyinmkpandiok@gmail.com" }, { "name": "Abigail Sylvie", @@ -285,7 +285,7 @@ "github": "https://github.com/abigailsylvie", "linkedin": "https://www.linkedin.com/in/abigailsylvie/", "medium": "https://medium.com/@abigailsylvie78", - "email": "abigailsylvie78@gmail.com" + "email": "mailto:abigailsylvie78@gmail.com" }, { "name": "Joana Lawer", @@ -294,7 +294,7 @@ "twitter": "https://x.com/joana_lawer", "github": "https://github.com/joanalawer", "linkedin": "https://www.linkedin.com/in/joanalawer/", - "email": "lawerjoana477@gmail.com" + "email": "mailto:lawerjoana477@gmail.com" }, { "name": "KPIDIBA De'Indja Florento-David", @@ -302,7 +302,7 @@ "quote": "First, solve the problem. Then, write the code.", "github": "https://github.com/kpidiba", "linkedin": "https://www.linkedin.com/in/david-kpidiba-3071601a4/", - "email": "kpidibadavid1@gmail.com" + "email": "mailto:kpidibadavid1@gmail.com" }, { "name": "Osama Rabea", @@ -319,7 +319,7 @@ "quote": "\"You can go as far as you mind lets you. what you believe, you can achieve. \"
- Said By Mary Kay Ash", "github": "https://github.com/abdulai123", "linkedin": "https://linkedin.com/abdulai-bah-9887a122a", - "email": "babdulai149@gmail.com" + "email": "mailto:babdulai149@gmail.com" }, { "name": "Sahasra", @@ -477,7 +477,7 @@ "twitter": "https://x.com/patrick_orangi", "github": "https://github.com/nyangoto", "linkedin": "https://www.linkedin.com/in/patrick-orangi/", - "email": "patricknyangoto@outlook.com" + "email": "mailto:patricknyangoto@outlook.com" }, { "name": "Ndifon", @@ -593,7 +593,7 @@ "quote": "\"Dreams don't work unless you do.\"
- John C. Maxwell", "github": "https://github.com/Clau050994/", "linkedin": "https://www.linkedin.com/in/claudia-varona-p%C3%A9rez-96b3bb114/", - "email": "clau050994gmail@gmail.com" + "email": "mailto:clau050994gmail@gmail.com" }, { "name": "Adarsh Sahu", @@ -613,7 +613,7 @@ "twitter": "https://twitter.com/sambu_tracy", "github": "https://github.com/sambutracy", "linkedin": "https://www.linkedin.com/in/tracysambu/", - "email": "tracysambut@gmail.com" + "email": "mailto:tracysambut@gmail.com" }, { "name": "Essi Akpevwe Praise", @@ -630,7 +630,7 @@ "quote": "Be the change that you wish to see in the world. - Mahatma Gandhi", "github": "https://github.com/JamesWainaina", "linkedin": "https://www.linkedin.com/in/james-gatheru-2282b1212/", - "email": "wainainajamesgatheru@gmail.com" + "email": "mailto:wainainajamesgatheru@gmail.com" }, { "name": "Jonas Ermert", @@ -676,7 +676,7 @@ "behance": "https://behance.com", "github": "https://github.com/Franckkasongo15/Franck-kasongo", "linkedin": "https://linkedin.com/in/franckkasongo15", - "email": "franckkasongokalala@gmail.com" + "email": "mailto:franckkasongokalala@gmail.com" }, { "name": "Jerry Onyango", @@ -687,7 +687,7 @@ "behance": "no behance", "github": "https://github.com/onyangojerry", "linkedin": "https://www.linkedin.com/in/jerry-rawlings-onyango/", - "email": "jerry.onyango.rawlings@gmail.com" + "email": "mailto:jerry.onyango.rawlings@gmail.com" }, { "name": "Chad Peter", @@ -696,7 +696,7 @@ "twitter": "https://twitter.com/chardpeter10", "github": "https://github.com/ChardPeter", "linkedin": "https://www.linkedin.com/in/chard-p-7191a3245/", - "email": "chardpeter10@gmail.com" + "email": "mailto:chardpeter10@gmail.com" }, { "name": "Tsafac Nkombong Regine Cyrille", @@ -705,7 +705,7 @@ "twitter": "https://twitter.com/RegineCyrille1", "github": "https://github.com/Regine12", "linkedin": "https://www.linkedin.com/in/tsafac-nkombong-regine-cyrille", - "email": "reginecyrille@gmail.com" + "email": "mailto:reginecyrille@gmail.com" }, { "name": "Auwalu Hamza", @@ -731,7 +731,7 @@ "quote": "\"Memento mori, live well.\"
- Said by Marcus Aurelius", "github": "https://github.com/oliverTwist2", "linkedin": "https://www.linkedin.com/in/ikegah-oliver/", - "email": "oliverikegah@gmail.com" + "email": "mailto:oliverikegah@gmail.com" }, { "name": "Mwofoh Adriel", @@ -740,7 +740,7 @@ "github": "https://github.com/Mwofoh-Adriel", "linkedin": "https://www.linkedin.com/in/adriel-mwofoh-6ab680269//", "instagram": "https://www.instagram.com/mwofohadriel/", - "email": "Mwofohadriel@gmail.com" + "email": "mailto:Mwofohadriel@gmail.com" }, { "name": "Ande Gangadhara Rao", @@ -790,7 +790,7 @@ "twitter": "https://twitter.com/rasine_era", "github": "https://github.com/eyesaidyo", "linkedin": "https://linkedin.com/in/john-irem", - "email": "rajonirem8@gmail.com" + "email": "mailto:rajonirem8@gmail.com" }, { "name": "Elísio Massaqui", @@ -798,7 +798,7 @@ "quote": "\"Believe in your Skills\"
- Said by", "twitter": "https://twitter.com/elisio_massaqui", "github": "https://github.com/elisioMassaqui", - "email": "elisiomassaqui8@gmail.com" + "email": "mailto:elisiomassaqui8@gmail.com" }, { "name": "Abdessamad Touzani", @@ -816,7 +816,7 @@ "twitter": "https://twitter.com/MatataAmbrose", "github": "https://github.com/Masaku12", "linkedin": "https://www.linkedin.com/in/ambrosematata/", - "email": "ambrose.matata11@gmail.com" + "email": "mailto:ambrose.matata11@gmail.com" }, { "name": "Brian Chebon", @@ -843,7 +843,7 @@ "twitter": "https://twitter.com/kamoblessingg", "github": "https://github.com/CoderBlee", "linkedin": "https://www.linkedin.com/in/blessing-muchafa-772305247/", - "email": "gamuchiraiblessing7@gmail.com" + "email": "mailto:gamuchiraiblessing7@gmail.com" }, { "name": "AkashGGaonkar", @@ -851,7 +851,7 @@ "quote": "\"He travels the fastest who travels alone\"
- Rudyard Kipling", "github": "https://github.com/Gaonkar30", "linkedin": "https://www.linkedin.com/in/akash-g-gaonkar-345656256/", - "email": "akashggaonkar@gmail.com" + "email": "mailto:akashggaonkar@gmail.com" }, { "name": "Sabeha Khan", @@ -868,7 +868,7 @@ "instagram": "https://www.instagram.com/tonybnya/", "github": "https://github.com/tonybnya", "linkedin": "https://www.linkedin.com/in/tonybnya/", - "email": "tonybnya@gmail.com" + "email": "mailto:tonybnya@gmail.com" }, { "name": "Sandeep Dewangan", @@ -886,14 +886,14 @@ "twitter": "https://twitter.com/ThomasObote1?s=09", "github": "https://github.com/thomasobote211", "linkedin": "https://www.linkedin.com/in/thomas-obote-a7b5131b3?utm_source=share&utm_campaign=share_via&utm_content=profile&utm_medium=android_app", - "email": "dhelmcm@gmail.com" + "email": "mailto:dhelmcm@gmail.com" }, { "name": "Jim Hatley", "profession": "Programmer", "quote":"Knowledge grows by sharing, not saving", "github": "https://github.com/jhatley75", - "email": "jimdhatley@gmail.com" + "email": "mailto:jimdhatley@gmail.com" }, { "name": "Vincent Dushime", @@ -928,7 +928,7 @@ "twitter": "https://twitter.com/kamoblessingg", "github": "https://github.com/CoderBlee", "linkedin": "https://cs50.me/cs50cy#!", - "email": "gamuchiraiblessing7@gmail.com" + "email": "mailto:gamuchiraiblessing7@gmail.com" }, { "name": "Vincent Kimani", @@ -971,7 +971,7 @@ "twitter": "https://x.com/Amiiin94", "github": "https://github.com/amin2ace", "linkedin": "https://www.linkedin.com/in/amin-map-6a060a210/", - "email": "avmap.py@gmail.com" + "email": "mailto:avmap.py@gmail.com" }, { "name": "Manu Arias", @@ -1046,7 +1046,7 @@ "behance": "https://behance.com", "github": "https://github.com/Wesley-Perrang", "linkedin": "https://www.linkedin.com/in/wesley-perrang/", - "email": "wes3perrang@gmail.com" + "email": "mailto:wes3perrang@gmail.com" }, { "name": "Adeshina Olorogun", @@ -1075,7 +1075,7 @@ "behance": "https://www.behance.net/flixsdomingos", "github": "https://github.com/felixdomingos1", "linkedin": "https://www.linkedin.com/in/f%C3%A9lixdomingos/", - "email": "Félix:felixsdomingos93@gmail.com" + "email": "mailto:felixsdomingos93@gmail.com" }, { "name": "Anish Yakkanti", @@ -1216,7 +1216,7 @@ "twitter": "https://twitter.com/tennehkanneh", "github": "https://github.com/tennehkanneh", "linkedin": "https://www.linkedin.com/in/tenneh-kanneh-888132238/", - "email": "tennehkannehofficial@gmail.com" + "email": "mailto:tennehkannehofficial@gmail.com" }, { "name": "Favour Naza Anajemba", @@ -1327,7 +1327,7 @@ "behance": "https://www.educative.io/profile/view/5820460445466624", "github": "https://github.com/favy-codez", "linkedin": "https://www.linkedin.com/in/ezeliora-favour-8343691bb/", - "email": "ezeliorafavour81@gmail.com" + "email": "mailto:ezeliorafavour81@gmail.com" }, { "name": "Elisa Capololo", @@ -1354,7 +1354,7 @@ "instagram": "https://www.instagram.com/haram._.yoon/", "github": "https://github.com/haram082", "linkedin": "https://www.linkedin.com/in/haram-yoon-b359511b0/", - "email": "hyhn2022@mymail.pomona.eud" + "email": "mailto:hyhn2022@mymail.pomona.eud" }, { "name": "Penn Junior", @@ -1363,7 +1363,7 @@ "instagram": "https://www.instagram.com/malonepenn/", "github": "https://github.com/Payne680", "linkedin": "https://www.linkedin.com/in/penn-junior/", - "email": "pennjunior680@gmail.com" + "email": "mailto:pennjunior680@gmail.com" }, { "name": "Veríssimo Cassange", @@ -1372,7 +1372,7 @@ "instagram": "https://www.instagram.com/am_derrick/", "github": "https://github.com/Vec21", "linkedin": "https://www.linkedin.com/in/vec21/", - "email": "veccpro@gmail.com" + "email": "mailto:veccpro@gmail.com" }, { "name": "Derrick Ampire", @@ -1381,7 +1381,7 @@ "instagram": "https://www.instagram.com/vec21_/", "github": "https://github.com/am-derrick", "linkedin": "https://www.linkedin.com/in/am-derrick/", - "email": "ampire90@gmail.com" + "email": "mailto:ampire90@gmail.com" }, { "name": "Riccardi Dalexis", @@ -1389,7 +1389,7 @@ "quote": "\"Sometimes, the only choices you have are bad ones, but you still have to choose.\"
- The Twelfth Doctor", "github": "https://github.com/rod7760", "linkedin": "https://www.linkedin.com/in/riccardi-dalexis/", - "email": "rod7760@rit.edu" + "email": "mailto:rod7760@rit.edu" }, { "name": "Dapo Adedire", @@ -1406,7 +1406,7 @@ "quote": "\"Life is easy when you live it the hard way\"
- Said by Dave Kekich", "github": "https://github.com/tataw-cl", "linkedin": "https://www.linkedin.com/in/tataw-clarkson-904a7a296", - "email": "tatawclarkson@gmail.com" + "email": "mailto:tatawclarkson@gmail.com" }, { "name": "Joan Aneas", @@ -1426,7 +1426,7 @@ "quote": "\"Try and fail, but don't fail to try", "github": "https://github.com/Mamolets", "linkedin": "https://www.linkedin.com/in/mamolateli-mokhethi-86585327a/", - "email": "mamolatelimokhethi5@gmail.com" + "email": "mailto:mamolatelimokhethi5@gmail.com" }, { "name": "Mba Blessing Nnenna", @@ -1434,7 +1434,7 @@ "quote": "\"You have to get up and create the life you want", "github": "https://github.com/Blessing-Mba", "linkedin": "https://www.linkedin.com/in/blessing-mba-24a8a2184/", - "email": "blessingmba3@gmail.com" + "email": "mailto:blessingmba3@gmail.com" }, { "name": "Faith Adewuyi", @@ -1489,7 +1489,7 @@ "quote": "\"Well, nobody's perfect.\"
- Some Like It Hot", "github": "https://github.com/pariyahr", "linkedin": "https://www.linkedin.com/in/pariya-hajipour/", - "email": "pariyahajipour@gmail.com" + "email": "mailto:pariyahajipour@gmail.com" }, { "name": "Cephas Tokoli", @@ -1521,7 +1521,7 @@ "twitter": "https://twitter.com/kamanguKmg", "github": "https://github.com/KmgSamuel", "linkedin": "https://linkedin.com/in/kamangumaeti", - "email": "kamangusamuel152@gmail.com" + "email": "mailto:kamangusamuel152@gmail.com" }, { "name": "David Enikuomehin", @@ -1598,7 +1598,7 @@ "quote": "\"Success is not final; failure is not fatal: It is the courage to continue that counts..\"
- Said By Me", "github": "https://github.com/Silvia-Wachira", "linkedin": "https://www.linkedin.com/in/silvia-wachira", - "email": "mwachirasilvia8@gmail.com" + "email": "mailto:mwachirasilvia8@gmail.com" }, { "name": "Christian Gabi", @@ -1721,7 +1721,7 @@ "github": "https://github.com/GilbertKamau", "linkedin": "https://www.linkedin.com/in/gilbert-chris-a696151a9", "discord": "https://discord.com/channels/@me/957210257069850676", - "email": "gilbertchris062@gmail.com" + "email": "mailto:gilbertchris062@gmail.com" }, { "name": "Nathan Sodja", @@ -1813,7 +1813,7 @@ "profession": "Full Stack Developer", "quote": "Stay focused, stay coding!", "github": "https://github.com/StephenZAST", - "email": "contacteasytec@gmail.com" + "email": "mailto:contacteasytec@gmail.com" }, { "name": "Shiv Patle", From 9fb64cdce08bea17d25199a7fbe43879eee68f09 Mon Sep 17 00:00:00 2001 From: jeturgavli Date: Sun, 24 Aug 2025 10:09:40 -0700 Subject: [PATCH 7/9] validator.py update with new checks and reports added and cardDetails.json fix --- cardDetails.json | 31 ------------------- default_links_and_dublicate_links_report.txt | 0 ...fault_links_and_dublicate_links_report.txt | 30 ++++++++++++++++++ validator.py | 30 ++++++++++++++++-- 4 files changed, 57 insertions(+), 34 deletions(-) create mode 100644 default_links_and_dublicate_links_report.txt create mode 100644 reports/default_links_and_dublicate_links_report.txt diff --git a/cardDetails.json b/cardDetails.json index dbfc6d9..d135615 100644 --- a/cardDetails.json +++ b/cardDetails.json @@ -30,9 +30,6 @@ "name": "Naman Singh Rana", "profession": "Software Engineer || Beginner Open Source Contributor", "quote": "\"Rule no. 1 Do not touch it. If it works\"
- Said By Me", - "twitter": "https://twitter.com", - "dribbble": "https://dribbble.com", - "behance": "https://behance.com", "github": "https://github.com/namansinghrana", "linkedin": "https://www.linkedin.com/in/naman-singh-rana-a54842319/", "email": "mailto:namanr738@gmail.com" @@ -42,8 +39,6 @@ "profession": "Frontend Developer || Beginner Open Source Contributor", "quote": "\"Code is like humor. When you have to explain it, it's bad.\"
- Said By Cory House", "twitter": "https://twitter.com/mayur_b_tekale", - "dribbble": "https://github.com/mayurr7", - "behance": "https://github.com/mayurr7", "github": "https://github.com/mayurr7", "linkedin": "https://www.linkedin.com/in/mayur-tekale-1540a023b", "email": "mailto:mayurbtekale2020@gmail.com" @@ -71,7 +66,6 @@ "quote": "\"Early to bed, early to rise, makes a man young, wealthy and wise.\"
- Said by Benjamin Franklin", "twitter": "https://twitter.com/mo_chatr", "dribbble": "https://dribbble.com/cbag", - "behance": "https://behance.com", "github": "https://github.com/Mochatr", "linkedin": "https://www.linkedin.com/in/mochatr/", "email": "mailto:mohamedchatr8@gmail.com" @@ -107,9 +101,6 @@ "name": "Farzan Ullah", "profession": "Web Developer (Frontend & Backend)", "quote": "\"Gaming is Where reality meets limitless imagination\"
- Said By Me", - "twitter": "https://twitter.com", - "dribbble": "https://dribbble.com", - "behance": "https://behance.com", "github": "https://github.com/Farzan-Ullah", "linkedin": "https://linkedin.com/in/farzanofme", "email": "mailto:farzanullah07@gmail.com" @@ -251,8 +242,6 @@ "profession": "Frontend Developer", "quote": "He who sweats more in training, bleeds less in war", "twitter": "https://x.com/dubem_ob/", - "dribbble": "https://dribbble.com", - "behance": "https://behance.com", "github": "https://github.com/DubemObi/", "linkedin": "https://www.linkedin.com/in/chidubem-obinwanne-0a113819a/", "email": "mailto:dubemobiwon@gmail.com" @@ -262,8 +251,6 @@ "profession": "Software Engineer", "quote": "A good name is better than great riches", "twitter": "https://x.com/pauldanso12", - "dribbble": "https://dribbble.com", - "behance": "https://behance.com", "github": "https://github.com/colorwhite-git", "linkedin": "https://www.linkedin.com/in/paul-danso-asare/", "email": "mailto:pauldasare@gmail.com" @@ -599,9 +586,6 @@ "name": "Adarsh Sahu", "profession": "Student", "quote": "\"Stop thinking, Start doing\"
- Said By Me", - "twitter": "https://twitter.com", - "dribbble": "https://dribbble.com", - "behance": "https://behance.com", "github": "https://github.com/yaarAdarsh", "linkedin": "https://www.linkedin.com/in/adarsh-sahu-415475239/", "email": "mailto:addudx@gmail.com" @@ -653,16 +637,12 @@ "profession": "Software Engineer", "quote": "\"Be The Last Man Standing\"
- Said By Me", "github": "https://github.com/EslamAbdElhakem", - "linkedin": "https://linkedin.com", "email": "mailto:youremail@gmail.com" }, { "name": "Julius L. Jones Jr.", "profession": "Student", "quote": "\"Chopping wood, carrying water\"
- Said by Kyrie Irving", - "twitter": "https://twitter.com", - "dribbble": "https://dribbble.com", - "behance": "https://behance.com", "github": "https://github.com/jlwj22", "linkedin": "https://linkedin.com/in/juliusljonesjr", "email": "mailto:Juliuslwj22@gmail.com" @@ -671,9 +651,6 @@ "name": "FRANCK KASONGO", "profession": "Student", "quote": "\"Chopping wood, carrying water\"
- Said by Kyrie Irving", - "twitter": "https://twitter.com", - "dribbble": "https://dribbble.com", - "behance": "https://behance.com", "github": "https://github.com/Franckkasongo15/Franck-kasongo", "linkedin": "https://linkedin.com/in/franckkasongo15", "email": "mailto:franckkasongokalala@gmail.com" @@ -1043,7 +1020,6 @@ "quote": "\"If you don't fight, You can't win!\"
- Eren Yeager", "twitter": "https://twitter.com/WPerrang", "dribbble": "https://dribbble.com/Wes_Per", - "behance": "https://behance.com", "github": "https://github.com/Wesley-Perrang", "linkedin": "https://www.linkedin.com/in/wesley-perrang/", "email": "mailto:wes3perrang@gmail.com" @@ -1063,7 +1039,6 @@ "quote": "\" The only person you should be in competition with, is yourself. \"
- Unknown ", "twitter": "https://twitter.com/tega_zion", "github": "https://github.com/tegacodess", - "linkedin": "https://github.com/tegacodess", "email": "mailto:tegazion7@gmail.com" }, { @@ -1468,11 +1443,7 @@ "name": "Kit-Kat31415926", "profession": "Student", "quote": "\"Everything's science fiction until someone makes it science fact\" - Said By Marie Lu", - "twitter": "https://twitter.com", - "dribbble": "https://dribbble.com", - "behance": "https://behance.com", "github": "https://github.com/Kit-Kat31415926", - "linkedin": "https://linkedin.com", "email": "mailto:youremail@gmail.com" }, { @@ -1570,8 +1541,6 @@ "profession": "Software Engineer", "quote": "\"Be the change you wish to see in the world\"
- Mahatma Gandhi", "twitter": "https://twitter.com/cap_nemo1", - "dribbble": "https://dribbble.com", - "behance": "https://behance.com", "github": "https://github.com/maunga-et", "linkedin": "https://linkedin.com/in/emmanuel-maunga-7555b7182", "email": "mailto:tanyahmaunga274@gmail.com" diff --git a/default_links_and_dublicate_links_report.txt b/default_links_and_dublicate_links_report.txt new file mode 100644 index 0000000..e69de29 diff --git a/reports/default_links_and_dublicate_links_report.txt b/reports/default_links_and_dublicate_links_report.txt new file mode 100644 index 0000000..aa63c3e --- /dev/null +++ b/reports/default_links_and_dublicate_links_report.txt @@ -0,0 +1,30 @@ +⚠️ Warning in Entry 4 ('Naman Singh Rana') → Optional field 'twitter' has default value. Please remove or update this field. +⚠️ Warning in Entry 4 ('Naman Singh Rana') → Optional field 'dribbble' has default value. Please remove or update this field. +⚠️ Warning in Entry 4 ('Naman Singh Rana') → Optional field 'behance' has default value. Please remove or update this field. +🔴 Warning in Entry 5 ('Mayur Tekale') 🔴 Duplicate links found in optional fields. +⚠️ Warning in Entry 8 ('Mohamed CHATR') → Optional field 'behance' has default value. Please remove or update this field. +⚠️ Warning in Entry 12 ('Farzan Ullah') → Optional field 'twitter' has default value. Please remove or update this field. +⚠️ Warning in Entry 12 ('Farzan Ullah') → Optional field 'dribbble' has default value. Please remove or update this field. +⚠️ Warning in Entry 12 ('Farzan Ullah') → Optional field 'behance' has default value. Please remove or update this field. +⚠️ Warning in Entry 28 ('Dubem Obinwanne') → Optional field 'dribbble' has default value. Please remove or update this field. +⚠️ Warning in Entry 28 ('Dubem Obinwanne') → Optional field 'behance' has default value. Please remove or update this field. +⚠️ Warning in Entry 29 ('Paul Danso Asare') → Optional field 'dribbble' has default value. Please remove or update this field. +⚠️ Warning in Entry 29 ('Paul Danso Asare') → Optional field 'behance' has default value. Please remove or update this field. +⚠️ Warning in Entry 69 ('Adarsh Sahu') → Optional field 'twitter' has default value. Please remove or update this field. +⚠️ Warning in Entry 69 ('Adarsh Sahu') → Optional field 'dribbble' has default value. Please remove or update this field. +⚠️ Warning in Entry 69 ('Adarsh Sahu') → Optional field 'behance' has default value. Please remove or update this field. +⚠️ Warning in Entry 75 ('Eslam AbdElhakem') → Optional field 'linkedin' has default value. Please remove or update this field. +⚠️ Warning in Entry 76 ('Julius L. Jones Jr.') → Optional field 'twitter' has default value. Please remove or update this field. +⚠️ Warning in Entry 76 ('Julius L. Jones Jr.') → Optional field 'dribbble' has default value. Please remove or update this field. +⚠️ Warning in Entry 76 ('Julius L. Jones Jr.') → Optional field 'behance' has default value. Please remove or update this field. +⚠️ Warning in Entry 77 ('FRANCK KASONGO') → Optional field 'twitter' has default value. Please remove or update this field. +⚠️ Warning in Entry 77 ('FRANCK KASONGO') → Optional field 'dribbble' has default value. Please remove or update this field. +⚠️ Warning in Entry 77 ('FRANCK KASONGO') → Optional field 'behance' has default value. Please remove or update this field. +⚠️ Warning in Entry 119 ('Wesley Perrang') → Optional field 'behance' has default value. Please remove or update this field. +🔴 Warning in Entry 121 ('Ukpong O. Zion') 🔴 Duplicate links found in optional fields. +⚠️ Warning in Entry 168 ('Kit-Kat31415926') → Optional field 'twitter' has default value. Please remove or update this field. +⚠️ Warning in Entry 168 ('Kit-Kat31415926') → Optional field 'dribbble' has default value. Please remove or update this field. +⚠️ Warning in Entry 168 ('Kit-Kat31415926') → Optional field 'behance' has default value. Please remove or update this field. +⚠️ Warning in Entry 168 ('Kit-Kat31415926') → Optional field 'linkedin' has default value. Please remove or update this field. +⚠️ Warning in Entry 180 ('Emmanuel Maunga') → Optional field 'dribbble' has default value. Please remove or update this field. +⚠️ Warning in Entry 180 ('Emmanuel Maunga') → Optional field 'behance' has default value. Please remove or update this field. diff --git a/validator.py b/validator.py index 649fb02..63461fb 100644 --- a/validator.py +++ b/validator.py @@ -12,6 +12,14 @@ "github": "https://github.com" } +# Optional fields default values +OPTIONAL_DEFAULTS = { + "twitter": "https://twitter.com", + "dribbble": "https://dribbble.com", + "behance": "https://behance.com", + "linkedin": "https://linkedin.com" +} + def is_template_entry(card): """Check kare ki entry template hai ya nahi""" return all(card.get(k) == v for k, v in TEMPLATE_VALUES.items() if k in card) @@ -69,6 +77,22 @@ def validate_json(file_path): if email and not email.startswith("mailto:"): errors.append(f"⚠️ Warning in Entry {idx} ('{name}') → 'email' should start with 'mailto:'") has_error = True + + # Optional fields default value check (warning) + for field, default_val in OPTIONAL_DEFAULTS.items(): + value = card.get(field, "").strip() + if value and value == default_val: # sirf default URL pe warning + errors.append( + f"⚠️ Warning in Entry {idx} ('{name}') → Optional field '{field}' has default value. Please remove or update this field." + ) + has_error = True + + # Duplicate link check within entry (across all link fields) + link_fields = ["github", "linkedin", "twitter", "dribbble", "behance", "email"] + links = [card.get(f,"").strip().lower() for f in link_fields if card.get(f,"").strip()] + if len(links) != len(set(links)): + errors.append(f"🔴 Warning in Entry {idx} ('{name}') 🔴 Duplicate links found in optional fields.") + has_error = True # Add to valid list if no errors if not has_error: @@ -90,7 +114,7 @@ def validate_json(file_path): sys.exit(1) else: print("✅ JSON Validation Passed!") - print("👥 Valid Entries:") - for n in valid_names: - print(f" - {n}") + # print("👥 Valid Entries:") + # for n in valid_names: + # print(f" - {n}") sys.exit(0) From 857987223c63c59f0c836ef12dfe96e77568f558 Mon Sep 17 00:00:00 2001 From: jeturgavli Date: Sun, 24 Aug 2025 10:58:59 -0700 Subject: [PATCH 8/9] workflow added --- .github/workflows/json-check.yml | 61 ++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/json-check.yml diff --git a/.github/workflows/json-check.yml b/.github/workflows/json-check.yml new file mode 100644 index 0000000..9c126a9 --- /dev/null +++ b/.github/workflows/json-check.yml @@ -0,0 +1,61 @@ +name: JSON Validator + +on: + pull_request_target: + paths: + - "cardDetails.json" + push: + paths: + - "cardDetails.json" + +permissions: + contents: read + pull-requests: write + issues: write + +jobs: + validate-json: + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 # full history for forked PR + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Run JSON validator + id: validate + run: | + set -o pipefail + python validator.py cardDetails.json > result.log || echo "has_error=true" >> $GITHUB_ENV + + - name: Post error comment + if: env.has_error == 'true' + uses: actions/github-script@v7 + with: + script: | + const fs = require('fs'); + const errors = fs.readFileSync('result.log', 'utf8'); + github.rest.issues.createComment({ + issue_number: context.payload.pull_request.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "🚨 JSON Validation Failed:\n\n```\n" + errors + "\n```" + }); + + - name: Post success comment + if: env.has_error != 'true' + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.payload.pull_request.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "✅ JSON Validation Passed! 🌟⭐🌟🌟🌟 🙌" + }); From 637faec33e68f748e1807ff011648ae93b012234 Mon Sep 17 00:00:00 2001 From: kronpatel Date: Mon, 25 Aug 2025 01:36:25 +0530 Subject: [PATCH 9/9] Workflows Update --- .github/workflows/json-check.yml | 51 ++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/.github/workflows/json-check.yml b/.github/workflows/json-check.yml index 9c126a9..984c8f1 100644 --- a/.github/workflows/json-check.yml +++ b/.github/workflows/json-check.yml @@ -1,61 +1,66 @@ -name: JSON Validator +name: JSON Validator Bot on: pull_request_target: paths: - "cardDetails.json" - push: - paths: - - "cardDetails.json" permissions: contents: read pull-requests: write - issues: write jobs: validate-json: runs-on: ubuntu-latest steps: - - name: Checkout repo + - name: Checkout PR HEAD uses: actions/checkout@v4 with: + repository: ${{ github.event.pull_request.head.repo.full_name }} ref: ${{ github.event.pull_request.head.ref }} - fetch-depth: 0 # full history for forked PR + fetch-depth: 0 - - name: Setup Python + - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.x" - name: Run JSON validator - id: validate + id: validator run: | - set -o pipefail - python validator.py cardDetails.json > result.log || echo "has_error=true" >> $GITHUB_ENV + set +e + python validator.py cardDetails.json > result.log 2>&1 + echo "exit_code=$?" >> $GITHUB_OUTPUT + set -e - - name: Post error comment - if: env.has_error == 'true' + - name: Post validation comment (Fail) + if: steps.validator.outputs.exit_code != '0' uses: actions/github-script@v7 with: script: | - const fs = require('fs'); - const errors = fs.readFileSync('result.log', 'utf8'); - github.rest.issues.createComment({ - issue_number: context.payload.pull_request.number, + const fs = require("fs"); + const errors = fs.readFileSync("result.log", "utf8"); + await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, - body: "🚨 JSON Validation Failed:\n\n```\n" + errors + "\n```" + issue_number: context.issue.number, + body: "🚨 **JSON Validation Failed**\n\n```\n" + errors + "\n```" }); - - name: Post success comment - if: env.has_error != 'true' + - name: Post validation comment (Pass) + if: steps.validator.outputs.exit_code == '0' uses: actions/github-script@v7 with: script: | - github.rest.issues.createComment({ - issue_number: context.payload.pull_request.number, + const fs = require("fs"); + const success = fs.readFileSync("result.log", "utf8"); + await github.rest.issues.createComment({ owner: context.repo.owner, repo: context.repo.repo, - body: "✅ JSON Validation Passed! 🌟⭐🌟🌟🌟 🙌" + issue_number: context.issue.number, + body: "✅ **JSON Validation Passed!** 🎉\n\n```\n" + success + "\n```" }); + + - name: Fail job if validation failed + if: steps.validator.outputs.exit_code != '0' + run: exit 1 \ No newline at end of file