Crates.io | lukaj |
lib.rs | lukaj |
version | 0.2.0 |
source | src |
created_at | 2023-11-27 21:50:38.479554 |
updated_at | 2023-12-22 21:09:48.156028 |
description | Interactive diff tool for SVG images |
homepage | https://github.com/adamws/lukaj |
repository | https://github.com/adamws/lukaj |
max_upload_size | |
id | 1050973 |
size | 3,973,493 |
Interactive diff tool for SVG images.
Swipe SVG graphics comparison with zoom and drag support.
To install precompiled version of lukaj go to latest release page and download archive for your system. Provided binaries are static executables for Windows and Linux.
If you're a Rust programmer, lukaj can be installed with cargo
.
It supports two graphics backends which are enabled/disabled with
cargo features.
The use-rsvg
feature is available only when installing from source, precompiled binaries
on release page include only default feature set.
Feature name | SVG library | 2D rendering library | Precompiled binary release |
---|---|---|---|
use-usvg (default) |
resvg | tiny-skia | yes |
use-rsvg |
librsvg | cairo | no |
Depending on the operating system and selected feature set, lukaj will require additional development libraries.
When using only default use-usvg
feature:
$ sudo apt-get install libsdl2-dev
$ cargo install lukaj
When using additional use-rsvg
feature:
$ sudo apt-get install build-essential libcairo2-dev libgdk-pixbuf-2.0-dev \
libglib2.0-dev libpango1.0-dev libsdl2-dev libxml2-dev
$ cargo install lukaj --feature user-rsvg
Install MSYS2 and run from it's terminal run:
For default use-usvg
feature:
$ pacman -S mingw-w64-x86_64-SDL2
For additional use-rsvg
feature:
$ pacman -S mingw-w64-x86_64-gtk4 mingw-w64-x86_64-gettext \
mingw-w64-x86_64-libxml2 mingw-w64-x86_64-pkgconf \
mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2
Add mingw binaries path (C:\msys64\mingw64\bin
) to system Path
Change default rust toolchain to stable-gnu
rustup toolchain install stable-gnu
rustup default stable-gnu
Run cargo install command
For default feature only:
$ cargo install lukaj
For additional use-rsvg
feature:
$ cargo install lukaj --features use-rsvg
For different setups see this GUI development with Rust and GTK4 guide.
To compare two SVG files run:
$ lukaj [path 1] [path 2]
Lukaj uses following mouse/keyboard controls:
Button | Action |
---|---|
Left Click | Move diff separator |
Right Click | Move images |
Scroll | Zoom in and out |
R | Reset images position |
Esc | Exit |
$ lukaj --help
Interactive diff tool for SVG images
Usage: lukaj [OPTIONS] [FILES]...
Arguments:
[FILES]... Files to compare
Options:
-s, --scale <VALUE> Sets a scaling factor
--backend <BACKEND> Preferred backend [default: rsvg-with-cairo]
[possible values: rsvg-with-cairo, usvg-with-skia]
-h, --help Print help
-V, --version Print version
Lukaj can be used as git difftool.
To add git diff-svg
custom command, copy and paste following sections to .gitconfig
file:
[difftool "lukaj"]
cmd = ~/.cargo/bin/lukaj $LOCAL $REMOTE
[alias]
diff-svg = "difftool -t lukaj -y"