Skip to main content

Add a README for the web app

ID
8c7540f
date
2022-05-06 09:24:46+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
d017c63
message
Add a README for the web app
changed files
3 files, 26 additions, 1 deletion

Changed files

README.md (3132) → README.md (3193)

diff --git a/README.md b/README.md
index 2ddd6fa..29539a7 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,12 @@
 # dominant_colours
 
-This is a command-line tool for finding the dominant colours of an image.
+This is a tool for finding the dominant colours of an image.
 It prints their hex codes to the terminal, along with a preview of the colour (in terminals that support ANSI escape codes):
 
 ![Left: a photo of a red and white lighthouse set against a blue sky. Right: the terminal output of three invocations of 'dominant_colours' against 'lighthouse.jpg', with hex colours printed to the terminal.](screenshot.png)
 
+It's available both as a command-line tool and [as a web app](./webapp).
+
 
 
 ## Installation

webapp/README.md (0) → webapp/README.md (1293)

diff --git a/webapp/README.md b/webapp/README.md
new file mode 100644
index 0000000..05db8a8
--- /dev/null
+++ b/webapp/README.md
@@ -0,0 +1,23 @@
+# webapp
+
+This is a web version of [dominant_colours], which is available at <https://dominant-colours.glitch.me/>
+
+<img src="screenshot.png" alt="A screenshot of the web app. It says 'find the dominant colours in an image' in bold letters at the top, then an illustration of two people in a Chinese dragon costume. On the right hand side are the dominant colours from that image: brown, blue, red and yellow, along with hex codes. At the bottom is a red-coloured link 'try another image'.">
+
+It's not meant to replace the command-line tool -- it won't get all the options, and uploading the image over HTTP means it's a lot slower.
+It's meant to be a quick replacement when I don't have easy access to a command line, e.g. when I'm on my phone.
+
+[dominant_colours]: https://github.com/alexwlchan/dominant_colours
+
+
+
+## How it works
+
+It's a web app written in [Flask], which shells out to the command-line tool to process an uploaded image.
+I've deployed it on [Glitch], because I already had several projects running there and I knew how to get started quickly.
+
+I have to [compile MUSL libc-based versions][compile] of the CLI tool to get it working in Glitch.
+
+[Flask]: https://pypi.org/project/Flask/
+[Glitch]: https://glitch.com/
+[compile]: https://alexwlchan.net/2022/05/rust-on-glitch/

webapp/screenshot.png (0) → webapp/screenshot.png (1433313)

diff --git a/webapp/screenshot.png b/webapp/screenshot.png
new file mode 100644
index 0000000..3e89231
Binary files /dev/null and b/webapp/screenshot.png differ