Documentation

Adds docstrings and a first draft of a user manual.
Yeah, we can do a simple replace-in-string, but then we'd fail to handle cases where the % is "escaped", like `%%d`.