<commit_before>local base = require("packages.base")

local package = pl.class(base)
package._name = "boustrophedon"

local _swap

function package:init (class)

  base._init(self, class)

  SILE.hyphenator.languages.grc = { patterns={} }

  SILE.nodeMakers.grc = pl.class(SILE.nodeMakers.unicode)
  function SILE.nodeMakers.grc.iterator (node, items)
    return coroutine.wrap(function ()
      for i = 1, #items do
        node:addToken(items[i].text, items[i])
        node:makeToken()
        node:makePenalty()
        coroutine.yield(SILE.nodefactory.glue("0pt plus 2pt"))
      end
    end)
  end

  _swap = SILE.nodefactory.vbox({})
  _swap.outputYourself = function (_, typesetter, _)
    typesetter.frame.direction = typesetter.frame.direction == "LTR-TTB" and "RTL-TTB" or "LTR-TTB"
    typesetter.frame:newLine()
  end<commit_msg>chore(packages): Fix boustrophedon package init<commit_after>local base = require("packages.base")

local package = pl.class(base)
package._name = "boustrophedon"

local _swap

function package:_init (class)

  base._init(self, class)

  SILE.hyphenator.languages.grc = { patterns={} }

  SILE.nodeMakers.grc = pl.class(SILE.nodeMakers.unicode)
  function SILE.nodeMakers.grc.iterator (node, items)
    return coroutine.wrap(function ()
      for i = 1, #items do
        node:addToken(items[i].text, items[i])
        node:makeToken()
        node:makePenalty()
        coroutine.yield(SILE.nodefactory.glue("0pt plus 2pt"))
      end
    end)
  end

  _swap = SILE.nodefactory.vbox({})
  _swap.outputYourself = function (_, typesetter, _)
    typesetter.frame.direction = typesetter.frame.direction == "LTR-TTB" and "RTL-TTB" or "LTR-TTB"
    typesetter.frame:newLine()
  end
{'fraction_non_alphanumeric': 0.13205351948807445, 'fraction_numerical': 0.0034904013961605585, 'mean_word_length': 3.6612466124661247, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5808289', 'n_tokens_mistral': 633, 'n_tokens_neox': 612, 'n_words': 111}