Hosted here: metamorph.fisherevans.com
metamorph (plural metamorphs)
- An organism that has undergone metamorphosis
metamorphosis
- A transformation, such as one performed by magic.
- A noticeable change in character, appearance, function or condition.
Metamorph is a small, client-side webapp that allows you to define a series of repeatable text and data transformations. These configurations are persisted in the URL allowing you to bookmark them for later.
I created this project after getting frustrated with a repetitive procces I was forced to repeat dozens of time while debugging an issue:
- fetch a JSON payload
- pretty print it in order to copy a specific attribute value
- Base64 decode that
- pretty print again to find another field
- un-escape an attribute value
- pretty print YAML this time in order to find the actual field I was looking for
It may be an extreme example - one that has other underlying issues that are probably worth addressing - but this kind of practice isn't uncommon...
npm install # once
npm run startA good example to reference is adding the Unescape and Escape functions.
-
Add a new
ActionCodeenum and any config you need tosrc/components/AppConfig/protos/model.protoWe use ProtoBuf for config in order to minimize the size of the data blob we stuff in the URL
-
Run
npm run codegen -
Follow the patterns in
src/components/ProcessingActions(i.e.regex/Regex.tsx) to create the new function:- A processor that actually transform the data
- If there's config involved:
- an "Ensure*Config'er" to establish the default config values
- a "Configure'er" to allow a user to change the config
- a "Sumuraize'er" to display a concise version of the current config
-
Add a new entry in via
registerAvailableAction(*)insrc/components/ProcessingActions/ActionSetup.tsx

