Add filter for visualisations to clocgen.py

This commit is contained in:
akp 2020-12-12 14:20:06 +00:00
parent bdba0ff639
commit ce1292dcf2
No known key found for this signature in database
GPG key ID: D3E7EAA31B39637E
2 changed files with 4 additions and 1 deletions

2
.github/README.md vendored
View file

@ -48,6 +48,8 @@ Puzzle inputs and descriptions are not included in this repository. You'll have
![Lines of code per day](https://github.com/codemicro/adventOfCode/blob/master/.github/clocgraph.png?raw=true)
*(Boilerplate code and code that generates visualisations is not included)*
[check]: https://github.com/codemicro/adventOfCode/blob/master/.github/check.png?raw=true
[cross]: https://github.com/codemicro/adventOfCode/blob/master/.github/cross.png?raw=true
[partial]: https://github.com/codemicro/adventOfCode/blob/master/.github/partial.png?raw=true

3
.github/clocgen.py vendored
View file

@ -33,11 +33,12 @@ for file in cloc_results["files"]:
continue
split_name = file["name"].split(os.path.sep)
if split_name[-1].lower() not in ["__main__.py", "main.go"]:
if split_name[-1].lower() not in ["__main__.py", "main.go", "visualise.py", "visualise.go"]:
try:
day_num = int(split_name[0].split("-")[0])
except ValueError:
continue
if day_num not in target_dict:
target_dict[day_num] = file["code"]
else: