DNSが少し不安定な気もしますが、コンパクトなWM3500Rとてもかわいいです。
バッテリーが意外ともつので常時ONにして持ち歩いていると
「バッテリー残量どれくらいだろう・・・(と思ってたらバッテリー切れ)」
なんてことが多くなってきました。バッテリー残量がわかりにくいのはちょっと致命的です。。
と思ってたところにユウタさんのはてダで、バッテリー残量をGrowl通知するpythonスクリプトを発見。
私の環境でも使わせていただくことにしました。
http://d.hatena.ne.jp/yutamoty/20110226/1298706870
#ユウタさんありがとうございます。
が、私の環境(Growl1.3+python2.7)では下記2点で動作しないことが発覚。
- Growl1.3 SDK では python Binding が付属していないため import Growl が使えない
- scrapemark が動作しない(python2.7 でインストールできませんでした...)
- SDK python Binding の代わりに gntp を利用
- scrapemark の代わりに BeautifulSoup を利用
sudo easy_install gntp sudo easy_install beautifulsoup
コードは下記のようにしました。WM3500Rを接続していないときの処理も入れています。
なお、username/passwordは適宜書き換えて利用してくださいね。
あとは、cronに登録して完了です。
私は5分間隔でチェックするようにしました。
もし10分間隔に延ばしたい場合には、 */5 を */10 に書き換えてください。
vi cron.txt */5 * * * * /usr/local/bin/python /path/to/script/wm3500r_batterychecker.py > /dev/null 2>&1 crontab ./cron.txt
以上で設置完了です。
あとはWM3500Rに接続して、定期的にGrowl通知されることを確認してください。
おつかれさまでした。
At the same time, downloads declined to 615 million in 2021, 포커 a year-on-year decrease of 22% after peaking in November 2020. This report wouldn’t be potential without the help from our friends at Sensor Tower. An essential data platform for all cell gaming studios. We've given away over 60 million free Sweeps Coins without any purchases. Read some of the the} stunning issues our prospects have stated about us. ONE Blackjack retains the basics of the sport everyone knows and love, whereas adding a new new} dynamic with large profitable potential over Classic Blackjack.
返信削除