If you're anything like me, you're a huge nerd engineering major who enjoys
working out problems both on whiteboards and digitally. You might also
have six million photos of your whiteboard work trapped on your phone
or in your Google Drive with no good way to easily group them in with
your other notes.
This uses autotrace to translate whiteboard markings into splines. Those splines are then passed directly to the Xournal++ API and rasterized, before being placed onto the working layer.
Debian:
Compile and install autotrace.
We're going to be using a fork of autotrace that includes a few fixes.
Upstream is currently broken (and likely to remain that way
# (From https://askubuntu.com/questions/1124651/how-to-install-autotrace-in-ubuntu-18-04)
# Download Autotrace Dependencies
apt-get install -y build-essential pkg-config autoconf intltool autopoint \
libtool libglib2.0-dev build-essential libmagickcore-dev libpstoedit-dev imagemagick pstoedit
# Download and Build Autotrace
# git clone https://github.com/autotrace/autotrace.git # Upstream is currently broken
git clone https://github.com/yy502/autotrace.git
cd autotrace
git checkout 27bec55f2b32696b581f9f031ada3407e63518ed # Last tested, known "good" commit.
./autogen.sh
#put everything into /usr/{bin,lib,share,include}
LD_LIBRARY_PATH=/usr/local/lib ./configure --prefix=/usr
make
sudo make install
Compile and install xournalpp. I wrote API extensions that might not be available yet on your platform, so you're probably going to have to build from source.
# From (https://github.com/xournalpp/xournalpp/blob/master/readme/LinuxBuild.md)
# Download Xournalpp dependencies
apt-get install -y cmake libgtk-3-dev libpoppler-glib-dev portaudio19-dev \
libsndfile-dev dvipng texlive libxml2-dev liblua5.3-dev libzip-dev librsvg2-dev gettext lua-lgi
# Download and Build Xournalpp
git clone http://github.com/xournalpp/xournalpp.git
cd xournalpp
mkdir build
cd build
cmake ..
cmake --build .
Compile and install Inkpath
# Download and build Inkpath (Deps included in Xournalpp)
git clone https://github.com/willnilges/inkpath.git
cd inkpath
make lua-plugin
# Copy resulting plugin files to plugin directory
cp -r ImageTranscription/ ../xournalpp/plugins/; cp ImageTranscription/inkpath.so ../xournalpp/build/src/
RHEL8 / CENTOS / Fedora:
Compile and install xournalpp. I wrote API extensions that might not be available yet on your platform, so you're probably going to have to build from source.
# From (https://github.com/xournalpp/xournalpp/blob/master/readme/LinuxBuild.md)
# Download Xournalpp dependencies
sudo dnf makecache
sudo dnf check-update
sudo dnf update
sudo dnf install gcc-c++ cmake gtk3-devel libxml2-devel portaudio-devel libsndfile-devel poppler-glib-devel texlive-scheme-basic texlive-dvipng gettext libzip-devel librsvg2-devel lua-devel luarocks gobject-introspection-devel
sudo luarocks install lgi
# I still need to find a way to install that 'tex(standalone.cls)' package. tlmgr install standalone.cls gives a big scary error message
# Download and Build Xournalpp
git clone http://github.com/xournalpp/xournalpp.git
cd xournalpp
mkdir build
cd build
cmake ..
cmake --build .
Run make lua-plugin
, it will compile inkpath and place inkpath.so
in the ImageTranscription directory. Copy that directory to your Xournalpp plugins folder, and Inkpath will be installed. You can then use it from the 'Plugins' menu.
You can also run make
to compile a CLI utilility that you can pass a source image and an output file path. This is useful for testing, or just starting a document. It will take that Bezier curve data and transcribe it to xouranalpp file syntax.
(See Makefile for dependencies)