6 Building
Harvey Tindall edited this page 2020-08-04 18:26:56 +01:00
  • First, make sure you have poetry installed. See here 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:~/jellyfin-accounts# 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. The entire process can now be done with one command, but you will need to install npm first.

Once you have it, run

hrfee@lab:~/jellyfin-accounts# poetry run task compile-css
assuming npm bin directory "/home/hrfee/jellyfin-accounts/node_modules/.bin". Is this correct?
[yY/nN]: 

It will ask you a similar question about your npm bin directory. Check the path exists and isn't empty before saying yes. If you say no, it'll make another guess or ask you to input it yourself.

This will install BS5, BS4, clean-css, postcss, and autoprefixer, the last of which help clean up the resulting files. It then copies the Bootstrap files into the jellyfin_accounts/data/static/ directory, and compiles the alternate theme.

Once done, you should have bs4.css, bs5.css, bs4-jf.css, bs5-jf.css inside the jellyfin_accounts/data/static/ directory.

  • The last step before building is to generate the html files for emails. This can be done by running
hrfee@lab:~/jellyfin-accounts# poetry run task generate-emails

This copies the html and txt email files into jellyfin_accounts/data/.

  • 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-<version>-py3-none-any.whl.