超级编辑器 – 具有自动备份功能的原子文件编辑器(Python 和 Go)

2作者: larryste2 个月前原帖
我在对自动化工作流中的不安全文件操作感到沮丧后构建了这个工具。<p><pre><code> 主要特点: • 原子写入(没有部分或损坏的文件) • 在每次更改之前自动进行 ZIP 备份 • 基于正则表达式和抽象语法树的文本替换 • 1,050 个自动化测试,100% 通过率 • 双重实现(Python + Go,Go 速度快 20 倍) 使用场景: • 修改配置文件的 CI/CD 流水线 • 自动化重构脚本 • 任何文件损坏可能导致灾难的工作流 PyPI: https://pypi.org/project/super-editor/ GitHub: https://github.com/larryste1/super-editor 希望能收到 HN 社区的反馈!</code></pre>
查看原文
I built this after getting frustrated with unsafe file operations in automation workflows.<p><pre><code> Key features: • Atomic writes (no partial&#x2F;corrupted files) • Automatic ZIP backups before every change • Regex and AST-based text replacement • 1,050 automated tests with 100% pass rate • Dual implementation (Python + Go, Go is 20x faster) Use cases: • CI&#x2F;CD pipelines that modify config files • Automated refactoring scripts • Any workflow where file corruption would be catastrophic PyPI: https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;super-editor&#x2F; GitHub: https:&#x2F;&#x2F;github.com&#x2F;larryste1&#x2F;super-editor Would love feedback from the HN community!</code></pre>