CATweasel Toolkit v4.1.0

Desktop Applications for the PDFParser and Filters, Direct Export to WAGO smartSCRIPT

With version 4.1.0, the CATweasel Toolkit gets graphical user interfaces for the first time. Schematics can now be analysed by drag and drop, the result is shown page by page, and filter definitions are developed directly on your own schematics. With this, the PDFParser reaches version 1.0.0.

In addition, the PDFParser writes projects for WAGO smartSCRIPT ready to print without any import step, reads texts at fixed positions such as the page name in the title block, and processes umlauts and special characters as they are written in the schematic.

The PDFParser Application

The new desktop application “CATweasel PDFParser” opens a PDF schematic from the menu, by drag and drop onto the window or with “Open with”, and analyses it with the selected parser. The preview shows every page with the detected devices and connections and lists the stored files.

The PDFParser application with an analysed schematic page
The PDFParser application: detected devices and connections marked on the page and listed on the right

The analysis itself is the familiar one of the PDFParser: result PDF next to the schematic, watermark, stamp and exports. The start menu entry and the desktop icon open the application when started without a file. A PDF file dropped onto the icon is analysed in the console as before, and ctw-pdfparser in the terminal and in scripts is unchanged.

The Filter Editor

With the “CATweasel Filtereditor”, filter definitions (.ctwf) are developed directly on your own schematics:

  • The definition is checked while typing.
  • The words of the selected pages are coloured by the decision of the filter, together with the deciding rule.
  • The rules and the elements of their regular expressions are explained.
  • “Parser ausführen” (F5) shows the result PDF with the edited filter.
The filter editor with a filter definition and the explanation of a rule
The filter editor: definition with checks, explanation of the rule and page text of the schematic

The decisions are the same as in the PDFParser. The editor replaces the former link to regex101.com. For scripts, it is also available as the command ctw-filter, for example to check a filter definition:

ctw-filter check myfilter.ctwf

Direct Export to WAGO smartSCRIPT

The new export writes projects of the marking software WAGO smartSCRIPT (.wssl) ready to print, without any import step. The device marking on yellow labels and the terminal marking are included. Where the tag of a terminal strip is printed can be configured: on a label of its own before the terminals, together with the first terminal, or not at all. Texts too long for a label are compressed as in smartSCRIPT.

smartSCRIPT is not needed for the export itself, for example on a server, only for opening and printing. The PDFParser application opens all smartSCRIPT projects of a run with one click. On update, the installer adds the export to an existing configuration.

New Features of the PDFParser

Areas

Areas read the text at a fixed position on every page, such as the page name in the title block. The text read is available as a variable, and words inside an area are no longer detected as devices or connections. The result PDF shows the areas with the text read.

Variables in Filters

Filter rules can inspect a variable instead of the text. For example, this rule excludes all pages whose name contains “Verzeichnis”:

revoke /[Vv]erzeichnis/ @Page.Name

Additional Columns in the Exports

Exports can add columns with the texts of the areas, such as the page name of every device, as well as the page number in the PDF and, if desired, a header row. Either one row per device or one row per occurrence is written.

Umlauts and Special Characters

Texts such as Wärmemelder, 2,5mm² or -25°C now appear as written in the schematic instead of being reduced to ASCII. They are also no longer mistaken for connections or devices. Filter rules may contain umlauts.

Analysing Visible Text Only

With the new setting VisibleTextOnly, text without visible extent is ignored, for example text written with a font size of almost zero. The text layer of OCR-processed documents is still analysed.

Installation and Operation

  • The installer is considerably smaller, about 90 instead of 150 MB, as Strawberry Perl is shipped only with the parts the toolkit uses.
  • A Java runtime (Eclipse Temurin 21) is installed for the desktop applications.
  • The licenses of all third-party components are found uniformly in the folder licenses, with version, license, supplier and source of the source code.
  • Poppler has been updated to version 26.09 and brings its runtime libraries along. An installed Visual C++ Redistributable is no longer required.
  • The “CATweasel Terminal” runs in Windows PowerShell and completes commands, options and project names with the Tab key. The classic command prompt remains available as “CATweasel Terminal (cmd)”.
  • Perl warnings no longer end a tool; they are written to the log.

Notes on Updating

  • Logging: The <Logging> section of the configuration has a syntax of its own, the same for all tools. The installer converts the unchanged default section of version 4.0 automatically. A section you have changed must be converted by hand; until then, the tools end with a hint.
  • Own filter rules: Rules written for the former reduced texts, such as [Uu]e?bersicht for “Übersicht”, no longer match and must be adapted. The supplied filters have already been adapted.
  • Own Perl scripts: They can use the Perl core and the modules of the toolkit. Other modules of Strawberry Perl, such as DBI, are no longer shipped.

Fixed Issues

  • A terminal strip found twice on one page got the connections of both places twice.
  • Without a configured export, the PDFParser ended with an error.
  • Options such as --DefaultParser were lost when calling ctw-pdfparser.
  • On Windows, the setting CSVLineEnding of the CSV export was ignored.

Outlook

The project management and the Lagerist module for managing material data and bills of materials are still under development and will be presented in an upcoming version.

Summary

Version 4.1.0 brings the CATweasel Toolkit to the desktop:

  • The PDFParser application analyses schematics by drag and drop and shows the result page by page.
  • The filter editor makes developing filters on your own schematics tangible.
  • Projects for WAGO smartSCRIPT are created ready to print without any import step.
  • Areas, variables and additional export columns make use of the information in the title block.
  • Umlauts and special characters are preserved.
  • A leaner installer and complete license information.

If you use your own filter rules or a customised logging section, you should check them after the update.