DistributedProofreaders / guiguts-py

Guiguts rewrite using Python/tkinter
GNU General Public License v2.0
2 stars 7 forks source link

Add pphtml tool #108

Open windymilla opened 9 months ago

windymilla commented 9 months ago

Just putting a few notes here about pphtml to aid us in deciding what to do and how to link pphtml with Guiguts. Just thoughts that I didn't want to lose, rather than definite suggestions of things to do:

  1. Current version of pphtml.py runs on the command line and can redirect output to a file.
  2. Presumably a similar technique to that used for pptxt could be used, with StringIO objects passed to a pphtml function, and a small "main" section so it can continue to be run as a standalone script
  3. Current version of pphtml puts some HTML in its output. The new version of pptxt either outputs plain text or decorated text (colored using ANSI terminal codes) but not HTML. It would be good for the revised pphtml to be able to do the same, i.e. HTML, plain or decorated.
  4. If we are aiming to make the output of the two tools consistent with one another, and potentially with other tools yet to be written, like jeebies, should we consider whether any of the code in the tools ought to be common, particularly to support the 2/3 ways the output is formatted. Maybe something for the future - perhaps pphtml, pptxt, jeebies,... could/should live in a repo together with some shared routines, though I guess that would complicate their use as standalone scripts.
cpeel commented 9 months ago

Looking at pphtml.py there are a few changes we'll want to make to use it as a module where we can pass in data.

Since this is an existing tool we probably want to do some small iterative PRs with these improvements so we can test them individually. Thumbing through it I saw some other improvements we could make which also means we probably need some meager samples to test against to detect regressions along the way.

windymilla commented 1 month ago

Given the successful implementation of the functionality of pptxt in GG2, I think it will end up being best to do pphtml in a similar way.

windymilla commented 1 month ago

Suggestion: include the functionality of the ppvimage in the new pphtml.