tilmanginzel / alfred-bluetooth-workflow

Yet another Alfred workflow to connect / disconnect Bluetooth devices
MIT License
189 stars 8 forks source link

Remove lxml dependency #14

Closed tilmanginzel closed 4 years ago

tilmanginzel commented 4 years ago

Hi @trietsch, would be cool if you can review this one.

Changes:

I bumped the version to 0.8.0 in case https://github.com/tilmanginzel/alfred-bluetooth-workflow/pull/13 gets merged first.

tilmanginzel commented 4 years ago

Version to test: Bluetooth Connector.alfredworkflow.zip

Note: this does not contain the notification fix from #13.

trietsch commented 4 years ago

Looks good! Pretty nice that you've already answered possible questions that I could have had while reviewing. I agree on the tradeoff by the way, though blueutil had support for percentage in previous versions? Would you like to merge #13 first or this one first?

trietsch commented 4 years ago

Btw, don't forget to remove the remaining __init__.pyc file in the lxml dir.

tilmanginzel commented 4 years ago

Thanks for the quick review!

though blueutil had support for percentage in previous versions?

No it did not. I previously parsed the output of system_profiler SPBluetoothDataType -xml, which contained battery percentage information. blueutil is using the IOBluetooth api, which apparently does not show this information (but I haven't checked in detail, just that blueutil is not exposing it).

Would you like to merge #13 first or this one first?

Yup, I will merge both first thing in the morning tomorrow. :)

Btw, don't forget to remove the remaining init.pyc file in the lxml dir.

Ah, good point! I thought I removed the whole directory. Will keep an eye on it when exporting a version for the release.

trietsch commented 4 years ago

Cool, sounds good! On the feature of getting battery percentage, we may be able to use IO registry. Did some research and found this in Hammerspoon, and this on Apple StackExchange.

tilmanginzel commented 4 years ago

I just merged both pull requests and published them under version 0.7.0.

Thanks for checking on the battery percentage stuff. I think we can keep it in mind for future releases. :)