diff --git a/Building.md b/Building.md new file mode 100644 index 0000000..e58c211 --- /dev/null +++ b/Building.md @@ -0,0 +1,38 @@ +First, make sure you have poetry installed. See [here](https://python-poetry.org/docs/) for instructions. + +Then clone the repo. +``` +hrfee@lab:~$ git clone https://github.com/hrfee/jellyfin-accounts.git +``` +Then enter the directory, grab python dependencies and enter the venv. +``` +hrfee@lab:~$ cd jellyfin-accounts +hrfee@lab:~/jellyfin-accounts# poetry update +hrfee@lab:~$ poetry shell +``` +Next, you need to get bootstrap. jellyfin-accounts provides Bootstrap 4 and the v5 alpha, as well as a Jellyfin theme for each. You will need to acquire/create the css files for each permutation of these. + +Acquire `npm`, then, making sure you're still in the main directory, run: +``` +hrfee@lab:~/jellyfin-accounts# npm install bootstrap@next +hrfee@lab:~/jellyfin-accounts# npm install bootstrap4@npm:bootstrap +``` +This will install bs4 and bs5 into `./node_modules/bootstrap4` and `./node_modules/bootstrap` respectively. + +Next, copy each of their pre-compiled CSS files into the `jellyfin_accounts/data/static` directory: +``` +hrfee@lab:~/jellyfin-accounts# cp node_modules/bootstrap4/dist/css/bootstrap.min.css jellyfin_accounts/data/static/bs4.css +hrfee@lab:~/jellyfin-accounts# cp node_modules/bootstrap/dist/css/bootstrap.min.css jellyfin_accounts/data/static/bs5.css +``` + +You then need to compile the SCSS for the Jellyfin theme. This is explained in the README for the [scss](https://github.com/hrfee/jellyfin-accounts/tree/master/scss) directory. + +Once done, you should have `bs4.css, bs5.css, bs4-jf.css, bs5-jf.css` inside the `jellyfin_accounts/data/static/` directory. + +Finally, you can build and install: +``` +hrfee@lab:~/jellyfin-accounts# poetry build +hrfee@lab:~/jellyfin-accounts# poetry install +``` + +From there, you can run poetry run jf-accounts every time, or you can install your built package with `pip install dist/jellyfin_accounts--py3-none-any.whl`. \ No newline at end of file