Pastebin: NVDA向け天気予報プラグインのサンプル

NVDAで前橋の天気予報を話す

Format
Python
Post date
2015-07-16 21:01
Publication Period
Unlimited
  1. # coding: utf-8
  2. import globalPluginHandler
  3. import ui
  4. import os
  5. import urllib
  6. class GlobalPlugin(globalPluginHandler.GlobalPlugin):
  7. def script_announceTest(self, gesture):
  8. response = urllib.urlopen('http://rss.weather.yahoo.co.jp/rss/days/10.xml')
  9. res_text = response.read().decode('utf-8')
  10. ui.message( res_text[470:513] )
  11. __gestures = {
  12. "kb:NVDA+shift+v":"announceTest",
  13. }
다운로드 Printable view

URL of this paste

Embed with JavaScript

Embed with iframe

Raw text