Closed NicoHood closed 6 years ago
I'm inclined to agree. I'm not certain that I like the full URL either. Perhaps, I'll subclass the return string to add a convenient 'strip' method.
In the meantime, you may want to consider:
>>> from urllib.parse import urlsplit
>>> urlsplit("http://192.168.0.1:80").hostname
'192.168.0.1'
Retained the full URL as returned by description.xml, but now provide easy access to IP via a hostname attribute. See commit comments. If that isn't sufficient, please reopen.
Thanks! Could you please give it a new tag, so I can update the AUR Package?
It would be nice if you could consider to sign the package, so in further versions we can check the authenticity of the software. See #2
I'll be rolling this up into a new release including tag and Pypi upload.
As for signing, I've no disagreement but I'm not yet set up to do so. I owe you a reply on #2 when I get a further look at GPGit
Released/Tagged as https://github.com/Overboard/discoverhue/releases/tag/v1.0.2 and up on pypi
For the qhue API it is required to know the IP address without all the https:// stuff. It would be nice if you could add a simple function to also get the ip without this extra url.
This is the code I used to strip the URL: