commit c8be1293427c7877d897fbf4f49498bc9224725d Author: filifa Date: Wed Jun 3 20:29:44 2026 -0400 add script diff --git a/eulerplot.py b/eulerplot.py new file mode 100755 index 0000000..2c4d373 --- /dev/null +++ b/eulerplot.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python + +import argparse +import csv +import datetime +import pathlib + +import matplotlib.pyplot as plt + +def plot(paths): + for path in paths: + timestamps = [datetime.datetime.now()] + with open(path) as f: + reader = csv.reader(f) + for (_, _, tstr) in reader: + timestamp = datetime.datetime.strptime(tstr, "%d %b %y (%H:%M)") + timestamps.append(timestamp) + + plt.stairs(range(1, len(timestamps)), edges=timestamps[::-1], baseline=None) + + plt.show() + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("-f", "--file", nargs='+', type=pathlib.Path, required=True, help="solve history CSV") + + args = parser.parse_args() + plot(args.file)