From b1bdd26d2a6c30e5467eb835095db504b5742a37 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 30 Mar 2021 14:01:58 -0700 Subject: [PATCH] script to count cars in the readme old-commit-hash: 41a92b434f6bd5d14c4e6d79a4c83211faf299de --- scripts/count_cars.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 scripts/count_cars.py diff --git a/scripts/count_cars.py b/scripts/count_cars.py new file mode 100755 index 0000000000..14369e2e6b --- /dev/null +++ b/scripts/count_cars.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 +import os +from common.basedir import BASEDIR + +with open(os.path.join(BASEDIR, "README.md")) as f: + lines = f.readlines() + cars = [l for l in lines if l.strip().startswith("|") and l.strip().endswith("|") and + "Make" not in l and any(c.isalpha() for c in l)] + print(''.join(cars)) + print(len(cars))