Barnhunt

Latest version: v1.2.1rc3

Safety actively analyzes 688803 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 7

1.0.0rc1

This is a fairly complete rewrite and repackaging of a set of Barn
Hunt extensions I used with Inkscape 0.9x. (As of Inkscape 1.0, the
extension API changed significantly, so this required a significant
rework.)


Changes

0.5

Make `-o` option to `2up` sub-command optional.

Remove support for python < 3.6.

0.4

New Sub-Command: 2up

New `2up` sub-command to format PDFs for 2-up printing. Pages are
pre-shuffled so that the 2-up pages do not need to be shuffled after
cutting.

0.3

`barnhunt pdfs`

- Multi-page output support.

There is a new syntax to specify the output file basename for an overlay.
Multiple overlays which specify the same output file will all be saved to
the same file.

- It is now possible to render course maps from multiple SVG files in a
single invocation. (Just list all the files to be rendered on the
command line.)

Tests

- `test_layerinfo.test_layerflags_str`: Fix test to deal with
arbitrary ordering of `enum.Flag` flags.

0.2

Templating

- Do not expand text within hidden layers. This avoids generating
error messages (e.g. "'overlay' is undefined") due to template
expansion of unused text.

- Add optional `skip` argument to the `random_rats` function.
This allows the generation of more than one set of stable random rat
numbers per layer. E.g. `random_rats(skip=5)` will generate a set
of random number totally uncorrelated to that generated by
`random_rats()`. Using `skip` has the advantage over using
`seed=None` that the results are stable and do not vary from
render to render.

0.1

- Python 3.7 is now supported.

- The template for the output filename has been generalized to work
sensibly in the case where overlays are nested more than two deep.

Templating

- Added new attributes to layers:

`layer.is_overlay`
Boolean. True if layer is an overlay.

`layer.lineage`
Sequence starting with layer and including each parent layer in
turn.

`layer.overlay`
Returns the nearest overlay layer. If the layer is an overlay,
`layer.overlay` returns `layer`, otherwise it returns the
nearest parent layer which is an overlay. If the layer is not
contained within an overlay, returns `None`.

- Added new values to context when expanding text in SVG:

`overlays`
A list of all overlay layers in the lineage of the text
element, in order from outermost to innermost.

`course`
The outermost overlay layer. (Equivalent to `overlays[0]`.)
This value already existed in the context used for filename expansion.

`overlay`
If the element is at least two overlays deep, this is the
innermost overlay. Otherwise it is unset. This value already
existed in the context used for filename expansion.

- Added new values to context when expanding output filenames:

`overlays`
A list of all overlay layers in the lineage of the overlay
being expanded.

Bugs

- Templating: the `safepath` filter would fail with a `TypeError`
if applied to anything but a string. Now it coerces its argument to
text.

- Templating: (New style) layer flags in parent layers were not being
removed from the layer labels. (E.g. `"{{ layer.parent.label }}"`
was expanding to `"[o] Some Overlay"`, when it should expand to
`"Some Overlay"`.)

- Pexpect==4.4.0 appears to have a subtle brokenness when
`searchwindowsize` is set to something other than `None`. The
problem seems to be in [pexpect.expect.py][], and is triggered when
multiple chunks of output are read before a match is found.

[pexpect.expect.py]: <https://github.com/pexpect/pexpect/blob/606f368b4a0dc442e2523d439d722a389b6e54c6/pexpect/expect.py#L22>

Bit-Rot

- Use `log.warning`, rather than the deprecated `log.warn`.

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.