Skip to main content

Tools for extracting and inserting Structured Text in PLCOpen XML files

Project description

PLCOpener Tools

Python 3.7+ License

PLCOpener is a professional Python package for extracting and inserting Structured Text (ST) code in PLCOpen XML files (compatible with CODESYS, TwinCAT, etc.).

It allows developers to bridge the gap between monolithic XML exports and modern software engineering practices like Git version control, external code analysis, and automated refactoring.

Features

  • Folder Reconstruction: Rebuilds the project tree structure on your filesystem.
  • Resource Management: Automatically detects and groups files by PLC applications/resources.
  • Resilient Parsing: Robust handling of malformed or incomplete XML project files.
  • CLI & Library: Full support for both command-line automation and programmatic use.

Installation

pip install .

Quick Start

1. Extracting ST code

plcopen-extract project.xml -o my_workspace

2. Modifying and Re-inserting

After editing the .st files in my_workspace, push the changes back:

plcopen-insert project.xml --st-dir my_workspace -o updated_project.xml

Documentation

For a detailed project description and complete examples, please see DESCRIPTION.md.

Usage Example (Library)

from plcopener import ProjectExtractor, ProjectInserter

# Extract
ProjectExtractor("project.xml").extract("st_output")

# Insert
ProjectInserter("project.xml").insert("st_output", output_path="updated.xml")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plcopener-0.1.0.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plcopener-0.1.0-py3-none-any.whl (25.8 kB view details)

Uploaded Python 3

File details

Details for the file plcopener-0.1.0.tar.gz.

File metadata

  • Download URL: plcopener-0.1.0.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plcopener-0.1.0.tar.gz
Algorithm Hash digest
SHA256 872b8323a9dc5ebfbae33e30e141a18685bf2b2870593cbbed7835c22783103f
MD5 d7c2ef9bbc9cb6ba2c80d778e742a71c
BLAKE2b-256 6eaec98cae0cac09bd0c7c157ae6d1f73fd6569a29698dbc34ebd2b5d2d76a09

See more details on using hashes here.

File details

Details for the file plcopener-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: plcopener-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for plcopener-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 002d25daf6bd28224e1bdc7c50c4cc5ec7c41ff83753ca11122d891b2ad1eef0
MD5 88f59f0ec53c00f212b1bfd48e78028c
BLAKE2b-256 c761b994ec01990e5224a5e025a42563bcbf85affb276451bf2c2134c06d660d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page