How to assign a keyboard shortcut to a script in 2.8?

Title says it all. I don’t need a detailed step-by-step tutorial, just a general description of what should I do, because there doesn’t seem to be a way to just save a script and assign it in keymap editor.

Try this LINK