The rust part downloads the specified statues in rtf, xml, or pdf. It can also generate a combined odt file from rtf files, but that's now deprecated.
The new groovy script takes xml formatted statutes (usually downloaded by the rust part), and generates an odt file with a talbe of contents. This document needs to be opened in libreoffice and the TOC generated, before it's suitable for uploading.