Skip to content

Commit

Permalink
refactor: Make all requiresCategory fields an array
Browse files Browse the repository at this point in the history
  • Loading branch information
mlec1 committed Jun 24, 2024
1 parent 8444457 commit 44d102b
Show file tree
Hide file tree
Showing 24 changed files with 271 additions and 84 deletions.
19 changes: 19 additions & 0 deletions clean.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from pathlib import Path
import json

for file in Path("./src/technologies/").iterdir():
print(file)
with Path(file).open(encoding="utf-8") as f:
content = json.loads(f.read())

new_dict = dict()

for techno, fields in content.items():
if "requiresCategory" in fields and isinstance(fields["requiresCategory"], int):
# print(fields["requiresCategory"])
fields["requiresCategory"] = list([fields["requiresCategory"]])

new_dict[techno] = fields

with open(file, "w", encoding="utf-8") as f:
json.dump(new_dict, f, indent=2, ensure_ascii=False)
20 changes: 15 additions & 5 deletions src/technologies/a.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@
],
"description": "APC offers door-to-door parcel and mail delivery.",
"icon": "APC.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\APC\\b"
],
Expand Down Expand Up @@ -2103,7 +2105,9 @@
"afterpay_product": "",
"checkout.enabledpayments.afterpay": "^true$"
},
"requiresCategory": 6,
"requiresCategory": [
6
],
"saas": true,
"scriptSrc": [
"portal\\.afterpay\\.com",
Expand Down Expand Up @@ -4636,7 +4640,9 @@
],
"description": "Asendia is an international mail joint venture of French La Poste and Swiss Post.",
"icon": "Asendia.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\Asendia\\b"
],
Expand Down Expand Up @@ -5010,7 +5016,9 @@
"low",
"recurring"
],
"requiresCategory": 6,
"requiresCategory": [
6
],
"saas": true,
"website": "https://aument.io"
},
Expand Down Expand Up @@ -5067,7 +5075,9 @@
],
"description": "Australia Post is the government business enterprise that provides postal services in Australia.",
"icon": "AusPost.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bAusPost\\b",
"\\bAustralia Post\\b"
Expand Down
24 changes: 18 additions & 6 deletions src/technologies/b.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
],
"description": "B2C Europe offers logistic solutions for your ecommerce businesses.",
"icon": "B2C Europe.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bB2C Europe\\b"
],
Expand Down Expand Up @@ -82,7 +84,9 @@
],
"description": "BRT, also known as Bartolini, is an Italian-based logistics service provider.",
"icon": "BRT.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bBRT\\b"
],
Expand Down Expand Up @@ -930,7 +934,9 @@
],
"description": "Billbee is an order processing and inventory management solution.",
"icon": "Billbee.png",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bBillbee\\b"
],
Expand Down Expand Up @@ -2326,7 +2332,9 @@
],
"description": "Boxtal is a cloud-based multi-carrier shipping solution.",
"icon": "Boxtal.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bBoxtal\\b"
],
Expand All @@ -2338,7 +2346,9 @@
],
"description": "Bpost, also known as the Belgian Post Group, is the Belgian company responsible for the delivery of national and international mail.",
"icon": "Bpost.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bBpost\\b"
],
Expand Down Expand Up @@ -2814,7 +2824,9 @@
],
"description": "Budbee is a tech company that operates a logistics service for ecommerce.",
"icon": "Budbee.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bBudbee\\b"
],
Expand Down
52 changes: 39 additions & 13 deletions src/technologies/c.json
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@
],
"description": "CTT operates as the national postal service of Portugal.",
"icon": "CTT.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bTourline Express\\b",
"\\bCTT\\b"
Expand Down Expand Up @@ -1005,7 +1007,9 @@
],
"description": "Celeritas offers transportation logistics services for package deliveries.",
"icon": "Celeritas.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bCeleritas\\b"
],
Expand Down Expand Up @@ -1235,7 +1239,9 @@
"mid",
"recurring"
],
"requiresCategory": 6,
"requiresCategory": [
6
],
"saas": true,
"website": "https://www.channelape.com",
"xhr": "\\.channelape\\.com"
Expand Down Expand Up @@ -1686,7 +1692,9 @@
],
"description": "Chronofresh is an express transport service for food products.",
"icon": "Chronopost.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bChronofresh\\b"
],
Expand All @@ -1698,7 +1706,9 @@
],
"description": "Chronopost provides a domestic and international express shipping and delivery service.",
"icon": "Chronopost.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bChronopost\\b"
],
Expand Down Expand Up @@ -1795,7 +1805,9 @@
],
"description": "CityMail is a private postal organisation operating in Sweden.",
"icon": "CityMail.png",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bCitymail\\b"
],
Expand Down Expand Up @@ -2930,7 +2942,9 @@
],
"description": "Colis Privé is a private parcel delivery service provider specialised in last-mile delivery.",
"icon": "Colis Prive.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bColis Priv[eé]\\b"
],
Expand All @@ -2942,7 +2956,9 @@
],
"description": "Colissimo is a 'drop off' parcel delivery service.",
"icon": "DPD.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bColissimo\\b"
],
Expand Down Expand Up @@ -3378,7 +3394,9 @@
"pricing": [
"poa"
],
"requiresCategory": 6,
"requiresCategory": [
6
],
"saas": true,
"scriptSrc": [
"\\.conferwith\\.io/"
Expand Down Expand Up @@ -4237,7 +4255,9 @@
],
"description": "Correos is a state-owned company responsible for providing postal service in Spain.",
"icon": "Correos.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bCorreos\\b"
],
Expand Down Expand Up @@ -4336,7 +4356,9 @@
],
"description": "Coureon is a digital logistics carrier for international shipping.",
"icon": "Coureon.png",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bCoureon\\b"
],
Expand Down Expand Up @@ -4899,7 +4921,9 @@
],
"description": "Cubyn is B2B logistics company headquartered in France.",
"icon": "Cubyn.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bCubyn\\b"
],
Expand Down Expand Up @@ -5124,7 +5148,9 @@
"pricing": [
"payg"
],
"requiresCategory": 6,
"requiresCategory": [
6
],
"saas": true,
"scriptSrc": [
"\\.cashewpayments\\.com/"
Expand Down
28 changes: 21 additions & 7 deletions src/technologies/d.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
}
},
"icon": "DHL.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bDHL\\b"
],
Expand Down Expand Up @@ -138,7 +140,9 @@
],
"description": "DPD is an international parcel delivery service for sorter compatible parcels.",
"icon": "DPD.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bDPD\\b"
],
Expand Down Expand Up @@ -181,7 +185,9 @@
],
"description": "DX (also known as DX Freight) is a British mail, courier and logistics company.",
"icon": "DX.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bDX\\b"
],
Expand Down Expand Up @@ -215,7 +221,9 @@
],
"description": "Dachser is a German freight company.",
"icon": "Dachser.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bDachser\\b"
],
Expand Down Expand Up @@ -621,7 +629,9 @@
],
"description": "Delivengo is an international shipping service powered by La Poste.",
"icon": "La Poste.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bDelivengo\\b"
],
Expand Down Expand Up @@ -776,7 +786,9 @@
],
"description": "Deutsche Post is a German multinational package delivery and supply chain management company in Germany.",
"icon": "Deutsche Post.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bDeutsche Post\\b"
],
Expand Down Expand Up @@ -1792,7 +1804,9 @@
"drapr_data": "",
"drapr_deferLoading": ""
},
"requiresCategory": 6,
"requiresCategory": [
6
],
"scriptSrc": [
"draprpubsubtest\\.firebaseapp\\.com/"
],
Expand Down
12 changes: 9 additions & 3 deletions src/technologies/e.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@
99
],
"description": "EasyLog is a logistics company based in Brazil.",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bEasylog\\b"
],
Expand Down Expand Up @@ -442,7 +444,9 @@
],
"description": "Ecovium is an end-to-end logistics company in Germany.",
"icon": "Ecovium.svg",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bMHP\\b",
"\\bEcovium\\b"
Expand Down Expand Up @@ -1451,7 +1455,9 @@
],
"description": "",
"icon": "Envialia.png",
"requiresCategory": 6,
"requiresCategory": [
6
],
"text": [
"\\bEnvialia\\b"
],
Expand Down
Loading

0 comments on commit 44d102b

Please sign in to comment.