From 366cf11034cf4c2cee9e5e5b08240a2280dc5005 Mon Sep 17 00:00:00 2001 From: Jean Date: Thu, 14 Aug 2025 21:05:22 -0700 Subject: [PATCH] Adding usage information to README --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 7c72d28..cd26a95 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,22 @@ This library provides the translation logic for the MetamorPOV [browser extension](https://git.viscogliosi-pate.com/jean/metamorpov). It exports a single function to replace specific plaintext markers (such as Y/n, pov/s, and vrb/do/present/) with their English equivalents. +## Usage + +After installing the package and including it in your file header, you can call the single function that MetamorPOV exports. + +```js +const input = "Pov/s vrb/present/like/ watching birds."; +const options = { + name: "Amelia", + preset: "she", + pov: "third" +}; + +// "She likes watching birds." +console.log(metamorpov.translate(input, options)); +``` + ## Development MetamorPOV requires Node packages for evaluating some grammar rules. You'll need [Node](https://nodejs.org/) installed globally. As an alternative, install [Nix](https://nixos.org/) and type `nix develop` with the experimental flakes feature enabled. After that, from the extension's root directory: