A fast, lightweight Windows application for generating XML tags with attributes through a simple text interface.
  • Zig 92.9%
  • C++ 4.5%
  • C 2.6%
Find a file
dikkadev 344aca5ac4 docs(readme): expand usage instructions and feature descriptions
Provide clearer guidance on keyboard shortcuts and available features to improve user understanding and workflow efficiency. The updated README highlights added functionality such as undo/redo, clipboard paste, and XML mode toggle, addressing common user needs for enhanced convenience.
2025-06-03 22:41:07 +02:00
.cursor/rules feat(input): integrate SUI library for reliable keyboard simulation and shift+enter line breaks 2025-05-24 22:35:27 +02:00
.github docs: add screenshot and improve README visual presentation 2025-06-03 22:23:39 +02:00
src refac(xml, undo_redo): modularize XML generation and implement robust undo/redo system 2025-06-01 19:34:43 +02:00
.gitignore feat(ui): add initial text input application with sokol integration 2025-05-23 19:21:55 +02:00
build.zig feat(input): integrate SUI library for reliable keyboard simulation and shift+enter line breaks 2025-05-24 22:35:27 +02:00
build.zig.zon feat(clipboard): add Windows clipboard copy and post-exit typing action with Zeys integration 2025-05-24 00:46:34 +02:00
LICENSE feat(parser): sanitize tag and attribute names by replacing unsupported characters with tilde 2025-05-25 03:03:28 +02:00
README.md docs(readme): expand usage instructions and feature descriptions 2025-06-03 22:41:07 +02:00
SUI.h feat(input): integrate SUI library for reliable keyboard simulation and shift+enter line breaks 2025-05-24 22:35:27 +02:00

Tag - XML Generator UI

A fast, lightweight Windows application for generating XML tags with attributes through a simple text interface.

Tag - XML Generator UI screenshot

Features

  • Real-time XML generation - See XML output update instantly as you type
  • Intuitive syntax - Use tabs to separate tag names, attributes, and values
  • Smart attribute handling - Automatically distinguishes boolean attributes from key-value pairs
  • Two output modes:
    • Type mode (Enter) - Types XML directly into the active application with reliable Shift+Enter line breaks
    • Clipboard mode (Ctrl+Enter or Shift+Enter) - Copies XML to clipboard
  • Undo/Redo support - Undo changes with Ctrl+Z and redo with Ctrl+Y
  • Clipboard paste - Paste clipboard content into a value (after first tab) using Ctrl+V
  • XML mode toggle - Switch between regular tags and self-closing tags (e.g., <br />) with Ctrl+S
  • Special character escaping - Replaces unsupported characters with ~ and escapes &, <, >, and " in attribute values
  • Text wrapping - Automatically wraps long lines in the display view for readability
  • Multi-monitor support - Opens on the monitor where your mouse cursor is located
  • Clean, modern UI - Built with the Sokol graphics library

Quick Start

  1. Run tag.exe
  2. Type your tag structure using tabs to separate elements
  3. (Optional) Use Ctrl+V to paste clipboard content into an attribute value, Ctrl+Z/Ctrl+Y to undo/redo, or Ctrl+S to toggle between regular and self-closing tag modes
  4. Press Enter to type the XML into the active window, or Ctrl+Enter/Shift+Enter to copy XML to the clipboard and quit

Examples

Simple tag

Input:

div

Output:

<div>

</div>

Tag with attributes

Input:

img<tab>src<tab>photo.jpg<tab>alt<tab>A photo

Output:

<img src="photo.jpg" alt="A photo">

</img>

Mixed boolean and key-value attributes

Input:

button<tab>disabled<tab><tab>type<tab>submit

Output:

<button disabled type="submit">

</button>

Controls

  • Type characters - Build your tag structure
  • TAB - Insert tab character (separates tag name, attributes, values)
  • BACKSPACE - Delete last character
  • ENTER - Close the app and type XML with reliable Shift+Enter line breaks
  • CTRL+ENTER or SHIFT+ENTER - Copy XML to clipboard and quit
  • CTRL+V - Paste clipboard content into a value (after first tab)
  • CTRL+Z - Undo last action
  • CTRL+Y - Redo last undone action
  • CTRL+S - Toggle between regular and self-closing XML modes
  • ESC - Cancel and quit immediately

Building

Prerequisites

Build Commands

# Debug build (shows console logs)
zig build

# Release build (no console window)
zig build -Doptimize=ReleaseFast

# Run tests
zig build test

# Run directly
zig build run

Acknowledgments

Special thanks to SUI (Simple User Input) - This project relies on the excellent SUI library by Finxx1 for reliable keyboard input simulation on Windows. SUI provides the robust foundation that makes the typing functionality work seamlessly across different applications.

Technical Details

  • Language: Zig
  • Graphics: Sokol
  • Input Simulation: SUI by Finxx1
  • Platform: Windows (input simulation is Windows-specific)
  • Architecture: Single executable, no external dependencies

License

MIT License - see LICENSE file for details.