Skip to content

Releases: cainky/textswap

v0.2.1

01 Feb 23:13

Choose a tag to compare

What's New

Improved Error Handling

  • Friendly error messages for invalid JSON config files
  • Config validation for missing dictionaries key
  • Skipped files now reported with reasons (UTF-8 encoding issues, permission errors)

Better Dry-Run Output

  • Shows unified diff of changes that would be made
  • Clearer preview of modifications before committing

Code Quality

  • Refactored into smaller, well-documented functions
  • Uses pathlib for safer path operations
  • Added type hints throughout
  • Fixed Python 3.9/3.10/3.11 compatibility

Expanded Test Suite

  • 23 tests covering error conditions, edge cases, and various content types
  • Tests for multiline content, unicode, special characters

Documentation

  • Added "How It Works" section
  • Troubleshooting guide
  • CONTRIBUTING.md for contributors

CI/CD

  • Fixed workflow permissions for better security

v0.1.0 - Initial Release

09 Jan 05:41

Choose a tag to compare

Initial release of textswap.

Features

  • Bulk text replacement across directories
  • Bidirectional swapping (keys→values or values→keys)
  • JSON config for replacement dictionaries
  • Ignore patterns for extensions, directories, and file prefixes
  • Dry run mode to preview changes

Installation

pip install textswap

Usage

textswap -f ./src -d 1 -c config.json