
Refactor: isolate global scope code into functions (#9, #58)
Previous to this change, some code was being executed bare in the global
scope, unprotected by the `if __name__ == "__main__"` clause.
In this "light" refactor I tried to keep the same logic, but isolating
code into functions that set the usual global variables (they are still
there, getting rid of them is a task for the future).
All the global variables are now defined at the top, then come all the
functions, then come the `if main` clause, where the command line
parsing and sed script validation now occurs.
The new functions:
- parse_command_line()
- set_debug_commands()
- set_colors()
Now the code is more friendly to be used as a Python module, and all of
this was a necessary step to have (in following commits) an entrypoint
and create the pypi package.