Skip to main content

A comprehensive environment for hardware and firmware reverse engineering, analysis and management

Project description

Twinizer

Overview

Twinizer is a comprehensive toolkit for creating and manipulating digital twins of hardware and software systems. It provides a collection of converters, analyzers, and utilities to transform various input formats into useful representations for digital twin applications.

Features

Hardware Analysis

  • KiCad Integration: Parse and convert KiCad schematics and PCB layouts
  • Altium Integration: Support for Altium Designer files
  • 3D Model Generation: Convert PCB designs to 3D models

Software Analysis

  • Dependency Analysis: Analyze project dependencies across various languages and build systems
  • Decompilation: Convert binary files to higher-level representations
  • Disassembly: Disassemble binary files into assembly code

Converters

  • PDF to Markdown: Convert PDF documents to Markdown format
  • Image Processing:
    • ASCII Art: Convert images to ASCII art
    • Mermaid Diagrams: Generate Mermaid diagrams from images
    • 3D Models: Convert images to height maps, normal maps, 3D meshes, and point clouds
  • Binary to Source: Convert binary files to source code representations

Installation

Using pip

pip install twinizer

From Source

git clone https://github.com/yourusername/twinizer.git
cd twinizer
pip install -e .

Dependencies

Twinizer has several optional dependencies that enable specific features:

# For image processing features
pip install matplotlib

# For KiCad integration (required for hardware analysis)
# KiCad must be installed on your system for full functionality

# For PDF conversion
pip install pdfminer.six

# For all optional dependencies
pip install twinizer[all]

Usage

Command Line Interface

Twinizer provides a comprehensive command-line interface for all its functionality:

# Show help and available commands
twinizer --help

# Analyze project structure
twinizer analyze structure --source-dir /path/to/project

# Convert between file formats
twinizer convert pdf-to-markdown /path/to/document.pdf --output document.md

# Work with KiCad files
twinizer kicad sch-to-mermaid /path/to/schematic.sch --diagram-type flowchart --output schematic.mmd
twinizer kicad sch-to-bom /path/to/schematic.sch --format csv --output bom.csv
twinizer kicad pcb-to-mermaid /path/to/pcb.kicad_pcb --diagram-type flowchart --output pcb.mmd

Project Structure

twinizer/
├── src/
│   ├── twinizer/
│   │   ├── cli/               # Command-line interface
│   │   │   └── commands/      # CLI command modules
│   │   ├── converters/        # File format converters
│   │   │   ├── pdf2md/        # PDF to Markdown conversion
│   │   │   ├── image/         # Image processing
│   │   │   └── bin2source/    # Binary to source code conversion
│   │   ├── hardware/          # Hardware analysis
│   │   │   ├── kicad/         # KiCad file parsing
│   │   │   └── altium/        # Altium file parsing
│   │   ├── software/          # Software analysis
│   │   │   ├── analyze/       # Code analysis
│   │   │   ├── decompile/     # Decompilation
│   │   │   └── disassemble/   # Disassembly
│   │   └── utils/             # Utility functions
├── scripts/                   # Utility scripts
├── tests/                     # Test suite
├── docs/                      # Documentation
├── examples/                  # Example code
├── pyproject.toml             # Project configuration
└── README.md                  # This file

Examples

See the examples/ directory for example scripts demonstrating various features of Twinizer.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

twinizer-0.1.8.tar.gz (109.3 kB view details)

Uploaded Source

Built Distribution

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

twinizer-0.1.8-py3-none-any.whl (135.4 kB view details)

Uploaded Python 3

File details

Details for the file twinizer-0.1.8.tar.gz.

File metadata

  • Download URL: twinizer-0.1.8.tar.gz
  • Upload date:
  • Size: 109.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for twinizer-0.1.8.tar.gz
Algorithm Hash digest
SHA256 85557d8a1624491f6a22fb17adc505af5fd7a93b84d8b5b54743e524313711e8
MD5 29fa74e36b2c631f3f9a685b3c049052
BLAKE2b-256 cbfef4e335253b196c00bc6b563a14d8f74b2a33260923b9aa6ac16aa3e2ffa5

See more details on using hashes here.

File details

Details for the file twinizer-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: twinizer-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 135.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for twinizer-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0fbdc6b788255e178833de4a631efb867d3d9875520ee779b107b176de451f5a
MD5 a9d04e099b76f27ed12a4e61ceb55c30
BLAKE2b-256 9f62f27c8f883a4e68e891860dd6a1b3b097653d670e56a3c17694d067c28f9c

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