39 lines
1.9 KiB
Markdown
39 lines
1.9 KiB
Markdown
# MetamorPOV
|
||
|
||
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:
|
||
|
||
```sh
|
||
# Install project dependencies
|
||
npm install
|
||
|
||
# Run the test script
|
||
npm run test
|
||
```
|
||
|
||
## Copyright and License
|
||
|
||
- Portions of MetamorPOV are derived from [InteractiveFics](https://github.com/interactivefics/interactive-fics), licensed under [MIT](third-party-licenses/LICENSE-InteractiveFics), copyrighted 2015–2023 by Mariam Maarouf.
|
||
- MetamorPOV supports verb conjugation with [RosaeNLG](https://rosaenlg.org/), licensed under [Apache-2.0](third-party-licenses/LICENSE-RosaeNLG), copyrighted 2019–2024 by Ludan Stoecklé, 2015 by Forbes Lindesay, and 2009–2014 by TJ Holowaychuk.
|
||
- MetamorPOV supports adaptive articles with [indefinite](https://github.com/tandrewnichols/indefinite), licensed under [MIT](third-party-licenses/LICENSE-indefinite), copyrighted 2015–2025 by Andrew Nichols.
|
||
- All other portions of MetamorPOV are licensed under [GPL-3.0-or-later](LICENSE), copyrighted 2024–2025 by Jean Viscogliosi-Pate.
|