From 7990c9ad6aa3f996cbdb465411cc97610081bba2 Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Thu, 30 May 2024 12:44:08 -0700 Subject: [PATCH] Update README with a new "weaknesses" section and commit hash example Signed-off-by: Alek Ratzloff --- README.md | 11 ++++++ examples/commithash.svg | 80 ++++++++++++++++++++--------------------- 2 files changed, 51 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 70b9683..87f07a4 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,10 @@ No dependencies required, everything is vanilla Python >=3.10. `python -m colorhash infile.dat -y svg -o out.svg -a md5` +### Create art in the terminal using the current git commit hash + +`python -m colorhash "$(git rev-parse HEAD)" -a sha1` + # Motivation > If you see the picture is different, the key is different. @@ -39,6 +43,13 @@ checksum of a file from the internet. The goal of this project is to give more f pattern recognition so that two extremely similar hashes, maliciously crafted or not, have more visual depth to their distinction. +## Weaknesses + +This is not a perfect solution for hash comparison. Similar hashes may just so happen to choose the +same color palette, for example. Additionally, if this is appearing on a webpage, caches may +override the most recent version of the file; this has happened with me and Chrome looking at the +Github page for this project. + # Examples See the examples directory. diff --git a/examples/commithash.svg b/examples/commithash.svg index 4c48ac7..0b6db05 100644 --- a/examples/commithash.svg +++ b/examples/commithash.svg @@ -1,42 +1,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file