Skip to main content

Terminal Text Editor with TUI

Project description

logo

A simple cross-platform TUI editor with a CLI and API using Textual

License: WTFPL PyPI Ask DeepWiki PyPI Downloads Code style: black

Installation

# without syntax highlight
pip install ted-editor

# with syntax highlight
pip install ted-editor[syntax]

Key Features

  1. Dual Interface:

    • CLI: ted <filepath>
    • API: ted.edit(content, filepath)
  2. File Handling:

    • Prompt for file path if not provided
    • Ask for file creation if doesn't exist
    • Handle permission errors
  3. TUI Editor:

    • Textual-based interface
    • Save with Ctrl+S or Save button
    • Quit with Ctrl+Q or Quit button
    • Shows modification status in title
    • Auto-save on quit if modified
  4. API Behavior:

    • content=None: Load from file if exists
    • filepath=None: Memory-only editing
    • Returns edited content
  5. Cross Platform:

    • Available in Windows, macOS, Linux

Usage

CLI:

ted  # Prompts for file path
ted myfile.txt

API:

from ted import edit

# Edit existing file
content = edit(filepath="existing.txt")

# Create new file
new_content = edit(content="New content", filepath="new.txt")

# Memory-only editing
temp_content = edit(content="Temporary text")

Screenshots

Demo

See also

edit (Microsoft rewrite in Rust)

textual-editor (Most similar, with a directory tree tab)

TED (MS-DOS)

ted (Go implementation)

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

ted_editor-0.1.4.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

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

ted_editor-0.1.4-py2.py3-none-any.whl (9.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ted_editor-0.1.4.tar.gz.

File metadata

  • Download URL: ted_editor-0.1.4.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.19

File hashes

Hashes for ted_editor-0.1.4.tar.gz
Algorithm Hash digest
SHA256 c3c0928d8b4fbf99fdd733f30c6f2ca94f5c0377954405385ea2f51a9429ece0
MD5 3cafcb155ed4c704fa737043582b0ae9
BLAKE2b-256 cb222521fc57ae12c2c15f5e4327cd6129af3fc986d5041ed60f82f33c338938

See more details on using hashes here.

File details

Details for the file ted_editor-0.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: ted_editor-0.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.19

File hashes

Hashes for ted_editor-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d0a816c5b3bac97f7c53512351fc7d317683be25f5f4d32a7375a05ac96eeb30
MD5 2460c71358bb8d9ce873d24a3f27b15e
BLAKE2b-256 2501cbb8538f7dfb465334f99d4d806bec1ddd3c81ba5b3129354d1f28009efe

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