- 
                Notifications
    You must be signed in to change notification settings 
- Fork 24
Installation
This explanation assumes basic knowledge of git, python, and installation procedures.
This guide will assume that you are using the apt(Aptitude Package Manager). Substitute it with your package manager of choice if you prefer a different one.
You must install the dependencies that the project relies on. You have external dependencies and python dependencies. We will install system dependencies first.
# Linux (apt package manager)
sudo apt install sox flac mp3val git wget curl python3-pip
# Installs the uv python package manager
curl -LsSf https://astral.sh/uv/install.sh | shsox, flac and mp3val are required for running salmon. They are used to manipulate files, generate spectral images and edit tags. git, wget, curl and python3-pip are for installing and updating this script usually installed by default on most Linux distros.
uv is specifically used to avoid the hardships of manually setting up python. uv does everything for you.
If COMPRESS_SPECTRALS is enabled (True by default), you also need to install oxipng. Follow the installation instructions on their repository. On Debian/Ubuntu systems, you can typically install it with (check if this is the latest version):
wget https://github.com/shssoichiro/oxipng/releases/download/v9.1.4/oxipng_9.1.4-1_amd64.deb && sudodpkg -i oxipng_9.1.4-1_amd64.deb\nWe will be utilizing the power of uv a very powerful python package manager to install the necessary python requirements.
The following commands will install smoked-salmon to ~/.smoked-salmon and have uv setup salmon.
# First we clone the repository into your home directory!
git clone https://github.com/smokin-salmon/smoked-salmon ~/.smoked-salmon
# Then we change directory to where salmon was cloned to and copy the example config
cd ~/.smoked-salmon && cp ~/.smoked-salmon/config.py.txt ~/.smoked-salmon/config.py
# Use your text editor of choice to edit config.py
nano ~/.smoked-salmon/config.py
# Run uv to create a Virtual Python Environment and install all Python dependencies required by salmon.
uv sync
# Then we will run salmon once to generate/migrate the database
uv run salmon migrate
# Check that you can connect to the trackers with
uv run salmon checkconfInstead of navigating to the directory of the project to run salmon whenever you want to upload something, you can create a shell alias that lets you run salmon from any directory with a simple and short command.
The following will create the the alias salmon which in turn will enable salmon as a command globally.
# Creates an alias for salmon and enables it. change to .zshrc if using zsh.
echo "alias salmon='\"\$HOME/.smoked-salmon/.venv/bin/salmon\"'" >> ~/.bashrc && source ~/.bashrc
# You are now ready to enjoy the powers of salmon to print all the available commands.
salmon -h