|
4 | 4 | import sublime |
5 | 5 | import sublime_plugin |
6 | 6 |
|
| 7 | +greeting = ''' |
| 8 | +Thanks for trying out PythonVoiceCodingPlugin! |
| 9 | + |
| 10 | +To complete your installation, you need to copy the bundled grammar for your version of Caster into your appropriate Caster user directory. Afterwards reboot Caster and if needed enable the grammar by saying |
| 11 | + |
| 12 | +enable python voice coding plugin |
| 13 | + |
| 14 | +You can retrieve those grammars under |
| 15 | + |
| 16 | +Preferences > Package Settings > PythonVoiceCodingPlugin |
| 17 | + |
| 18 | +where you will also find links to documentation with lots of examples and my gitter chatroom for questions and troubleshooting. |
| 19 | + |
| 20 | +To make your life easier with the copy pasting, if you're on windows and using Caster 1.x.x, there is also utility to handle this process automatically for you! Do you want to run it? |
| 21 | +''' |
| 22 | + |
| 23 | + |
| 24 | +def plugin_loaded(): |
| 25 | + window = sublime.active_window() |
| 26 | + try : |
| 27 | + from package_control import events |
| 28 | + if events.install("PythonVoiceCodingPlugin"): |
| 29 | + if sublime.yes_no_cancel_dialog(greeting)!=sublime.DIALOG_YES: |
| 30 | + return |
| 31 | + window.run_command("quick_install_python_voice_coding_plugin",{}) |
| 32 | + except : |
| 33 | + pass |
7 | 34 |
|
8 | 35 |
|
9 | 36 |
|
|
0 commit comments