<div align="center">
<!-- TODO: Add a screenshot -->
<!-- TODO: Make the text in ted logo partially selected, and put a cursor around the selected area, use monospace font for the text -->
<img src="https://raw.githubusercontent.com/james4ever0/ted/master/logo/ted-black.jpeg" alt="logo" width="270"/>
<p align="center">A simple cross-platform TUI editor with a CLI and API using Textual</p>
<p align="center">
<a href="https://github.com/james4ever0/ted/blob/master/LICENSE"><img alt="License: WTFPL" src="https://img.shields.io/badge/license-UNLICENSE-green.svg?style=flat"></a>
<a href="https://pypi.org/project/ted-editor/"><img alt="PyPI" src="https://img.shields.io/pypi/v/ted-editor"></a>
<a href="https://deepwiki.com/James4Ever0/ted"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
<a href="https://pepy.tech/projects/ted-editor"><img src="https://static.pepy.tech/badge/ted-editor" alt="PyPI Downloads"></a>
<a href="https://github.com/james4ever0/ted"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
</p>
</div>
## Installation
```bash
# 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:**
```bash
ted # Prompts for file path
ted myfile.txt
```
**API:**
```python
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

## See also
[edit](https://github.com/microsoft/edit) (Microsoft rewrite in Rust)
[textual-editor](https://github.com/kyrlian/textual-editor) (Most similar, with a directory tree tab)
[TED](https://texteditors.org/cgi-bin/wiki.pl?TED) (MS-DOS)
[ted](https://github.com/robdelacruz/ted) (Go implementation)
Raw data
{
"_id": null,
"home_page": "https://github.com/James4Ever0/ted",
"name": "ted-editor",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "James Brown",
"author_email": "randomvoidmail@foxmail.com",
"download_url": "https://files.pythonhosted.org/packages/cb/22/2521fc57ae12c2c15f5e4327cd6129af3fc986d5041ed60f82f33c338938/ted_editor-0.1.4.tar.gz",
"platform": null,
"description": "\n<div align=\"center\">\n\n<!-- TODO: Add a screenshot -->\n<!-- TODO: Make the text in ted logo partially selected, and put a cursor around the selected area, use monospace font for the text -->\n\n<img src=\"https://raw.githubusercontent.com/james4ever0/ted/master/logo/ted-black.jpeg\" alt=\"logo\" width=\"270\"/>\n\n<p align=\"center\">A simple cross-platform TUI editor with a CLI and API using Textual</p>\n<p align=\"center\">\n<a href=\"https://github.com/james4ever0/ted/blob/master/LICENSE\"><img alt=\"License: WTFPL\" src=\"https://img.shields.io/badge/license-UNLICENSE-green.svg?style=flat\"></a>\n<a href=\"https://pypi.org/project/ted-editor/\"><img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/ted-editor\"></a>\n<a href=\"https://deepwiki.com/James4Ever0/ted\"><img src=\"https://deepwiki.com/badge.svg\" alt=\"Ask DeepWiki\"></a>\n<a href=\"https://pepy.tech/projects/ted-editor\"><img src=\"https://static.pepy.tech/badge/ted-editor\" alt=\"PyPI Downloads\"></a>\n<a href=\"https://github.com/james4ever0/ted\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>\n</p>\n</div>\n\n\n## Installation\n```bash\n# without syntax highlight\npip install ted-editor\n\n# with syntax highlight\npip install ted-editor[syntax]\n```\n\n### Key Features\n\n1. **Dual Interface**:\n - CLI: `ted <filepath>`\n - API: `ted.edit(content, filepath)`\n\n2. **File Handling**:\n - Prompt for file path if not provided\n - Ask for file creation if doesn't exist\n - Handle permission errors\n\n3. **TUI Editor**:\n - Textual-based interface\n - Save with Ctrl+S or Save button\n - Quit with Ctrl+Q or Quit button\n - Shows modification status in title\n - Auto-save on quit if modified\n\n4. **API Behavior**:\n - `content=None`: Load from file if exists\n - `filepath=None`: Memory-only editing\n - Returns edited content\n\n5. **Cross Platform**:\n - Available in Windows, macOS, Linux\n\n### Usage\n\n**CLI:**\n```bash\nted # Prompts for file path\nted myfile.txt\n```\n\n**API:**\n```python\nfrom ted import edit\n\n# Edit existing file\ncontent = edit(filepath=\"existing.txt\")\n\n# Create new file\nnew_content = edit(content=\"New content\", filepath=\"new.txt\")\n\n# Memory-only editing\ntemp_content = edit(content=\"Temporary text\")\n```\n\n## Screenshots\n\n\n\n## See also\n\n[edit](https://github.com/microsoft/edit) (Microsoft rewrite in Rust)\n\n[textual-editor](https://github.com/kyrlian/textual-editor) (Most similar, with a directory tree tab)\n\n[TED](https://texteditors.org/cgi-bin/wiki.pl?TED) (MS-DOS)\n\n[ted](https://github.com/robdelacruz/ted) (Go implementation)\n",
"bugtrack_url": null,
"license": null,
"summary": "Terminal Text Editor with TUI",
"version": "0.1.4",
"project_urls": {
"Homepage": "https://github.com/James4Ever0/ted"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2501cbb8538f7dfb465334f99d4d806bec1ddd3c81ba5b3129354d1f28009efe",
"md5": "2460c71358bb8d9ce873d24a3f27b15e",
"sha256": "d0a816c5b3bac97f7c53512351fc7d317683be25f5f4d32a7375a05ac96eeb30"
},
"downloads": -1,
"filename": "ted_editor-0.1.4-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "2460c71358bb8d9ce873d24a3f27b15e",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.7",
"size": 9219,
"upload_time": "2025-07-20T17:30:45",
"upload_time_iso_8601": "2025-07-20T17:30:45.228804Z",
"url": "https://files.pythonhosted.org/packages/25/01/cbb8538f7dfb465334f99d4d806bec1ddd3c81ba5b3129354d1f28009efe/ted_editor-0.1.4-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cb222521fc57ae12c2c15f5e4327cd6129af3fc986d5041ed60f82f33c338938",
"md5": "3cafcb155ed4c704fa737043582b0ae9",
"sha256": "c3c0928d8b4fbf99fdd733f30c6f2ca94f5c0377954405385ea2f51a9429ece0"
},
"downloads": -1,
"filename": "ted_editor-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "3cafcb155ed4c704fa737043582b0ae9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 9871,
"upload_time": "2025-07-20T17:30:46",
"upload_time_iso_8601": "2025-07-20T17:30:46.630000Z",
"url": "https://files.pythonhosted.org/packages/cb/22/2521fc57ae12c2c15f5e4327cd6129af3fc986d5041ed60f82f33c338938/ted_editor-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-20 17:30:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "James4Ever0",
"github_project": "ted",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ted-editor"
}