Skip to main content

A small tool to analyse and extract thumbnails rendered into GCODE files

Project description

gcode-thumbnail-tool

A small tool to analyse and extract thumbnails rendered into GCODE files.

Installation

pip install gcode-thumbnail-tool

Usage

As a Python library

import gcode_thumbnail_tool as gtt

path = "/path/to/a/file.gcode"
thumbnails = gtt.extract_thumbnails_from_gcode_file(path)

if result:
    print(
        f'Found {len(result.images)} thumbnails in {args.path}, in format "{result.extractor}":'
    )
    for image in result.images:
        print(f"\t{image.format} @ {image.width}x{image.height}")
else:
    print(f"Didn't find any thumbnails in {args.path}")

See gcode_thumbnail_tool.py:main and tests/test_api.py for more usage examples.

As a command line tool

usage: gcode-thumbnail-tool [-h] [--verbose] {extract,analyse} ...

A small CLI tool to extract thumbnail images from GCODE files.

positional arguments:
  {extract,analyse}
    extract          extracts thumbnails from the provided file as PNGs
    analyse          provides information on the GCODE file's thumbnails

options:
  -h, --help         show this help message and exit
  --verbose, -v      increase logging verbosity

extract

usage: gcode-thumbnail-tool extract [-h] [-o OUTPUT] path

positional arguments:
  path                  path to the GCODE file

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output path for the extracted thumbnails

analyse

usage: gcode-thumbnail-tool analyse [-h] path

positional arguments:
  path        path to the GCODE file

options:
  -h, --help  show this help message and exit

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

gcode_thumbnail_tool-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

gcode_thumbnail_tool-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gcode_thumbnail_tool-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gcode_thumbnail_tool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 44e7a789748f3fc7b611abebcd1dd8952d3e698428076538a5e643480147d7ef
MD5 38d072f4c00817bf8b8d4bc099904768
BLAKE2b-256 fefaaf77560dbc02c2dcbdeac2a8dc5fe4bf43600351a24aa8c1a01ae2c8c9f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for gcode_thumbnail_tool-0.1.0.tar.gz:

Publisher: ci.yml on OctoPrint/gcode-thumbnail-tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for gcode_thumbnail_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f1aafdef8ee17316982474cadf5d29a2294e28e6cf662a9973e8f9886c01f77
MD5 4cba14e86588c3a6e10eff4795a79a65
BLAKE2b-256 be451cd206d64d34a0de53ed29e644907df8b84cae352d7e0f481d5fca1a0deb

See more details on using hashes here.

Provenance

The following attestation bundles were made for gcode_thumbnail_tool-0.1.0-py3-none-any.whl:

Publisher: ci.yml on OctoPrint/gcode-thumbnail-tool

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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