Add function to convert between a user source and a repo which can be passed to dnf-json. This is neccessary because user-defined sources have a slightly different format than dnf repos.