From c88253baea3f4c1a26635c0f05e5d3330efd61d5 Mon Sep 17 00:00:00 2001 From: niclas Date: Tue, 12 Mar 2024 13:00:57 +0100 Subject: [PATCH] Add [synonyms] and fixed indivdual mistakes --- clusters/intelligence-agencies.json | 738 +++++++++++++++++- galaxies/intelligence-agencies.json | 2 +- tools/{WikipediaAPI => IntelAgencies}/main.py | 60 +- .../modules/__init__.py | 0 .../modules/api.py | 0 .../modules/intel.py | 0 tools/WikipediaAPI/lol.html | 0 7 files changed, 760 insertions(+), 40 deletions(-) rename tools/{WikipediaAPI => IntelAgencies}/main.py (58%) rename tools/{WikipediaAPI => IntelAgencies}/modules/__init__.py (100%) rename tools/{WikipediaAPI => IntelAgencies}/modules/api.py (100%) rename tools/{WikipediaAPI => IntelAgencies}/modules/intel.py (100%) delete mode 100644 tools/WikipediaAPI/lol.html diff --git a/clusters/intelligence-agencies.json b/clusters/intelligence-agencies.json index 7a7fc60..22bff46 100644 --- a/clusters/intelligence-agencies.json +++ b/clusters/intelligence-agencies.json @@ -2,7 +2,7 @@ "authors": "Wikipedia", "category": "Intelligence Agencies", "description": "List of intelligence agencies", - "name": "intelligence-agencies", + "name": "Intelligence Agencies", "source": "https://en.wikipedia.org/wiki/List_of_intelligence_agencies", "type": "intelligence-agency", "uuid": "3ef969e7-96cd-4048-aa83-191ac457d0db", @@ -13,6 +13,11 @@ "country": "Afghanistan", "refs": [ "https://en.wikipedia.org/wiki/General_Directorate_of_Intelligence" + ], + "synonyms": [ + [ + "د استخباراتو لوی ریاست" + ] ] }, "related": [], @@ -25,6 +30,11 @@ "country": "Albania", "refs": [ "https://en.wikipedia.org/wiki/National_Intelligence_Service_(Albania)" + ], + "synonyms": [ + [ + "Sherbimi Informativ Shteteror" + ] ] }, "related": [], @@ -157,6 +167,11 @@ "country": "Argentina", "refs": [ "https://en.wikipedia.org/wiki/Unidad_de_Inteligencia_Financiera_(Argentina)" + ], + "synonyms": [ + [ + "Unidad de Inteligencia Financiera" + ] ] }, "related": [], @@ -181,6 +196,11 @@ "country": "Argentina", "refs": [ "https://en.wikipedia.org/wiki/Servicio_de_Inteligencia_del_Ej%C3%A9rcito_(Argentina)" + ], + "synonyms": [ + [ + "Servicio de Inteligencia del Ejército" + ] ] }, "related": [], @@ -193,6 +213,11 @@ "country": "Argentina", "refs": [ "https://en.wikipedia.org/wiki/Servicio_de_Inteligencia_Naval_(Argentina)" + ], + "synonyms": [ + [ + "Servicio de Inteligencia Naval" + ] ] }, "related": [], @@ -205,6 +230,11 @@ "country": "Argentina", "refs": [ "https://en.wikipedia.org/wiki/Servicio_de_Inteligencia_de_la_Fuerza_A%C3%A9rea_(Argentina)" + ], + "synonyms": [ + [ + "Servicio de Inteligencia de la Fuerza Aérea" + ] ] }, "related": [], @@ -301,6 +331,11 @@ "country": "Austria", "refs": [ "https://en.wikipedia.org/wiki/Heeresnachrichtenamt" + ], + "synonyms": [ + [ + "Army Intelligence Office" + ] ] }, "related": [], @@ -313,6 +348,11 @@ "country": "Austria", "refs": [ "https://en.wikipedia.org/wiki/Ministry_of_Defence_(Austria)#Subordinate_departments" + ], + "synonyms": [ + [ + " Counter-Intelligence Office" + ] ] }, "related": [], @@ -976,6 +1016,114 @@ "uuid": "74f852e7-5f99-443e-8289-5a8ed357bf4f", "value": "United Front Work Department" }, + { + "description": "Intelligence Bureau of the General Staff aka 2nd Bureau", + "meta": { + "country": "People's Republic of China", + "refs": [ + "https://en.wikipedia.org/wiki/Joint_Staff_Department_of_the_Central_Military_Commission_Intelligence_Bureau" + ] + }, + "related": [], + "uuid": "39e95744-3e71-4fc9-845a-08ff5b31cbdc", + "value": "Joint Staff Department of the Central Military Commission Intelligence Bureau" + }, + { + "description": "People's Liberation Army Air Force (PLAAF)", + "meta": { + "country": "People's Republic of China", + "refs": [ + "https://en.wikipedia.org/wiki/People%27s_Liberation_Army_Air_Force" + ] + }, + "related": [], + "uuid": "b385f038-402e-4734-99a7-06f6556e028f", + "value": "People's Liberation Army Air Force" + }, + { + "description": "People's Liberation Army General Political Department (GND)", + "meta": { + "country": "People's Republic of China", + "refs": [ + "https://en.wikipedia.org/wiki/People%27s_Liberation_Army_General_Political_Department" + ] + }, + "related": [], + "uuid": "6f47d511-42ae-4c15-8819-4c04bb80094c", + "value": "People's Liberation Army General Political Department" + }, + { + "description": "People's Liberation Army General Staff Department (GSD)", + "meta": { + "country": "People's Republic of China", + "refs": [ + "https://en.wikipedia.org/wiki/People%27s_Liberation_Army_General_Staff_Department" + ] + }, + "related": [], + "uuid": "040e2361-729a-4e1f-a324-5d25cc211fac", + "value": "People's Liberation Army General Staff Department" + }, + { + "description": "PLA Unit 61398 aka APT 1", + "meta": { + "country": "People's Republic of China", + "refs": [ + "https://en.wikipedia.org/wiki/PLA_Unit_61398" + ] + }, + "related": [], + "uuid": "9717b3dc-643c-4a4a-8867-15eafa0424c8", + "value": "PLA Unit 61398" + }, + { + "description": "State Administration of Foreign Experts Affairs (SAFEA)", + "meta": { + "country": "People's Republic of China", + "refs": [ + "https://en.wikipedia.org/wiki/State_Administration_of_Foreign_Experts_Affairs" + ] + }, + "related": [], + "uuid": "233ac446-f908-4390-bfe9-d66a224bf107", + "value": "State Administration of Foreign Experts Affairs" + }, + { + "description": "Ministry of Public Security (MPS)", + "meta": { + "country": "People's Republic of China", + "refs": [ + "https://en.wikipedia.org/wiki/Ministry_of_Public_Security_(China)" + ] + }, + "related": [], + "uuid": "95fc3d5f-b783-45aa-890d-2a5e02ac0ff1", + "value": "Ministry of Public Security (China)" + }, + { + "description": "Ministry of State Security (MSS)", + "meta": { + "country": "People's Republic of China", + "refs": [ + "https://en.wikipedia.org/wiki/Ministry_of_State_Security_(China)" + ] + }, + "related": [], + "uuid": "a7bcaa50-dac6-4c9d-8ad0-9928c07a1071", + "value": "Ministry of State Security (China)" + }, + { + "description": "Office for Safeguarding National Security of the CPG in the HKSAR (CPGNSO)", + "meta": { + "country": "People's Republic of China", + "refs": [ + "https://en.wikipedia.org/wiki/Office_for_Safeguarding_National_Security_of_the_CPG_in_the_HKSAR" + ] + }, + "related": [], + "uuid": "07a0bd40-9674-4b75-b5c8-0bd99a86d393", + "value": "Office for Safeguarding National Security of the CPG in the HKSAR" + }, { "description": "Dirección Nacional de Inteligencia (DNI)", "meta": { @@ -1024,6 +1172,18 @@ "uuid": "131d3cf0-1715-42f6-b0cd-5b3cb18a77bf", "value": "Security and Intelligence Agency" }, + { + "description": "Vojna sigurnosno-obavještajna agencija (VSOA) (Military Security and Intelligence Agency)", + "meta": { + "country": "Croatia", + "refs": [ + "https://en.wikipedia.org/wiki/Vojna_sigurnosno-obavje%C5%A1tajna_agencija" + ] + }, + "related": [], + "uuid": "a2001f5d-fe87-415f-9012-596cd170ea6c", + "value": "Vojna sigurnosno-obavještajna agencija" + }, { "description": "Military Counterintelligence Directorate", "meta": { @@ -1036,6 +1196,18 @@ "uuid": "5887262d-eb15-4446-ba52-0598d60c3478", "value": "Dirección de Contra-Inteligencia Militar" }, + { + "description": "Dirección General de Inteligencia (DGI)", + "meta": { + "country": "Cuba", + "refs": [ + "https://en.wikipedia.org/wiki/Intelligence_Directorate" + ] + }, + "related": [], + "uuid": "19650ff1-b504-42fd-8e72-e8bd1f4bd3bc", + "value": "Intelligence Directorate" + }, { "description": "Cyprus Intelligence Service (CIS) (Κυπριακή Υπηρεσία Πληροφοριών)(ΚΥΠ), (former Central Intelligence Service-KYP)", "meta": { @@ -1174,6 +1346,11 @@ "country": "Estonia", "refs": [ "https://en.wikipedia.org/wiki/Estonian_Internal_Security_Service" + ], + "synonyms": [ + [ + "Kaitsepolitseiamet" + ] ] }, "related": [], @@ -1186,6 +1363,12 @@ "country": "Estonia", "refs": [ "https://en.wikipedia.org/wiki/Estonian_Foreign_Intelligence_Service" + ], + "synonyms": [ + [ + "VLA", + "Välisluureamet" + ] ] }, "related": [], @@ -1210,6 +1393,12 @@ "country": "Finland", "refs": [ "https://en.wikipedia.org/wiki/Finnish_Defence_Intelligence_Agency" + ], + "synonyms": [ + [ + "Puolustusvoimien tiedustelulaitos (PVTIEDL)", + "Försvarsmaktens underrättelsetjänst" + ] ] }, "related": [], @@ -1222,6 +1411,11 @@ "country": "Finland", "refs": [ "https://en.wikipedia.org/wiki/Intelligence_Division_(Finland)" + ], + "synonyms": [ + [ + "Pääesikunnan tiedusteluosasto (PE TIEDOS) / Huvudstabens underrättelseavdelning)" + ] ] }, "related": [], @@ -1234,6 +1428,11 @@ "country": "Finland", "refs": [ "https://en.wikipedia.org/wiki/Finnish_Security_Intelligence_Service" + ], + "synonyms": [ + [ + "Suojelupoliisi / Skyddspolisen" + ] ] }, "related": [], @@ -1246,6 +1445,11 @@ "country": "France", "refs": [ "https://en.wikipedia.org/wiki/National_Centre_for_Counter_Terrorism" + ], + "synonyms": [ + [ + "Coordination nationale du renseignement et de la lutte contre le terrorisme" + ] ] }, "related": [], @@ -1258,6 +1462,11 @@ "country": "France", "refs": [ "https://en.wikipedia.org/wiki/General_Directorate_for_Internal_Security" + ], + "synonyms": [ + [ + "Direction générale de la sécurité intérieure" + ] ] }, "related": [], @@ -1267,7 +1476,12 @@ { "description": "direction nationale du renseignement territorial (DNRT)", "meta": { - "country": "France" + "country": "France", + "synonyms": [ + [ + "direction nationale du renseignement territorial " + ] + ] }, "related": [], "uuid": "e3c6f868-95cb-4a3d-8f60-805dd38f9b08", @@ -1276,7 +1490,12 @@ { "description": "Sous-direction anti-terroriste (SDAT)", "meta": { - "country": "France" + "country": "France", + "synonyms": [ + [ + "Sous-direction anti-terroriste" + ] + ] }, "related": [], "uuid": "57d2a3a4-13fd-4923-bbe8-a3689203c38d", @@ -1288,6 +1507,11 @@ "country": "France", "refs": [ "https://en.wikipedia.org/wiki/Directorate-General_for_External_Security" + ], + "synonyms": [ + [ + "Direction générale de la sécurité extérieure" + ] ] }, "related": [], @@ -1300,6 +1524,11 @@ "country": "France", "refs": [ "https://en.wikipedia.org/wiki/DRSD" + ], + "synonyms": [ + [ + "Direction du Renseignement et de la Sécurité de la Défense" + ] ] }, "related": [], @@ -1343,37 +1572,16 @@ "value": "Direction Nationale du Renseignement et des Enquêtes Douanières" }, { - "description": "State Security Service (SSSG) − სახელმწიფო უშიშროების სამსახური", + "description": "State Intelligence Services (the Gambia) (SIS)", "meta": { "country": "Gambia", "refs": [ - "https://en.wikipedia.org/wiki/State_Security_Service_(Georgia)" + "https://en.wikipedia.org/wiki/State_Intelligence_Services_(the_Gambia)" ] }, "related": [], - "uuid": "079ca4ac-ce32-4c9d-8a50-d3222465007a", - "value": "State Security Service (Georgia)" - }, - { - "description": "Georgian Intelligence Service (GIS) − საქართველოს დაზვერვის სამსახური", - "meta": { - "country": "Gambia", - "refs": [ - "https://en.wikipedia.org/wiki/Georgian_Intelligence_Service" - ] - }, - "related": [], - "uuid": "58fb9521-6644-4e38-b989-a3f7f516087a", - "value": "Georgian Intelligence Service" - }, - { - "description": "Military Intelligence Department", - "meta": { - "country": "Gambia" - }, - "related": [], - "uuid": "c4a586c0-b722-4230-953e-027a27c7ba75", - "value": "Military Intelligence Department" + "uuid": "c4f143c4-f540-45be-9702-1bf52e2ad37d", + "value": "State Intelligence Services (the Gambia)" }, { "description": "State Security Service (SSSG) − სახელმწიფო უშიშროების სამსახური", @@ -1381,6 +1589,11 @@ "country": "Georgia", "refs": [ "https://en.wikipedia.org/wiki/State_Security_Service_(Georgia)" + ], + "synonyms": [ + [ + "სახელმწიფო უშიშროების სამსახური" + ] ] }, "related": [], @@ -1393,6 +1606,11 @@ "country": "Georgia", "refs": [ "https://en.wikipedia.org/wiki/Georgian_Intelligence_Service" + ], + "synonyms": [ + [ + "საქართველოს დაზვერვის სამსახური" + ] ] }, "related": [], @@ -1414,6 +1632,11 @@ "country": "Germany", "refs": [ "https://en.wikipedia.org/wiki/Bundesnachrichtendienst" + ], + "synonyms": [ + [ + "Federal Intelligence Service" + ] ] }, "related": [], @@ -1426,6 +1649,11 @@ "country": "Germany", "refs": [ "https://en.wikipedia.org/wiki/Bundesamt_f%C3%BCr_Verfassungsschutz" + ], + "synonyms": [ + [ + "Federal Office for the Protection of the Constitution" + ] ] }, "related": [], @@ -1447,7 +1675,12 @@ { "description": "Zentrum für Informations- und Kommunikationstechnik (IKTZ): Center for information and communication technology", "meta": { - "country": "Germany" + "country": "Germany", + "synonyms": [ + [ + "Center for information and communication technology" + ] + ] }, "related": [], "uuid": "01a5351d-ab56-4df7-b4d4-0f74e08559e6", @@ -1459,12 +1692,29 @@ "country": "Germany", "refs": [ "https://en.wikipedia.org/wiki/Milit%C3%A4rischer_Abschirmdienst" + ], + "synonyms": [ + [ + "Military Counterintelligence Service" + ] ] }, "related": [], "uuid": "15e320d8-a1a8-463a-95bd-13f61a9877ce", "value": "Militärischer Abschirmdienst" }, + { + "description": "Landesamt für Verfassungsschutz (LfV): (semi-independent) State Authority for the Protection of the Constitution for every single state", + "meta": { + "country": "Germany", + "refs": [ + "https://en.wikipedia.org/wiki/State_Authority_for_the_Protection_of_the_Constitution" + ] + }, + "related": [], + "uuid": "ebd84cf3-1fe4-469e-99ac-b53790584be8", + "value": "State Authority for the Protection of the Constitution" + }, { "description": "Bureau of National Investigations (BNI) – (Internal Intelligence Agency)", "meta": { @@ -1483,6 +1733,11 @@ "country": "Greece", "refs": [ "https://en.wikipedia.org/wiki/National_Intelligence_Service_(Greece)" + ], + "synonyms": [ + [ + "Εθνική Υπηρεσία Πληροφοριών" + ] ] }, "related": [], @@ -1696,12 +1951,65 @@ "uuid": "d5755ae3-fa64-4c91-928d-cb0e242f100b", "value": "Directorate General of GST Intelligence" }, + { + "description": "Directorate of Military Intelligence", + "meta": { + "country": "India", + "refs": [ + "https://en.wikipedia.org/wiki/Indian_Army" + ] + }, + "related": [], + "uuid": "991f5f53-1590-4b3f-af68-ff45ab27c778", + "value": "Indian Army" + }, + { + "description": "Directorate of Air Intelligence", + "meta": { + "country": "India", + "refs": [ + "https://en.wikipedia.org/wiki/Directorate_of_Air_Intelligence_(India)" + ] + }, + "related": [], + "uuid": "44e733b2-9433-4a53-8d42-a084c7ae6d8e", + "value": "Directorate of Air Intelligence (India)" + }, + { + "description": "Directorate of Naval Intelligence", + "meta": { + "country": "India", + "refs": [ + "https://en.wikipedia.org/wiki/Directorate_of_Naval_Intelligence_(India)" + ] + }, + "related": [], + "uuid": "88a19900-582b-4b17-ad8b-c3d0edf77f72", + "value": "Directorate of Naval Intelligence (India)" + }, + { + "description": "Joint Cipher Bureau", + "meta": { + "country": "India", + "refs": [ + "https://en.wikipedia.org/wiki/Joint_Cipher_Bureau" + ] + }, + "related": [], + "uuid": "82e2e69a-b522-44fc-95ee-f625f7882648", + "value": "Joint Cipher Bureau" + }, { "description": "State Intelligence Agency (BIN) – Badan Intelijen Negara", "meta": { "country": "Indonesia", "refs": [ "https://en.wikipedia.org/wiki/State_Intelligence_Agency_(Indonesia)" + ], + "synonyms": [ + [ + "Badan Intelijen Negara" + ] ] }, "related": [], @@ -1714,6 +2022,11 @@ "country": "Indonesia", "refs": [ "https://en.wikipedia.org/wiki/Indonesian_Strategic_Intelligence_Agency" + ], + "synonyms": [ + [ + "Badan Intelijen Strategis Tentara Nasional Indonesia" + ] ] }, "related": [], @@ -1726,6 +2039,11 @@ "country": "Indonesia", "refs": [ "https://en.wikipedia.org/wiki/Indonesian_Army_Intelligence_Centre" + ], + "synonyms": [ + [ + "Pusat Intelijen Tentara Nasional Indonesia Angkatan Darat" + ] ] }, "related": [], @@ -1738,6 +2056,11 @@ "country": "Indonesia", "refs": [ "https://en.wikipedia.org/wiki/National_Cyber_and_Crypto_Agency" + ], + "synonyms": [ + [ + "Badan Siber dan Sandi Negara" + ] ] }, "related": [], @@ -1750,6 +2073,11 @@ "country": "Indonesia", "refs": [ "https://en.wikipedia.org/wiki/Attorney_General%27s_Office_of_Indonesia" + ], + "synonyms": [ + [ + "Jaksa Agung Muda Bidang Intelijen Kejaksaan Agung" + ] ] }, "related": [], @@ -1762,6 +2090,11 @@ "country": "Indonesia", "refs": [ "https://en.wikipedia.org/wiki/Directorate_General_of_Immigration_(Indonesia)" + ], + "synonyms": [ + [ + "Direktorat Intelijen Imigrasi" + ] ] }, "related": [], @@ -1774,6 +2107,11 @@ "country": "Indonesia", "refs": [ "https://en.wikipedia.org/wiki/National_Anti-Narcotics_Agency_(Indonesia)" + ], + "synonyms": [ + [ + "Seksi Intelijen Badan Narkotika Nasional" + ] ] }, "related": [], @@ -1786,6 +2124,11 @@ "country": "Indonesia", "refs": [ "https://en.wikipedia.orghttps://id.wikipedia.org/wiki/Badan_Intelijen_dan_Keamanan_Kepolisian_Negara_Republik_Indonesia" + ], + "synonyms": [ + [ + "Badan Intelijen dan Keamanan Kepolisian Negara Republik Indonesia" + ] ] }, "related": [], @@ -1798,6 +2141,11 @@ "country": "Indonesia", "refs": [ "https://en.wikipedia.org/wiki/Directorate_General_of_Customs_and_Excise_(Indonesia)" + ], + "synonyms": [ + [ + "Sub-Direktorat Intelijen Direktorat Jenderal Bea Cukai" + ] ] }, "related": [], @@ -1810,6 +2158,11 @@ "country": "Indonesia", "refs": [ "https://en.wikipedia.org/wiki/Indonesian_Financial_Transaction_Reports_and_Analysis_Center" + ], + "synonyms": [ + [ + "Pusat Pelaporan dan Analisis Transaksi Keuangan" + ] ] }, "related": [], @@ -1828,6 +2181,66 @@ "uuid": "ef2b6fc1-fabc-4935-999b-bb169f29f58d", "value": "Ministry of Intelligence (Iran)" }, + { + "description": "Oghab 2 – Nuclear facilities security", + "meta": { + "country": "Iran", + "refs": [ + "https://en.wikipedia.org/wiki/Oghab_2" + ] + }, + "related": [], + "uuid": "e917bd9e-9794-4cf3-b203-2cb559c9a7a5", + "value": "Oghab 2" + }, + { + "description": "Council for Intelligence Coordination", + "meta": { + "country": "Iran", + "refs": [ + "https://en.wikipedia.org/wiki/Council_for_Intelligence_Coordination" + ] + }, + "related": [], + "uuid": "0b95346f-297b-49bb-a306-b45c3300de19", + "value": "Council for Intelligence Coordination" + }, + { + "description": "Intelligence Protection Organization of Iranian Army (SAHEFAJA)", + "meta": { + "country": "Iran", + "refs": [ + "https://en.wikipedia.org/wiki/Intelligence_Protection_Organization_of_Islamic_Republic_of_Iran_Army" + ] + }, + "related": [], + "uuid": "8d6458c0-e176-45d1-a485-048a4c63b223", + "value": "Intelligence Protection Organization of Islamic Republic of Iran Army" + }, + { + "description": "Intelligence Organization of IRGC", + "meta": { + "country": "Iran", + "refs": [ + "https://en.wikipedia.org/wiki/Intelligence_Organization_of_Army_of_the_Guardians_of_the_Islamic_Revolution" + ] + }, + "related": [], + "uuid": "9ccf2e94-f9f3-471e-8093-a0c121fdc951", + "value": "Intelligence Organization of Army of the Guardians of the Islamic Revolution" + }, + { + "description": "Intelligence Protection Organization of IRGC (SAHEFASA)", + "meta": { + "country": "Iran", + "refs": [ + "https://en.wikipedia.org/wiki/Intelligence_Protection_Organization_of_Army_of_the_Guardians_of_the_Islamic_Revolution" + ] + }, + "related": [], + "uuid": "de19ebae-680b-4d8f-a941-68fa0b63c01c", + "value": "Intelligence Protection Organization of Army of the Guardians of the Islamic Revolution" + }, { "description": "General Security Directorate - (GSD) - (Internal security agency)", "meta": { @@ -1909,6 +2322,42 @@ "uuid": "ed89af3e-8773-4a0d-8b3a-6303d3ab109d", "value": "CIS Corps (Ireland)" }, + { + "description": "Special Detective Unit (SDU)", + "meta": { + "country": "Ireland", + "refs": [ + "https://en.wikipedia.org/wiki/Special_Detective_Unit" + ] + }, + "related": [], + "uuid": "53488665-5b23-48fb-b0e7-0eaf0a345582", + "value": "Special Detective Unit" + }, + { + "description": "National Surveillance Unit (NSU)", + "meta": { + "country": "Ireland", + "refs": [ + "https://en.wikipedia.org/wiki/Garda_National_Surveillance_Unit" + ] + }, + "related": [], + "uuid": "7a5bc669-f813-4e4d-ba07-2ea77d7fe5df", + "value": "Garda National Surveillance Unit" + }, + { + "description": "Financial Intelligence Unit (FIU)", + "meta": { + "country": "Ireland", + "refs": [ + "https://en.wikipedia.org/wiki/National_Economic_Crime_Bureau" + ] + }, + "related": [], + "uuid": "ccb04eaa-ff69-4f20-be2a-b75805c3ffc6", + "value": "National Economic Crime Bureau" + }, { "description": "Mossad (Foreign Intelligence and Special Operations)", "meta": { @@ -2488,6 +2937,11 @@ "country": "Netherlands", "refs": [ "https://en.wikipedia.org/wiki/National_Coordinator_for_Counterterrorism_and_Security" + ], + "synonyms": [ + [ + "Nationaal Coördinator Terrorismebestrijding en Veiligheid" + ] ] }, "related": [], @@ -2614,6 +3068,11 @@ "country": "North Macedonia", "refs": [ "https://en.wikipedia.org/wiki/Administration_for_Security_and_Counterintelligence" + ], + "synonyms": [ + [ + "Uprava za bezbednost i kontrarazuznavanje" + ] ] }, "related": [], @@ -2626,6 +3085,11 @@ "country": "North Macedonia", "refs": [ "https://en.wikipedia.org/wiki/Intelligence_Agency_of_North_Macedonia" + ], + "synonyms": [ + [ + "Agencija za Razuznavanje" + ] ] }, "related": [], @@ -2638,6 +3102,11 @@ "country": "North Macedonia", "refs": [ "https://en.wikipedia.org/wiki/Military_Service_for_Security_and_Intelligence" + ], + "synonyms": [ + [ + "Voena služba za razuznuvanje i bezbednost" + ] ] }, "related": [], @@ -2998,6 +3467,11 @@ "country": "Philippines", "refs": [ "https://en.wikipedia.org/wiki/National_Intelligence_Coordinating_Agency" + ], + "synonyms": [ + [ + "Pambansang Ahensiya sa Ugnayang Intelihensiya" + ] ] }, "related": [], @@ -3010,6 +3484,11 @@ "country": "Philippines", "refs": [ "https://en.wikipedia.org/wiki/National_Bureau_of_Investigation_(Philippines)" + ], + "synonyms": [ + [ + "Pambansang Kawanihan ng Pagsisiyasat" + ] ] }, "related": [], @@ -3130,6 +3609,11 @@ "country": "Romania", "refs": [ "https://en.wikipedia.org/wiki/Romanian_Intelligence_Service" + ], + "synonyms": [ + [ + "Serviciul Român de Informații" + ] ] }, "related": [], @@ -3142,6 +3626,11 @@ "country": "Romania", "refs": [ "https://en.wikipedia.org/wiki/Foreign_Intelligence_Service_(Romania)" + ], + "synonyms": [ + [ + "Serviciul de Informații Externe" + ] ] }, "related": [], @@ -3178,6 +3667,11 @@ "country": "Romania", "refs": [ "https://en.wikipedia.org/wiki/Direc%C8%9Bia_General%C4%83_de_Informa%C8%9Bii_%C8%99i_Protec%C8%9Bie_Intern%C4%83" + ], + "synonyms": [ + [ + "Direcția Generală de Protecție Internă" + ] ] }, "related": [], @@ -3190,6 +3684,11 @@ "country": "Russia", "refs": [ "https://en.wikipedia.org/wiki/Federal_Security_Service_(Russia)" + ], + "synonyms": [ + [ + "Федеральная служба безопасности" + ] ] }, "related": [], @@ -3202,6 +3701,11 @@ "country": "Russia", "refs": [ "https://en.wikipedia.org/wiki/Main_Directorate_of_Special_Programs_of_the_President_of_the_Russian_Federation" + ], + "synonyms": [ + [ + "Главное управление специальных программ Президента Российской Федерации" + ] ] }, "related": [], @@ -3214,6 +3718,11 @@ "country": "Russia", "refs": [ "https://en.wikipedia.org/wiki/Foreign_Intelligence_Service_(Russia)" + ], + "synonyms": [ + [ + "Служба Внешней Разведки" + ] ] }, "related": [], @@ -3226,6 +3735,11 @@ "country": "Russia", "refs": [ "https://en.wikipedia.org/wiki/GRU_(Russian_Federation)" + ], + "synonyms": [ + [ + "Главное Разведывательное Управление" + ] ] }, "related": [], @@ -3238,6 +3752,11 @@ "country": "Russia", "refs": [ "https://en.wikipedia.org/wiki/Special_Communications_Service_of_Russia" + ], + "synonyms": [ + [ + "Служба специальной связи и информации" + ] ] }, "related": [], @@ -3328,6 +3847,30 @@ "uuid": "4939b946-5d04-4f35-a766-c4ab67681367", "value": "Security Intelligence Agency" }, + { + "description": "Military Security Agency – Војнобезбедносна агенција (VBA)", + "meta": { + "country": "Serbia", + "refs": [ + "https://en.wikipedia.org/wiki/Military_Security_Agency_(Serbia)" + ] + }, + "related": [], + "uuid": "e9e97ef7-57d1-4685-9bcf-b78a238c67dc", + "value": "Military Security Agency (Serbia)" + }, + { + "description": "Military Intelligence Agency – Војнообавештајна агенција (VOA)", + "meta": { + "country": "Serbia", + "refs": [ + "https://en.wikipedia.org/wiki/Vojnoobave%C5%A1tajna_agencija" + ] + }, + "related": [], + "uuid": "e0473e43-8a6c-4905-8653-64c728a6cdf8", + "value": "Vojnoobaveštajna agencija" + }, { "description": "Security and Intelligence Division (SID)", "meta": { @@ -3340,6 +3883,18 @@ "uuid": "81380bf5-5f76-4194-9094-2a1c79d8aca8", "value": "Security and Intelligence Division" }, + { + "description": "Internal Security Department (ISD)", + "meta": { + "country": "Singapore", + "refs": [ + "https://en.wikipedia.org/wiki/Internal_Security_Department_(Singapore)" + ] + }, + "related": [], + "uuid": "29dd7be6-d033-496e-b0f1-d4c4d42fb36d", + "value": "Internal Security Department (Singapore)" + }, { "description": "Slovak Information Service - Slovenská informačná služba (SIS)", "meta": { @@ -4315,6 +4870,126 @@ "uuid": "bdb3dfbb-b9f1-4de1-a02f-7508f26d5732", "value": "Joint Intelligence Organisation (United Kingdom)" }, + { + "description": "Security Service/MI5[33] – Domestic counter terrorism and counter espionage intelligence gathering and analysis.", + "meta": { + "country": "United Kingdom", + "refs": [ + "https://en.wikipedia.org/wiki/MI5" + ] + }, + "related": [], + "uuid": "dc15daf1-094b-4518-95d7-03e12f3cc943", + "value": "MI5" + }, + { + "description": "Office for Security and Counter-Terrorism (OSCT) – Counter terrorism and protecting critical national infrastructure.", + "meta": { + "country": "United Kingdom", + "refs": [ + "https://en.wikipedia.org/wiki/Office_for_Security_and_Counter-Terrorism" + ] + }, + "related": [], + "uuid": "1c889b6d-f80c-4a3b-be5f-d1e883eb3aba", + "value": "Office for Security and Counter-Terrorism" + }, + { + "description": "National Domestic Extremism and Disorder Intelligence Unit (NDEDIU)[34] – Domestic counter extremism and public disorder intelligence gathering and analysis.", + "meta": { + "country": "United Kingdom", + "refs": [ + "https://en.wikipedia.org/wiki/National_Domestic_Extremism_and_Disorder_Intelligence_Unit" + ] + }, + "related": [], + "uuid": "e8b27508-7540-442f-98d3-d68966d117d1", + "value": "National Domestic Extremism and Disorder Intelligence Unit" + }, + { + "description": "National Ballistics Intelligence Service (NBIS)[35] – Illegal firearms intelligence analysis.", + "meta": { + "country": "United Kingdom", + "refs": [ + "https://en.wikipedia.org/wiki/National_Ballistics_Intelligence_Service" + ] + }, + "related": [], + "uuid": "2bcd1e13-a1c1-4b12-82a7-5dfe8fcdfef0", + "value": "National Ballistics Intelligence Service" + }, + { + "description": "National Fraud Intelligence Bureau (NFIB)[36] – Economic crime intelligence gathering and analysis.", + "meta": { + "country": "United Kingdom", + "refs": [ + "https://en.wikipedia.org/wiki/National_Fraud_Intelligence_Bureau" + ] + }, + "related": [], + "uuid": "650ff541-7c93-4805-9922-d551a08aab7a", + "value": "National Fraud Intelligence Bureau" + }, + { + "description": "Secret Intelligence Service (SIS)/MI6[37] – Foreign intelligence gathering and analysis.", + "meta": { + "country": "United Kingdom", + "refs": [ + "https://en.wikipedia.org/wiki/Secret_Intelligence_Service" + ] + }, + "related": [], + "uuid": "8a4185a9-2654-4cbf-a8cc-9478c9192f5d", + "value": "Secret Intelligence Service" + }, + { + "description": "Defence Intelligence (DI)[38] – Military intelligence analysis.", + "meta": { + "country": "United Kingdom", + "refs": [ + "https://en.wikipedia.org/wiki/Defence_Intelligence" + ] + }, + "related": [], + "uuid": "15e74221-b244-4c97-8b0b-ff09b59fc5e9", + "value": "Defence Intelligence" + }, + { + "description": "Government Communications Headquarters (GCHQ)[39] – Signals intelligence gathering and analysis.", + "meta": { + "country": "United Kingdom", + "refs": [ + "https://en.wikipedia.org/wiki/Government_Communications_Headquarters" + ] + }, + "related": [], + "uuid": "cf3f7d8a-0571-4b45-99a9-80bbecf7aa24", + "value": "Government Communications Headquarters" + }, + { + "description": "National Crime Agency (NCA)[40] – Organised crime intelligence gathering and analysis. Agency utilizes Unexplained wealth orders and the Investigatory Powers Act 2016.[41][42] NCA officers are posted overseas in around 50 countries.[43] They operate the UK Protected Persons Service, which includes witness protection.[44]", + "meta": { + "country": "United Kingdom", + "refs": [ + "https://en.wikipedia.org/wiki/National_Crime_Agency" + ] + }, + "related": [], + "uuid": "2ef0d454-2e23-47f9-b728-0138b1f5cc17", + "value": "National Crime Agency" + }, + { + "description": "Gangmasters and Labour Abuse Authority - Human trafficking, slavery, economic, and serious organised crime.", + "meta": { + "country": "United Kingdom", + "refs": [ + "https://en.wikipedia.org/wiki/Gangmasters_and_Labour_Abuse_Authority" + ] + }, + "related": [], + "uuid": "d4bfd128-1047-4604-8d29-f9c8fdece736", + "value": "Gangmasters and Labour Abuse Authority" + }, { "description": "Office of the Director of National Intelligence (ODNI)", "meta": { @@ -4537,6 +5212,11 @@ "country": "Uruguay", "refs": [ "https://en.wikipedia.orghttps://es.wikipedia.org/wiki/Secretar%C3%ADa_de_Inteligencia_Estrat%C3%A9gica_de_Estado" + ], + "synonyms": [ + [ + "Secretaría de Inteligencia Estratégica de Estado" + ] ] }, "related": [], diff --git a/galaxies/intelligence-agencies.json b/galaxies/intelligence-agencies.json index f7e83a2..6c53e48 100644 --- a/galaxies/intelligence-agencies.json +++ b/galaxies/intelligence-agencies.json @@ -1,7 +1,7 @@ { "description": "List of intelligence agencies", "icon": "ninja", - "name": "intelligence-agencies", + "name": "Intelligence Agencies", "namespace": "intelligence-agency", "type": "intelligence-agency", "uuid": "3ef969e7-96cd-4048-aa83-191ac457d0db", diff --git a/tools/WikipediaAPI/main.py b/tools/IntelAgencies/main.py similarity index 58% rename from tools/WikipediaAPI/main.py rename to tools/IntelAgencies/main.py index e0f1598..8f095cb 100644 --- a/tools/WikipediaAPI/main.py +++ b/tools/IntelAgencies/main.py @@ -28,29 +28,68 @@ def get_notes_on_lower_level(content): if li.find('ul'): notes.extend(get_notes_on_lower_level(li.find('ul'))) else: + + if li.text in ["Islamic Republic of Iran Army:", "Islamic Revolutionary Guard Corps:", "FARAJA", "Judicial system of the Islamic Republic of Iran", "Intelligence [12]", "Intelligence org"]: # These are not intelligence agencies but Iran's entry is broken + continue + a_tag = li.find('a') title = li.text link_href = None description = li.text + i_tag = li.find_all('i') + synonyms = [i.text for i in i_tag] + if a_tag: title = a_tag.get('title', description) if a_tag.has_attr('href'): link_href = f'{WIKIPEDIA_URL}{a_tag["href"]}' - notes.append((title, link_href, description, None)) + if len(synonyms) == 0 or synonyms[0] == title: + synonyms = None + + notes.append((title, link_href, description, synonyms)) return notes def get_agencies_from_country(heading, current_country, uuids): agencies = [] - content = heading.find_next('ul') - agency_names = get_notes_on_lower_level(content) - for name, links, description, synonyms in agency_names: - if uuids and name in uuids: - agencies.append(IntelAgency(value=name, uuid=uuids[name], meta=Meta(country=current_country, refs=[links]), description=description)) - else: - agencies.append(IntelAgency(value=name, meta=Meta(country=current_country, refs=[links]), uuid=str(uuid.uuid4()), description=description)) + contents = [] + if current_country != "Gambia": # Gambia has a mistake on the wikipedia page + contents.append(heading.find_next('ul')) + else: + soup = BeautifulSoup(str(heading), 'html.parser') + ul_tag = soup.new_tag('ul') + li_tag = soup.new_tag('li') + a_tag = heading.find_next('p').find('a') + li_tag.append(a_tag) + ul_tag.append(li_tag) + contents.append(ul_tag) + + current_content = contents[0] + while True: + next_sibling = current_content.find_next_sibling() + + if next_sibling is None or next_sibling.name == 'h2': + break + + if current_country == "Bahamas" and next_sibling.name == 'h2': # Bahamas has a mistake on the wikipedia page + current_country = None + continue + + if next_sibling.name == 'ul': + contents.append(next_sibling) + + current_content = next_sibling + + for content in contents: + agency_names = get_notes_on_lower_level(content) + for name, links, description, synonyms in agency_names: + if uuids and name in uuids: + agencies.append(IntelAgency(value=name, uuid=uuids[name], meta=Meta(country=current_country, refs=[links], synonyms=[synonyms]), description=description)) + else: + agencies.append(IntelAgency(value=name, meta=Meta(country=current_country, refs=[links], synonyms=[synonyms]), uuid=str(uuid.uuid4()), description=description)) + return agencies def extract_info(content, uuids): @@ -71,6 +110,7 @@ if __name__ == '__main__': wiki = WikipediaAPI() page_title = 'List of intelligence agencies' content = wiki.get_page_html(page_title) + # print(content) uuids = get_UUIDs() if content and uuids: agencies = extract_info(content, uuids) @@ -84,7 +124,7 @@ if __name__ == '__main__': galaxy = Galaxy( description="List of intelligence agencies", icon="ninja", - name="intelligence-agencies", + name="Intelligence Agencies", namespace="intelligence-agency", type="intelligence-agency", uuid=UUID, @@ -96,7 +136,7 @@ if __name__ == '__main__': authors="Wikipedia", category="Intelligence Agencies", description="List of intelligence agencies", - name="intelligence-agencies", + name="Intelligence Agencies", source="https://en.wikipedia.org/wiki/List_of_intelligence_agencies", type="intelligence-agency", uuid=UUID, diff --git a/tools/WikipediaAPI/modules/__init__.py b/tools/IntelAgencies/modules/__init__.py similarity index 100% rename from tools/WikipediaAPI/modules/__init__.py rename to tools/IntelAgencies/modules/__init__.py diff --git a/tools/WikipediaAPI/modules/api.py b/tools/IntelAgencies/modules/api.py similarity index 100% rename from tools/WikipediaAPI/modules/api.py rename to tools/IntelAgencies/modules/api.py diff --git a/tools/WikipediaAPI/modules/intel.py b/tools/IntelAgencies/modules/intel.py similarity index 100% rename from tools/WikipediaAPI/modules/intel.py rename to tools/IntelAgencies/modules/intel.py diff --git a/tools/WikipediaAPI/lol.html b/tools/WikipediaAPI/lol.html deleted file mode 100644 index e69de29..0000000