diff --git a/export.py b/export.py index 7ec3522..dd5c936 100644 --- a/export.py +++ b/export.py @@ -28,7 +28,7 @@ def export_to_csv(input_dir, output_csv, schema_file): # Write header based on the schema writer.writeheader() - for yaml_file in os.listdir(input_dir): + for yaml_file in sorted(os.listdir(input_dir)): if yaml_file.endswith(".yaml"): yaml_file_path = os.path.join(input_dir, yaml_file) with open(yaml_file_path, 'r') as file: @@ -43,7 +43,7 @@ def export_to_csv(input_dir, output_csv, schema_file): def convert_yaml_to_json(directory_path, key): data = {} - for file_name in os.listdir(directory_path): + for file_name in sorted(os.listdir(directory_path)): if file_name.endswith(".yaml"): file_path = os.path.join(directory_path, file_name) with open(file_path, 'r') as yaml_file: diff --git a/output/csv/brands.csv b/output/csv/brands.csv index 59498e9..68f81f9 100644 --- a/output/csv/brands.csv +++ b/output/csv/brands.csv @@ -1,13 +1,4 @@ id,name,description,status,reasons,countries,categories,website,logo_url,alternatives,alternatives_text,allOf -sabra,Sabra,"Sabra was an Isareli hummus company, and is now a joint venture between Pepsi and Strauss. Strauss is an Israeli food company.",avoid,operations_in_israel,,food,https://sabra.com/,,,Most hummus is not Israeli. Any non-Israeli hummus at your local grocery store is preferred over Sabra., -sodastream,SodaStream,"SodaStream has long been a BDS target due to their operation of factories on stolen land and their racial discrimination against Palestinian workers.[^1] - -[^1]: https://bdsmovement.net/Act-Now-Against-These-Companies-Profiting-From-Genocide",avoid,operations_in_israel,global,,https://sodastream.com/,https://upload.wikimedia.org/wikipedia/commons/thumb/6/63/Soda_Stream_Logo.svg/2560px-Soda_Stream_Logo.svg.png,drinkmate,, -puma,Puma,"The Palestinian BDS National Committee has called for a boycott of Puma[^1] for several reasons, including their -sponsorship of the Israeli Football Association (IFA), which includes teams in illegal settlements on occupied -Palestinian land. - -[^1]: https://bdsmovement.net/boycott-puma",avoid,operations_in_israel,global,,,,,, ahava,Ahava,"Ahava is an Israeli cosmetics company which operates its main manufacturing plant and showroom in Mitzpe Shalem, an illegal settlement in the West Bank.[^1] The Palestinian BDS National Committee has called for a boycott of Ahava.[^2] @@ -15,3 +6,12 @@ The Palestinian BDS National Committee has called for a boycott of Ahava.[^2] [^1]: https://en.wikipedia.org/wiki/Ahava [^2]: https://bdsmovement.net/Act-Now-Against-These-Companies-Profiting-From-Genocide",avoid,"operations_in_settlements, operations_in_israel",global,,https://www.ahava.com/,https://upload.wikimedia.org/wikipedia/commons/8/81/AhavaLogo.png,,, drinkmate,Drinkmate,Drinkmate offers sparkling water and soda makers (also known as soda machines).,neutral,,"us, ca, gb, eu, au, co, pe, ae, sa, jp, sg, tw",,https://idrinkproducts.com/,,,, +puma,Puma,"The Palestinian BDS National Committee has called for a boycott of Puma[^1] for several reasons, including their +sponsorship of the Israeli Football Association (IFA), which includes teams in illegal settlements on occupied +Palestinian land. + +[^1]: https://bdsmovement.net/boycott-puma",avoid,operations_in_israel,global,,,,,, +sabra,Sabra,"Sabra was an Isareli hummus company, and is now a joint venture between Pepsi and Strauss. Strauss is an Israeli food company.",avoid,operations_in_israel,,food,https://sabra.com/,,,Most hummus is not Israeli. Any non-Israeli hummus at your local grocery store is preferred over Sabra., +sodastream,SodaStream,"SodaStream has long been a BDS target due to their operation of factories on stolen land and their racial discrimination against Palestinian workers.[^1] + +[^1]: https://bdsmovement.net/Act-Now-Against-These-Companies-Profiting-From-Genocide",avoid,operations_in_israel,global,,https://sodastream.com/,https://upload.wikimedia.org/wikipedia/commons/thumb/6/63/Soda_Stream_Logo.svg/2560px-Soda_Stream_Logo.svg.png,drinkmate,, diff --git a/output/json/data.json b/output/json/data.json index 1dc5841..60b8388 100644 --- a/output/json/data.json +++ b/output/json/data.json @@ -1,5 +1,53 @@ { "brands": { + "ahava": { + "id": "ahava", + "name": "Ahava", + "status": "avoid", + "reasons": [ + "operations_in_settlements", + "operations_in_israel" + ], + "countries": [ + "global" + ], + "website": "https://www.ahava.com/", + "logo_url": "https://upload.wikimedia.org/wikipedia/commons/8/81/AhavaLogo.png", + "description": "Ahava is an Israeli cosmetics company which operates its main manufacturing plant and showroom in Mitzpe Shalem, \nan illegal settlement in the West Bank.[^1]\nThe Palestinian BDS National Committee has called for a boycott of Ahava.[^2]\n\n[^1]: https://en.wikipedia.org/wiki/Ahava\n[^2]: https://bdsmovement.net/Act-Now-Against-These-Companies-Profiting-From-Genocide" + }, + "drinkmate": { + "id": "drinkmate", + "name": "Drinkmate", + "status": "neutral", + "countries": [ + "us", + "ca", + "gb", + "eu", + "au", + "co", + "pe", + "ae", + "sa", + "jp", + "sg", + "tw" + ], + "website": "https://idrinkproducts.com/", + "description": "Drinkmate offers sparkling water and soda makers (also known as soda machines)." + }, + "puma": { + "id": "puma", + "name": "Puma", + "status": "avoid", + "reasons": [ + "operations_in_israel" + ], + "countries": [ + "global" + ], + "description": "The Palestinian BDS National Committee has called for a boycott of Puma[^1] for several reasons, including their \nsponsorship of the Israeli Football Association (IFA), which includes teams in illegal settlements on occupied \nPalestinian land.\n\n[^1]: https://bdsmovement.net/boycott-puma" + }, "sabra": { "id": "sabra", "name": "Sabra", @@ -54,54 +102,6 @@ "percent": 50 } ] - }, - "puma": { - "id": "puma", - "name": "Puma", - "status": "avoid", - "reasons": [ - "operations_in_israel" - ], - "countries": [ - "global" - ], - "description": "The Palestinian BDS National Committee has called for a boycott of Puma[^1] for several reasons, including their \nsponsorship of the Israeli Football Association (IFA), which includes teams in illegal settlements on occupied \nPalestinian land.\n\n[^1]: https://bdsmovement.net/boycott-puma" - }, - "ahava": { - "id": "ahava", - "name": "Ahava", - "status": "avoid", - "reasons": [ - "operations_in_settlements", - "operations_in_israel" - ], - "countries": [ - "global" - ], - "website": "https://www.ahava.com/", - "logo_url": "https://upload.wikimedia.org/wikipedia/commons/8/81/AhavaLogo.png", - "description": "Ahava is an Israeli cosmetics company which operates its main manufacturing plant and showroom in Mitzpe Shalem, \nan illegal settlement in the West Bank.[^1]\nThe Palestinian BDS National Committee has called for a boycott of Ahava.[^2]\n\n[^1]: https://en.wikipedia.org/wiki/Ahava\n[^2]: https://bdsmovement.net/Act-Now-Against-These-Companies-Profiting-From-Genocide" - }, - "drinkmate": { - "id": "drinkmate", - "name": "Drinkmate", - "status": "neutral", - "countries": [ - "us", - "ca", - "gb", - "eu", - "au", - "co", - "pe", - "ae", - "sa", - "jp", - "sg", - "tw" - ], - "website": "https://idrinkproducts.com/", - "description": "Drinkmate offers sparkling water and soda makers (also known as soda machines)." } }, "companies": {