From a94065a4069118d0a949d89ee28ea4a7a4969d32 Mon Sep 17 00:00:00 2001 From: QxBytes <39818795+QxBytes@users.noreply.github.com> Date: Mon, 24 May 2021 21:40:06 -0700 Subject: [PATCH] Create README.md --- README.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..502343b --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# Automatic Image Highlighter for Google Docs + +

Steps for Preprocessing an Image (A useful tool on its own!)

+
    +
  1. Download an image, rename it to input.png (if it is a png), and put it in the same directory as color.py
  2. +
  3. Run color.py, or, if you have a jpeg or want more features, run with the paramters below: +
  4. Run color.py with parameters [TEMPLATE STRING] [FILE NAME] [CHARACTERS PER LINE]
  5. +
  6. The following selectors are available + +
  7. +
  8. By default, the code will replace the selector with the actual value for EACH pixel value in the image. + The default template is #{hr}{hg}{hb} . + Note the space as the values are appended to output.txt with straight concatenation
  9. +
  10. The default resize is to 70 pixels wide (preserves proportions). The default file is input.png
  11. +
  12. Using defaults, your output.txt should look like #ABCDEF #123456 #ABC123 #FFFFFF etc.
  13. +
+

Steps for highlighting an image

+
    +
  1. Create a new google doc, and paste the output of output.txt from before. The data may be 50+ pages. Be patient.
  2. +
  3. In google docs, go to Tools > Script Editor and import the .gs files. Make sure DocUtils.gs is at the top.
  4. +
  5. Save and return to the original doc. There should be a new menu item next to "Help" in the top bar
  6. +
  7. Click on the option and it will prompt you. Follow the defaults or change them if you'd like
  8. +
  9. When it asks for an SRC link, COPY the URL of the google doc you pasted data into earlier
  10. +
  11. Wait for 30 seconds and it should highlight everything automatically
  12. +