This repository has been archived on 2021-07-15. You can view files and clone it, but cannot push or open issues or pull requests.
tyop/tyop.py

25 lines
679 B
Python
Raw Normal View History

2021-07-06 11:54:26 +00:00
"""Automate your mass typo updates."""
2021-07-06 11:21:31 +00:00
from sys import exit
class Migration:
def __init__(self):
self.validate()
self.run()
def validate(self):
if not hasattr(self, "GLOB"):
print("Define `GLOB` on your migration!")
exit(1)
def run(self):
pass
# TODO:
# For each path in the GLOB
# Load it and pass it into the migrate function
# Once it comes back, save the contents back to the FS
# Run a diff without pager and ask whether that looks ok
# After like 3 tries, ask if "this looks ok" + skip the rest
# Run through each repo and ask to commit + push