# Scriptum Simplex
A desktop Markdown editor with special support for CriticMarkup syntax, built using Python, Tkinter, and TTK Bootstrap following the Model-View-Controller (MVC) architectural pattern.
## Features
- **Two-pane interface**: Live editor on the left, rendered preview on the right
- **CriticMarkup support**: Full support for all CriticMarkup syntax elements
- **Advanced Markdown rendering**: Complete GitHub Flavored Markdown (GFM) support
- **Table rendering** with column alignment (left/center/right)
- Inline formatting in tables (**bold**, *italic*, `code`)
- Code blocks with syntax highlighting
- Lists, headings, quotes, and more
- **AST-based rendering**: Direct Abstract Syntax Tree rendering for better performance
- **File operations**: New, Open, Save, Save As functionality
- **Modern UI**: Built with TTK Bootstrap for a modern look and feel
- **Cross-platform**: Works on Windows, macOS, and Linux
## CriticMarkup Syntax Supported
- **Additions**: `{++text to add++}`
- **Deletions**: `{--text to delete--}`
- **Substitutions**: `{~~old text~>new text~~}`
- **Comments**: `{>>comment text<<}`
- **Highlights**: `{==highlighted text==}`
## Table Syntax
Scriptum Simplex supports GitHub Flavored Markdown tables with column alignment:
```markdown
| Left Aligned | Center Aligned | Right Aligned |
|:-------------|:--------------:|--------------:|
| Text | Text | Text |
| More | Content | 100 |
```
**Alignment markers:**
- `:---` = Left aligned (default)
- `:---:` = Center aligned
- `---:` = Right aligned
Tables support **inline formatting** like **bold**, *italic*, and `code` within cells.
## Installation
1. **Clone or download this repository**
2. **Install Python dependencies**:
```bash
cd criticmarkup-editor
pip install -r requirements.txt
```
3. **Run the application**:
```bash
python main.py
```
## Dependencies
- `ttkbootstrap>=1.10.1` - Modern Tkinter themes
- `marko>=2.0.0` - Markdown parser with AST support and GFM extensions
- `criticmarkup>=0.7.0` - CriticMarkup processing
- `tk_html_widgets>=0.40` - HTML rendering in Tkinter (for HTML preview)
- `pytest>=7.4.0` - Testing framework
- `mypy>=1.0.0` - Type checking (dev dependency)
- `flake8>=6.0.0` - Code linting (dev dependency)
## Project Structure
```
scriptum-simplex/
├── editor/
│ ├── __init__.py
│ ├── main.py # Application entry point
│ ├── model.py # Data and business logic (Model)
│ ├── view.py # GUI components (View)
│ └── controller.py # Connects Model and View (Controller)
├── tests/
│ ├── __init__.py
│ ├── test_model.py # Unit tests for the model
│ └── test_integration.py # Integration tests
├── main.py # Main launcher script
├── requirements.txt # Python dependencies
└── README.md # This file
```
## Architecture
The application follows the **Model-View-Controller (MVC)** pattern:
- **Model** (`model.py`): Manages data and business logic
- Stores raw Markdown/CriticMarkup text
- Handles file I/O operations
- Converts text to HTML using CriticMarkup and Markdown libraries
- **View** (`view.py`): Manages the user interface
- Creates the main window with two-pane layout
- Handles user input and displays output
- Shows dialogs and manages UI state
- **Controller** (`controller.py`): Coordinates between Model and View
- Handles user actions (menu clicks, text changes)
- Updates the Model based on user input
- Updates the View based on Model changes
## Usage
1. **Start the application** by running `python main.py`
2. **Write Markdown and CriticMarkup** in the left pane:
```markdown
# My Document
This is **bold** text with {++an addition++}.
Here's a {~~mistake~>correction~~} in the text.
{>>This is a comment about the document<<}
{==This section is important==}
```
3. **See the live preview** in the right pane with proper styling for CriticMarkup elements
4. **Use the File menu** to:
- Create new documents (Ctrl+N)
- Open existing files (Ctrl+O)
- Save your work (Ctrl+S)
- Save with a new name (Ctrl+Shift+S)
5. **Use the Edit menu** for standard editing operations:
- Undo/Redo (Ctrl+Z/Ctrl+Y)
- Cut/Copy/Paste (Ctrl+X/Ctrl+C/Ctrl+V)
## Testing
Run the test suite to verify everything works correctly:
```bash
# Run all tests
python -m pytest tests/ -v
# Run only unit tests
python -m pytest tests/test_model.py -v
# Run only integration tests
python -m pytest tests/test_integration.py -v
```
## Development
The codebase is well-documented and follows Python best practices:
- Type hints for better code clarity
- Comprehensive docstrings
- Separation of concerns through MVC pattern
- Extensive test coverage
- Error handling and user feedback
## Keyboard Shortcuts
- `Ctrl+N` - New file
- `Ctrl+O` - Open file
- `Ctrl+S` - Save file
- `Ctrl+Shift+S` - Save as
- `Ctrl+Z` - Undo
- `Ctrl+Y` - Redo
- `Ctrl+X` - Cut
- `Ctrl+C` - Copy
- `Ctrl+V` - Paste
## Contributing
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests for new functionality
5. Run the test suite
6. Submit a pull request
## License
This project is open source. Feel free to use, modify, and distribute as needed.
## Troubleshooting
**Application won't start:**
- Make sure all dependencies are installed: `pip install -r requirements.txt`
- Check that you're using Python 3.7 or later
**Preview not updating:**
- Check the console for error messages
- Verify that the CriticMarkup syntax is correct
**File operations not working:**
- Check file permissions
- Ensure the directory exists and is writable
For more help, check the test files for usage examples or create an issue in the repository.
Raw data
{
"_id": null,
"home_page": "https://sourceforge.net/projects/scriptum-simplex/",
"name": "scriptum-simplex",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "markdown, editor, criticmarkup, change-tracking, typora, themes, css-editor, document-editing, collaborative-editing, gui, tkinter",
"author": "Scriptum Simplex Project",
"author_email": "Scriptum Simplex Project <scriptum.simplex@example.com>",
"download_url": "https://files.pythonhosted.org/packages/31/da/a423e9d8f0da128eefddd9be0e354d80b04aba579a7fdf5bb63ecbf6da23/scriptum_simplex-100.0.tar.gz",
"platform": null,
"description": "# Scriptum Simplex\r\n\r\nA desktop Markdown editor with special support for CriticMarkup syntax, built using Python, Tkinter, and TTK Bootstrap following the Model-View-Controller (MVC) architectural pattern.\r\n\r\n## Features\r\n\r\n- **Two-pane interface**: Live editor on the left, rendered preview on the right\r\n- **CriticMarkup support**: Full support for all CriticMarkup syntax elements\r\n- **Advanced Markdown rendering**: Complete GitHub Flavored Markdown (GFM) support\r\n - **Table rendering** with column alignment (left/center/right)\r\n - Inline formatting in tables (**bold**, *italic*, `code`)\r\n - Code blocks with syntax highlighting\r\n - Lists, headings, quotes, and more\r\n- **AST-based rendering**: Direct Abstract Syntax Tree rendering for better performance\r\n- **File operations**: New, Open, Save, Save As functionality\r\n- **Modern UI**: Built with TTK Bootstrap for a modern look and feel\r\n- **Cross-platform**: Works on Windows, macOS, and Linux\r\n\r\n## CriticMarkup Syntax Supported\r\n\r\n- **Additions**: `{++text to add++}`\r\n- **Deletions**: `{--text to delete--}`\r\n- **Substitutions**: `{~~old text~>new text~~}`\r\n- **Comments**: `{>>comment text<<}`\r\n- **Highlights**: `{==highlighted text==}`\r\n\r\n## Table Syntax\r\n\r\nScriptum Simplex supports GitHub Flavored Markdown tables with column alignment:\r\n\r\n```markdown\r\n| Left Aligned | Center Aligned | Right Aligned |\r\n|:-------------|:--------------:|--------------:|\r\n| Text | Text | Text |\r\n| More | Content | 100 |\r\n```\r\n\r\n**Alignment markers:**\r\n- `:---` = Left aligned (default)\r\n- `:---:` = Center aligned\r\n- `---:` = Right aligned\r\n\r\nTables support **inline formatting** like **bold**, *italic*, and `code` within cells.\r\n\r\n## Installation\r\n\r\n1. **Clone or download this repository**\r\n\r\n2. **Install Python dependencies**:\r\n ```bash\r\n cd criticmarkup-editor\r\n pip install -r requirements.txt\r\n ```\r\n\r\n3. **Run the application**:\r\n ```bash\r\n python main.py\r\n ```\r\n\r\n## Dependencies\r\n\r\n- `ttkbootstrap>=1.10.1` - Modern Tkinter themes\r\n- `marko>=2.0.0` - Markdown parser with AST support and GFM extensions\r\n- `criticmarkup>=0.7.0` - CriticMarkup processing\r\n- `tk_html_widgets>=0.40` - HTML rendering in Tkinter (for HTML preview)\r\n- `pytest>=7.4.0` - Testing framework\r\n- `mypy>=1.0.0` - Type checking (dev dependency)\r\n- `flake8>=6.0.0` - Code linting (dev dependency)\r\n\r\n## Project Structure\r\n\r\n```\r\nscriptum-simplex/\r\n\u251c\u2500\u2500 editor/\r\n\u2502 \u251c\u2500\u2500 __init__.py\r\n\u2502 \u251c\u2500\u2500 main.py # Application entry point\r\n\u2502 \u251c\u2500\u2500 model.py # Data and business logic (Model)\r\n\u2502 \u251c\u2500\u2500 view.py # GUI components (View)\r\n\u2502 \u2514\u2500\u2500 controller.py # Connects Model and View (Controller)\r\n\u251c\u2500\u2500 tests/\r\n\u2502 \u251c\u2500\u2500 __init__.py\r\n\u2502 \u251c\u2500\u2500 test_model.py # Unit tests for the model\r\n\u2502 \u2514\u2500\u2500 test_integration.py # Integration tests\r\n\u251c\u2500\u2500 main.py # Main launcher script\r\n\u251c\u2500\u2500 requirements.txt # Python dependencies\r\n\u2514\u2500\u2500 README.md # This file\r\n```\r\n\r\n## Architecture\r\n\r\nThe application follows the **Model-View-Controller (MVC)** pattern:\r\n\r\n- **Model** (`model.py`): Manages data and business logic\r\n - Stores raw Markdown/CriticMarkup text\r\n - Handles file I/O operations\r\n - Converts text to HTML using CriticMarkup and Markdown libraries\r\n\r\n- **View** (`view.py`): Manages the user interface\r\n - Creates the main window with two-pane layout\r\n - Handles user input and displays output\r\n - Shows dialogs and manages UI state\r\n\r\n- **Controller** (`controller.py`): Coordinates between Model and View\r\n - Handles user actions (menu clicks, text changes)\r\n - Updates the Model based on user input\r\n - Updates the View based on Model changes\r\n\r\n## Usage\r\n\r\n1. **Start the application** by running `python main.py`\r\n\r\n2. **Write Markdown and CriticMarkup** in the left pane:\r\n ```markdown\r\n # My Document\r\n \r\n This is **bold** text with {++an addition++}.\r\n \r\n Here's a {~~mistake~>correction~~} in the text.\r\n \r\n {>>This is a comment about the document<<}\r\n \r\n {==This section is important==}\r\n ```\r\n\r\n3. **See the live preview** in the right pane with proper styling for CriticMarkup elements\r\n\r\n4. **Use the File menu** to:\r\n - Create new documents (Ctrl+N)\r\n - Open existing files (Ctrl+O)\r\n - Save your work (Ctrl+S)\r\n - Save with a new name (Ctrl+Shift+S)\r\n\r\n5. **Use the Edit menu** for standard editing operations:\r\n - Undo/Redo (Ctrl+Z/Ctrl+Y)\r\n - Cut/Copy/Paste (Ctrl+X/Ctrl+C/Ctrl+V)\r\n\r\n## Testing\r\n\r\nRun the test suite to verify everything works correctly:\r\n\r\n```bash\r\n# Run all tests\r\npython -m pytest tests/ -v\r\n\r\n# Run only unit tests\r\npython -m pytest tests/test_model.py -v\r\n\r\n# Run only integration tests\r\npython -m pytest tests/test_integration.py -v\r\n```\r\n\r\n## Development\r\n\r\nThe codebase is well-documented and follows Python best practices:\r\n\r\n- Type hints for better code clarity\r\n- Comprehensive docstrings\r\n- Separation of concerns through MVC pattern\r\n- Extensive test coverage\r\n- Error handling and user feedback\r\n\r\n## Keyboard Shortcuts\r\n\r\n- `Ctrl+N` - New file\r\n- `Ctrl+O` - Open file\r\n- `Ctrl+S` - Save file\r\n- `Ctrl+Shift+S` - Save as\r\n- `Ctrl+Z` - Undo\r\n- `Ctrl+Y` - Redo\r\n- `Ctrl+X` - Cut\r\n- `Ctrl+C` - Copy\r\n- `Ctrl+V` - Paste\r\n\r\n## Contributing\r\n\r\n1. Fork the repository\r\n2. Create a feature branch\r\n3. Make your changes\r\n4. Add tests for new functionality\r\n5. Run the test suite\r\n6. Submit a pull request\r\n\r\n## License\r\n\r\nThis project is open source. Feel free to use, modify, and distribute as needed.\r\n\r\n## Troubleshooting\r\n\r\n**Application won't start:**\r\n- Make sure all dependencies are installed: `pip install -r requirements.txt`\r\n- Check that you're using Python 3.7 or later\r\n\r\n**Preview not updating:**\r\n- Check the console for error messages\r\n- Verify that the CriticMarkup syntax is correct\r\n\r\n**File operations not working:**\r\n- Check file permissions\r\n- Ensure the directory exists and is writable\r\n\r\nFor more help, check the test files for usage examples or create an issue in the repository.\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Markdown editor with CriticMarkup support and Typora theme editor",
"version": "100.0",
"project_urls": {
"Bug Tracker": "https://sourceforge.net/p/scriptum-simplex/tickets/",
"Documentation": "https://sourceforge.net/p/scriptum-simplex/wiki/",
"Homepage": "https://sourceforge.net/projects/scriptum-simplex/",
"Repository": "https://sourceforge.net/p/scriptum-simplex/code/"
},
"split_keywords": [
"markdown",
" editor",
" criticmarkup",
" change-tracking",
" typora",
" themes",
" css-editor",
" document-editing",
" collaborative-editing",
" gui",
" tkinter"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "383c91e13f5e4efb81beb7c5d196a9def551898b5517be6dcaccb8a2e4dafc92",
"md5": "4ed96c04bcaebc79ea7a2aa1e871dad9",
"sha256": "d432237ab7e8e00cc4dc80865b3d547538bab2496ec3f2251dabd0d33434b7ae"
},
"downloads": -1,
"filename": "scriptum_simplex-100.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4ed96c04bcaebc79ea7a2aa1e871dad9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 103135,
"upload_time": "2025-10-12T19:43:03",
"upload_time_iso_8601": "2025-10-12T19:43:03.592990Z",
"url": "https://files.pythonhosted.org/packages/38/3c/91e13f5e4efb81beb7c5d196a9def551898b5517be6dcaccb8a2e4dafc92/scriptum_simplex-100.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "31daa423e9d8f0da128eefddd9be0e354d80b04aba579a7fdf5bb63ecbf6da23",
"md5": "2ab8ffa6568a9b4cb8a950a98df3f660",
"sha256": "9d11e514dc438cdf940261c188b67a0d0f6cd5d7e987fc0b729dbadeed00e549"
},
"downloads": -1,
"filename": "scriptum_simplex-100.0.tar.gz",
"has_sig": false,
"md5_digest": "2ab8ffa6568a9b4cb8a950a98df3f660",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 117755,
"upload_time": "2025-10-12T19:43:05",
"upload_time_iso_8601": "2025-10-12T19:43:05.145161Z",
"url": "https://files.pythonhosted.org/packages/31/da/a423e9d8f0da128eefddd9be0e354d80b04aba579a7fdf5bb63ecbf6da23/scriptum_simplex-100.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-12 19:43:05",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "scriptum-simplex"
}