From 9dc437e5308361271f8bcc3af531ee87e794492d Mon Sep 17 00:00:00 2001 From: Zentropivity Date: Fri, 27 Sep 2024 09:43:16 +0200 Subject: [PATCH] update readme + add pyvenv to the repo --- README.md | 14 +++++++------- pyvenv | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100755 pyvenv diff --git a/README.md b/README.md index fbecdfc..b0ab3b8 100644 --- a/README.md +++ b/README.md @@ -11,18 +11,18 @@ First you need to make sure the required tools are installed: - `git` of course 0. Make sure you have the submodules. Either clone this repo with `--recursive` or do `git submodule update --init` -1. Create a python virtual environment and activate it, like: `python -m venv venv` then source right activation file for your shell -2. Run `build_ttf.nu` +1. Create a python virtual environment and activate it, like: `python -m venv venv` then source the activation file for your shell (for nushell just run `./pyvenv`) +2. Run `./build_ttf.nu` this produces the font file in `out/build/MutantStandard-Regular.ttf` -3. On linux, you could also copy the font and its license to the system fonts by running `sudo install.nu` +3. On linux, you could also copy the font and its license to the system fonts by running `sudo ./install.nu` ## License -Everything in this repository is licensed under a MIT license, except the materials used under the repositories in the folliwing folders have their own licensing: +Everything in this repository is licensed under a MIT license, except the materials used under the repositories in the following folders have their own licensing: -- Mutant Standard emoji in `mutant_standard` are licensed CC BY-NC-SA 4.0 International -- Orxporter in `orxporter` is licensed under the Cooperative Non-Violent License (CNPL) v4 -- nanoemoji in `nanoemoji` is licensed under the Apache-2.0 license +- `mutant_standard`: Mutant Standard emoji are licensed CC BY-NC-SA 4.0 International +- `orxporter`: Orxporter is licensed under the Cooperative Non-Violent License (CNPL) v4 +- `nanoemoji`: nanoemoji is licensed under the Apache-2.0 license ## Your contributions diff --git a/pyvenv b/pyvenv new file mode 100755 index 0000000..593a478 --- /dev/null +++ b/pyvenv @@ -0,0 +1,15 @@ +#!/usr/bin/env nu + +## activates the python environment in a sub-sub-shell +# defaults to ./venv +# deactivate by exiting +## if command is given after virtual environment location +# after the command ends, the virtualenv exits + +def main [path="./venv" ...command] { + if (0 < ($command | length)) { + sh -i -c $"source ($path)/bin/activate ; nu -c ($command | str join ' '); exit 0" + } else { + sh -i -c $"source ($path)/bin/activate ; nu" + } +}