Add filter for visualisations to clocgen.py
This commit is contained in:
parent
bdba0ff639
commit
ce1292dcf2
2 changed files with 4 additions and 1 deletions
2
.github/README.md
vendored
2
.github/README.md
vendored
|
@ -48,6 +48,8 @@ Puzzle inputs and descriptions are not included in this repository. You'll have
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
*(Boilerplate code and code that generates visualisations is not included)*
|
||||||
|
|
||||||
[check]: https://github.com/codemicro/adventOfCode/blob/master/.github/check.png?raw=true
|
[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
|
[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
|
[partial]: https://github.com/codemicro/adventOfCode/blob/master/.github/partial.png?raw=true
|
||||||
|
|
3
.github/clocgen.py
vendored
3
.github/clocgen.py
vendored
|
@ -33,11 +33,12 @@ for file in cloc_results["files"]:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
split_name = file["name"].split(os.path.sep)
|
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:
|
try:
|
||||||
day_num = int(split_name[0].split("-")[0])
|
day_num = int(split_name[0].split("-")[0])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if day_num not in target_dict:
|
if day_num not in target_dict:
|
||||||
target_dict[day_num] = file["code"]
|
target_dict[day_num] = file["code"]
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue