Skip to main content

Enigma TUI is a Terminal User Interface for Enigma machines, allowing you to simulate different Enigma machine models from the terminal

Project description

Enigma TUI (Terminal User Interface)

Enigma TUI

Enigma TUI is a Terminal User Interface for Enigma machines, allowing you to simulate different Enigma machine models from the terminal.

Built with Python, it employs enigmapython as Enigma engine and textual to render the interface.

Prerequisites

  • Python 3.11
  • Clone this repo, checkout the desired branch/tag and install requirements (pip install -r requirements.txt) or directly from PyPI using pip install enigmatui

How to run Enigma TUI

Use Python to run Enigma TUI's package

$ python enigmatui

How it works

Reading the usage instructions is more difficult than using the application itself.

Enigma TUI has a fairy simple user interface with a couple of screens to let you configure an Enigma machine (among the supported models) and encrypt/decrypt messages, plus seeing in realtime the machine internals (rotors positions, wirings) and how a single letter is scrambled from the keyboard to rotors, through reflector and back up to lamp.

Please refer to the following flowchart to navigate the app.

flowchart TD
%% Nodes
    A("Splash screen")
    B("Main screen")
    C("Configure screen")
    D("De/Encrypt screen")


%% Edge connections between nodes
    Start([Start]) --> A
    A -- Go to app --> B 
    C -- Save and exit --> B
    B -- Configure --> C
    B -- De/Encrypt --> D
    D -- Back --> B
    A -- Quit --> End([Stop])
    B -- Quit --> End([Stop])
    C -- Quit --> End([Stop])
    D -- Quit --> End([Stop])

Run Enigma TUI in development mode

By following this procedure, you leverage pytest-watch to live reloading the application upon Python code change. In addition, thanks to the textual run command with its --dev flag, changing the stylesheets reflects to the interface instantly.

$ pip install -r requirements-dev.txt
$ cd src/tui
$ ptw --runner "textual run --dev  enigmatui/__main__.py"      

The above commands are valid provided that you cloned the enigma-tui repository from GitHub and your terminal is in the repository's root directory.

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

enigmatui-1.0.2.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

enigmatui-1.0.2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file enigmatui-1.0.2.tar.gz.

File metadata

  • Download URL: enigmatui-1.0.2.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for enigmatui-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7662cee3cc75f4b69cd959c19618e77513e3867beab35fe407269a5a0dad2d0f
MD5 90a9deee75aed8ea8cc96ade146d0f26
BLAKE2b-256 9bc3d360ae7e6a79c0327a009d6f42cf4df23f1c98cb1329ea3faef2fb3a1051

See more details on using hashes here.

File details

Details for the file enigmatui-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: enigmatui-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for enigmatui-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7e8b0a7cb4e5408b4638a38b57ed5824b673b7e28da93fabfb2e96cea354cc6a
MD5 1053af400a0aacd2c9d40a62d7d09c1a
BLAKE2b-256 df1e893e619be9c0ddcf04b1f1d23b661fa9654102ef09f37d78feeca36bce7c

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