KEYGEN BY VIATRIX.COMPUTER FOR LIVEUPDATE CRESCENDO STREAMSITES streamkeygen.py generates a LiveUpdate Crescendo stream key. When the appropriate key is placed on an internet site, Crescendo will stream the MIDIs from the site in question. Example: python3 ./streamkeygen.py http://example.com/midis/ will create the stream.key file for all MIDIs within the http://example.com/midis/ folder. HOW CRESCENDO CHECKS FOR STREAM KEYS Given the URL of a MIDI file, Crescendo will assemble a stream.key URL by: 1. Removing the fragment (the hash-sign and everything after it) 2. Removing everything after the last slash 3. Appending "stream.key" Examples: http://example.com/midis/song.mid → http://example.com/midis/stream.key https://example.com/midis/song.mid → https://example.com/midis/stream.key http://example.com/?midi=song.mid → http://example.com/stream.key http://example.com/?midi=/song.mid → http://example.com/?midi=/stream.key The stream key must be byte-for-byte the correct one for the URL from step (2). This means, for example, that the same stream key would not work for http:// and https:// versions of the same website, or versions of the same URL with different capitalization or percent-encoding. To circumvent this, the easiest way is to make your s use an absolute URL: Because old browsers are finicky with text encoding, streamkeygen.py auto- matically converts your URL to an ASCII-representable form, and prints a notice if the URL used is different from the URL inputted.