Installation
This project consists of both the inference and training code. Most users will only be interested in the inference part, so that the below only comprises of the inference part that you need to execute the plugin from within Xournal++.
The training part is optional and allows to help to train our own models which improve over time. These installation process is optional and detailed further below.
Linux
Run bash INSTALL_LINUX.sh
from repository root directory.
This script also installs the plugin as explained in the last point of the cross-platform installation procedure. The installation of the plugin is performed with plugin/copy_to_plugin_folder.sh
, which can also be invoked independently of INSTALL_LINUX.sh
for updating the plugin installation.
Cross-platform
Execute the following commands:
- Create an environment:
conda create --name xournalpp_htr python=3.10.11
. - Use this environment:
conda activate xournalpp_htr
. - Install HTRPipelines package using its installation guide.
- Install all dependencies of this package
pip install -r requirements.txt
. - Install the package in development mode with
pip install -e .
(do not forget the dot, '.'). - Install pre-commit hooks with:
pre-commit install
. - Move
plugin/
folder content to${XOURNAL_CONFIG_PATH}/plugins/xournalpp_htr/
with${XOURNAL_CONFIG_PATH}
being the configuration path of Xournal++, see Xournal++ manual here. - Edit
config.lua
, setting_M.python_executable
to your python executable in the conda environment and_M.xournalpp_htr_path
to the absolute path of this repo. See the example config for details inplugin/config.lua
. - Ensure Xournal++ is on your
PATH
. See here for the binary location.
After installation
Confirm that the installation worked by running make tests-installation
from repository root directory.