Ruplacer is a command-line tool written in Rust for finding and replacing text in files. It supports literal string, regex, and case-preserving replacements, and provides a diff-like output of changes. The tool respects .gitignore, allows filtering by file type, and can operate in a dry-run mode. The architecture is modular, with separate modules for argument parsing, console output, directory traversal, file processing, and the core replacement logic. The replacement logic is particularly notable for its use of the strategy pattern to handle different matching algorithms in a uniform way.
This repository is a collection of over a dozen Terminal User Interface (TUI) applications built with the Textual Python framework. The apps serve educational and recreational purposes: interactive exercises for learning CLI tools (awk, sed, grep), Python regular expressions, Python programming fundamentals, and two original grid-based games (Connect Square, Square Tic Tac Toe). Each app is self-contained, with a similar architectural pattern: an App subclass defines widgets, binds keys, and handles user input. The exercise apps execute user commands via subprocess and compare output to expected results; the regex playground and Python exercises evaluate Python expressions in a sandbox; the games implement AI opponents using weight-based heuristics. The code is clean, well-structured, and consistently styled, though the exercise apps share a large amount of boilerplate. The repository is actively maintained (1015 stars, 0 open issues, recent commits) and demonstrates solid craftsmanship, particularly in the game AI algorithms and custom Textual widget subclasses.