dots
dots copied to clipboard
Verbose and "dry-run" mode
Dots should have a verbose mode that tells you all the files it is about to copy and what processing (substitutions, installation scripts, etc) are being performed.
Following that, it'd be nice to have a "dry-run" mode where it tells you what will be copied, but does not actually copied.
I like the idea of verbosity. I'd like to keep the UI logic out of the two classes. So I'm thinking some kind of notification/signaling/event manager object that can be signaled for something and then that object (or maybe, if being really generic, some kind of UI handler could subscribe to it) would trigger UI output.
dry run also sounds good also.
An event system seems overkill… was there some framework like gevent/Qt/etc you had in mind or did you want to roll your own?
Given the nature of dots, will there ever be a need for multiple UIs?
I wasn't thinking anything complicated, just something like
class NotificationManager(object):
def __init__(self):
listeners = {}
def notify(self, event_name, *args, **kwargs):
for subscriber in self.listeners:
subscriber(*args, **kwargs)
def subscribe(self, event_name, function):
self.listeners[event_name].append(function)
And then setup a UI handler that subscribes to events or something along those lines.. Though maybe you're right. I just hate having to pass around a flag for verbosity.