Enables customization of reader-insert stories by replacing author-provided hooks such as Y/n, pov/s, and vrb/do/present/.
Go to file
Jean Viscogliosi-Pate 2211fb2225 Updating version number 2025-08-18 06:55:36 -07:00
third-party-licenses Updating README and package information 2025-08-14 20:53:47 -07:00
.gitignore Initial commit 2025-08-03 12:35:19 -04:00
LICENSE Initial commit 2025-08-03 12:35:19 -04:00
README.md Adding usage information to README 2025-08-14 21:05:22 -07:00
flake.lock Cleaning up, bugfixes 2025-08-03 16:35:56 -07:00
flake.nix Cleaning up, bugfixes 2025-08-03 16:35:56 -07:00
library.svg Initial commit 2025-08-03 09:48:22 -07:00
metamorpov-test.js Fixing cut to allow cutting one thing multiple times 2025-08-18 06:54:22 -07:00
metamorpov.js Fixing cut to allow cutting one thing multiple times 2025-08-18 06:54:22 -07:00
package-lock.json Fixing cut to allow cutting one thing multiple times 2025-08-18 06:54:22 -07:00
package.json Updating version number 2025-08-18 06:55:36 -07:00

README.md

MetamorPOV

This library provides the translation logic for the MetamorPOV browser extension. 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.

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 installed globally. As an alternative, install Nix and type nix develop with the experimental flakes feature enabled. After that, from the extension's root directory:

# Install project dependencies
npm install

# Run the test script
npm run test
  • Portions of MetamorPOV are derived from InteractiveFics, licensed under MIT, copyrighted 20152023 by Mariam Maarouf.
  • MetamorPOV supports verb conjugation with RosaeNLG, licensed under Apache-2.0, copyrighted 20192024 by Ludan Stoecklé, 2015 by Forbes Lindesay, and 20092014 by TJ Holowaychuk.
  • MetamorPOV supports adaptive articles with indefinite, licensed under MIT, copyrighted 20152025 by Andrew Nichols.
  • All other portions of MetamorPOV are licensed under GPL-3.0-or-later, copyrighted 20242025 by Jean Viscogliosi-Pate.