Git Product home page Git Product logo

construct-editor's Introduction

Construct Editor

!!! Work in progress !!!

This package provides a GUI (based on wxPython) for 'construct', which is a powerful declarative and symmetrical parser and builder for binary data. It can either be used standalone or embedded as a widget in another application.

Preview

Installation

The preferred way to installation is via PyPI:

pip install construct-editor

Getting started (Standalone)

To start the standalone version, just execute the following in the command line:

construct-editor

Getting started (as Widgets)

This is a simple example

import wx
import construct as cs
import construct_editor as cseditor

constr = cs.Struct(
    "a" / cs.Int16sb,
    "b" / cs.Int16sb,
)
b = bytes([0x12, 0x34, 0x56, 0x78])

app = wx.App(False)
frame = wx.Frame(None, title="Construct Hex Editor", size=(1000, 500))
editor_panel = cseditor.ConstructHexEditor(frame, construct=constr, binary=b)
editor_panel.construct_editor.expand_all()
frame.Show(True)
app.MainLoop()

This snipped generate a gui like this:

[Screenshot of the example]

Widgets

ConstructHexEditor

This is the main widget ot this library. It offers a look at the raw binary data and also at the parsed structure. It offers a way to modify the raw binary data, which is then automaticly converted to the structed view. And also it support to modify the structed data and build the binary data from it.

ConstructEditor

This is just the right side of the ConstructHexEditor, but can be used also used as standalone widget. It provides:

  • Viewing the structure of a construct (without binary data)
  • Parsing binary data according to the construct

HexEditor

Just the left side of the ConstructHexEditor, but can be used also used as standalone widget. It provides:

  • Viewing Bytes in a Hexadecimal form
  • Callbacks when some value changed
  • Changeable format via TableFormat

construct-editor's People

Contributors

timrid avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.