Added total new line count.
This commit is contained in:
parent
ff53059a74
commit
6e61456575
19
merge.py
19
merge.py
@ -2,6 +2,15 @@ import pathlib
|
|||||||
|
|
||||||
|
|
||||||
all_content = []
|
all_content = []
|
||||||
|
return_count = 0
|
||||||
|
hour_count = 0
|
||||||
|
|
||||||
|
for file in pathlib.Path("logs_plain").glob("*.txt"):
|
||||||
|
with open(file, "r") as f:
|
||||||
|
return_count += f.read().count("[ENTER]")
|
||||||
|
hour_count += 1
|
||||||
|
|
||||||
|
lines_per_hour = return_count // hour_count
|
||||||
|
|
||||||
for file in pathlib.Path("logs_summaries").glob("*.txt"):
|
for file in pathlib.Path("logs_summaries").glob("*.txt"):
|
||||||
with open(file, "r") as f:
|
with open(file, "r") as f:
|
||||||
@ -16,6 +25,7 @@ html_content = ['<html>',
|
|||||||
body {
|
body {
|
||||||
width:100%;
|
width:100%;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
width:40%;
|
width:40%;
|
||||||
@ -24,7 +34,14 @@ html_content = ['<html>',
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
""",
|
""",
|
||||||
'<body>']
|
'<body>',
|
||||||
|
'<b>',
|
||||||
|
f'Total lines written: {return_count}',
|
||||||
|
'<br />',
|
||||||
|
f'Total lines per hour: {lines_per_hour}',
|
||||||
|
'</b>',
|
||||||
|
'<br>',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
graph_images = list(pathlib.Path(".").glob("*.png"))
|
graph_images = list(pathlib.Path(".").glob("*.png"))
|
||||||
|
Loading…
Reference in New Issue
Block a user