This is a helper script Jeff uses for drafting Barn Hunt course maps.
It does a bunch of stuff, but the important bit is that it exports PDF versions of maps from Inkscape SVG files.
I draw all the maps for a given ring (for a day or weekend) in a single Inkscape drawing. Various maps (for different trials/classes, build map, rat-maps, base maps, etc.) are generated by hiding and unhiding appropriate layers in the drawing and exporting to PDF.
This program automates that process.
This program requires Python, version 3.7 or higher to run.
It "should" work with all versions of Inkscape, 0.9x through 1.2.1.
I use this program on Linux, however the package now includes a GitHub CI workflow that performs rudimentary testing on Windows and macOS, so there’s a moderate chance it might "just work" on those platforms. (Due to a dependency on the pikepdf package, it should work on x86_64-based Macs, but may not work on Macs that use Apple silicon. If pikepdf compatibility is an issue for you, let me know — it’s probably fixable.)
We now publish a compiled version of the program for Windows (which may even work.) Using this version has the advantage that Python is not required to be installed. (And even if Python is installed, this version may work-around some bugs having to do with the various different ways that Python can be installed on on Windows computer.)
-
Browse to our releases page. Select a release, and look down in the Assets section of the release page. (You may have to click the triangle to expand the Assets section.)
-
Download the MSI installer (the filename should end with
.msi
— e.g.Barnhunt-1.2.0.49-x86_64-pc-windows-msvc.msi
). The file is not signed, so you may have to click through some nasty warnings about "unrecognized, potentially dangerous" files. -
Once downloaded, open (double-click) the file you just downloaded. Hopefully and installer dialog should open. Accept the default choices.
-
Now open a terminal command-line window. Type
barnhunt --version
. If all is good, barnhunt should report its version. Runbarnhunt --help
for the help screen.
As this package is published to
PyPI it may be installed into a
virtualenv using pip
. It is suggested that you use
pipx
to combine those two steps.
A basic outline of how to proceed:
-
Install python if it is not already installed. (Version 3.7 or greater is required.)
-
Install pipx. This might look like:
python3 -m pip install --user pipx python3 -m pipx ensurepath
-
Install
barnhunt
.pipx install barnhunt
Sadly, this program is currently quite under-documented.
The functions of the basic sub-commands and command-line options are
tersely documented via the --help
option. Try:
barnhunt --help
and
barnhunt pdfs --help
for starters.
If you get stuck, kick me!
This package was written by Jeff Dairiki, BHAJ-221A, [email protected].