EtherPatches

From XPUB & Lens-Based wiki
Revision as of 19:10, 5 October 2023 by Thijshijsijsjss (talk | contribs) (Update Usage section)
Original screenshot
Intermediate result: after horizontal pass
End Result: after horizontal and vertical pass


EtherPatches is a program to convert Etherpad screenshots to a 'patched': one where the text has been removed.

Find the code on GitHub.

Usage

EtherPatches is easy to use. It supports batch conversion: the program automatically converts everything in the input directory and saves the patched works to the output directory.

A step by step guide to EtherPatch your own pads is presented below. Setting up processing on your machine and obtaining the files (steps 1 and 2) need to be done only once.

  1. To patch your own etherpads, you'll need to be able to compile a Processing file. For this, there are several options:
  2. Next, you need to obtain the code. Again, there are several options:
  3. Select the Etherpad you want to patch.
  4. Make sceenshots of the pad and save them to the directory called input.
  5. Run the program. A window will appear with the before-and-after. You can close it. (If he screenshots don't fully fit, that's okay, the display is unrelated to the conversion)
  6. View your patched screenshots in the directory called output.

Notes

When cloning / downloading the repository, example files are included. example.png, example-after-hpass.png and example-after-hpass-and-vpass.png are used as examples in the README.md file. The input directory contains sample screenshots, and the output directory contains the patched versions of these samples. You could delete everything in the output directory and run the program to verify everything has been setup correctly: the same patched files should appear.

Note that any file with name FILENAME.png in the input directory will be converted to a file with name PATCHED-FILENAME.png in the output directory.

Parameters

You could play around with some parameters. In particular:

  • hpass_window and vpass_window set the window sizes for the horizontal and vertical passes over the pixels respectively. 5 resp. 20 seem to work well, but other configurations might be better, depending e.g. on your screen's resolution.
  • input_dir and output_dir may be altered to use dirrefent input resp. output directories.
  • batch may be set to false to not use batch conversion, but instead convert just one file. In this case filename will be converted. Note that single file conversion is possible through the batch conversion, too (just place 1 screenshot in the input directory) and this single file conversion option is present for debugging reasons. But you could use it, if you want.
  • display may be set to false to not display anything.
  • size(2000,600) may be altered for a different canvas size. This will not affect the conversion of screenshots.

Method