Skip to content

Commit

Permalink
Merge pull request #8 from mpourmpoulis/develop-0.1.0
Browse files Browse the repository at this point in the history
Develop 0.1.0 Is currently merging
  • Loading branch information
mpourmpoulis authored Jan 27, 2020
2 parents 08870f7 + f7dc3b4 commit ba97f95
Show file tree
Hide file tree
Showing 153 changed files with 5,276 additions and 889 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## [Unreleased]

### Added

* upgrades in the paste back query where it can now support surrounded punctuation.

* the module delete alternatives has been added.

* View information now also exposes they get regions sublime API

* The interface module now has a clear_actions methods to flush the already pushed actions.

### Fixed

* fixed an important bug in the insertion query module. the writing positions were sorted, but on an ascending order which simply broke everything when there are multiple of them. Fix this to sort them in descending order, so the changes that are executed first do not affect the others.

### Changed

* the application module has been adopted, sought after selection queries we do not only store that arraigns corresponding to the main result in the alternative but we also keep the corresponding text.

* the paste back query now reads the corresponding text directly from the state instead of getting their location and obtaining from the code as it did in the past

## [0.0.4] - 2019-11-27

Expand Down
37 changes: 30 additions & 7 deletions Main.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,36 @@
"args":{
"url":"https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/blob/master/doc/README.md"
}
},
{
"caption": "Operations",
"command": "open_url",
"args":{
"url": "https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/blob/master/doc/Operations.md"
}
},
{
"caption": "Sub Indexing",
"command": "open_url",
"args":{
"url": "https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/blob/master/doc/SubIndexing.md"
}
},
{
"caption": "CollectionQueries",
"command": "open_url",
"args":{
"url": "https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/blob/master/doc/CollectionQueries.md"
}
},
{
"caption": "Grammar Installation",
"command": "open_url",
"args":{
"url": "https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/blob/master/bundles/README.md"
}
}



]
Expand All @@ -56,13 +85,7 @@
"url": "https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/issues"
}
},
{
"caption": "Grammar Installation",
"command": "open_url",
"args":{
"url": "https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/blob/master/bundles/README.md"
}
},

{
"caption":"Grammar for Caster 1.0.0",
"command": "open_file",
Expand Down
128 changes: 52 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)

![](https://img.shields.io/static/v1?label=Version&message=0.0.4&color=green)
![](https://img.shields.io/static/v1?label=Version&message=0.1.0&color=green)

![](https://img.shields.io/static/v1?label=Caster&message=0.5.11|0.6.11|1.0.0&color=blue)

Expand All @@ -15,25 +15,42 @@
PythonVoiceCodingPlugin is a Sublime Text 3 plugin meant to enhance user experience
when coding python 3 by voice.

![](doc/gif/arg5.gif)
![](doc/gif/big37.gif)


## Update
## Contents

Release 0.0.5 he's out fixing problems of 0.0.4 regarding the installation via package control and adds a useful utilities under Preferences > Package Settings > PythonVoiceCodingPlugin iincluding links to online documentation issues, grammar bundles and so on. It is meant to be only temporary i'm currently wrapping up the development of 0.1.0. Also you should know that Caster 1.x.x is also supported but you must enable it by saying
<!-- MarkdownTOC autolink="true" -->

- [Documentation](#documentation)
- [Motivation](#motivation)
- [Release and Version](#release-and-version)
- [Limitations](#limitations)
- [Installation](#installation)
- [Package Control](#package-control)
- [note for those who installed between 0.0.4 and 0.0.5](#note-for-those-who-installed-between-004-and-005)
- [Git Install](#git-install)
- [Support for voice coding framework](#support-for-voice-coding-framework)
- [License](#license)
- [Dependencies](#dependencies)
- [Acknowledgements](#acknowledgements)
- [Useful Learning Resources](#useful-learning-resources)
- [Development tools](#development-tools)

<!-- /MarkdownTOC -->

```
enable python voice coding plugin
```

if you have any problem or questions regarding installation , whether of the plug-in itself or the grammar necessary to use it please let me know at my issues!


you can now also install via package control, see installation instructions [below](#installation)

## Documentation

Documentation is available [here](doc/README.md)
Documentation is available [here](doc/README.md) you can also find links to documentation under

```
Preferences > Package Settings > PythonVoiceCodingPlugin
```



## Motivation
Expand All @@ -44,14 +61,14 @@ with [Caster](https://github.com/dictation-toolbox/Caster). Despite the excelle
In particular, navigation through the code sometimes felt a little bit too mechanistic. Say for instance you want to go to some location or select some text. For the most part ,you are describing what actions
need to be taken to get there. What if you could instead simply describe (syntactically) what you want to select?

![](doc/gif/big3.gif)
![](doc/gif/arg17.gif)

PythonVoiceCodingPlugin tries to enable you to do just that!
To provide this functionality, it ships with bundles the implement a grammar, hopefully expressive enough for describing regions of interest, while running on the voice coding macro system side. These bundles
cooperate with the core plugin, running on the editor side, arguably the more suitable of the two environments
for analyzing source code and decoding the meaning of queries within the given context.

![](doc/gif/d4.gif)
![](doc/gif/op2.gif)


I want to be honest. This is not exactly the best code ever written. It is far from it:) And it is far from the full functionality i would want it to offer. Nonetheless, I still think that PythonVoiceCodingPlugin is a tool that :
Expand All @@ -76,7 +93,7 @@ I want to be honest. This is not exactly the best code ever written. It is far f
* is partly customizable. If you find yourself using certain commands with some given parameters often and want a shorthand smaller command, you can always follow my commented banana example:)


![](doc/gif/d5.gif)
![](doc/gif/op37.gif)

As I said, far (really far) from perfect but nonetheless an out-of-the-box solution which I hope to be helpful ,especially for beginners to get up to speed , and a step towards the right direction. I hope you enjoy using it as much as I have enjoyed coding it:)

Expand All @@ -85,15 +102,9 @@ Needless to say, while coding PythonVoiceCodingPlugin , PythonVoiceCodingPlugin
## Release and Version

The code is available on [github](https://github.com/mpourmpoulis/PythonVoiceCodingPlugin)
along with its initial release (0.0.0)!

### Update 0.0.5
The latest release is 0.1.0!

Release 0.0.5 he's out fixing problems of 0.0.4 regarding the installation via package control and adds a useful utilities under Preferences > Package Settings > PythonVoiceCodingPlugin

Update: release 0.0.2 is out and with many thanks to @LexiconCode there are now bundles for Caster 0.6.11!
Update: Due an important error I missed, you might be faced with a situation where the pluggin cannot load and thus no commands are executed. in such a case please upgrade to release 0.0.3 which fixes it. I am sorry for any disconvenience caused!
Update: release 0.0.4 is out shipping with aenea support.

## Limitations

Expand All @@ -116,7 +127,7 @@ There are currently two installation methods for performing the first task

### Package Control

Release 0.0.5 fixes the errors that prevented 0.0.4 from installing directly from package control. You can now install the package simply by
Release 0.0.5 fixed the errors that prevented 0.0.4 from installing directly from package control. You can now install the package simply by

- open Command Palette

Expand Down Expand Up @@ -197,71 +208,21 @@ python3 -m pip install --target third_party -r requirements.txt

## Support for voice coding framework

### Short version:


they are available grammars for Caster 0.5.11,0.6.11 as well as >=1.0.0 with many thanks to [LexiconCode](https://github.com/LexiconCode)!

It is my highest recommendation if you are using older versions of Caster that you upgrade to the latest master. Sooner or later the plug-in is going to drop support for those older versions and either way the newer version has a lot of improvements!
It is my highest recommendation if you are using older versions of Caster that you upgrade to the latest one. Sooner or later the plug-in is going to drop support for those older versions and either way the newer version has a lot of improvements!

Regarding operating system support, the plug-in has been tested both on Windows 10 and on Ubuntu 16.04 as release 0.0.4 introduced support for [aenea](https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/blob/master/bundles/Aenea/README.md)!


Also note that if you are using the latest version of Caster, you must also enable the grammar by saying






### Long version:

Ok this can get a little bit complicated because there is a variety of operating systems, speech recognition backends, macro systems and toolkits built upon them which may or may not introduce complications. To give you an example lets see a few cases of how Caster with Dragon Naturally Speaking can be used:

- everything native in Windows

- in combination with aenea on linux host with windows guest where dragon is running and keystrokes are send to the host via rpc commands

- linux guest receiving keystrokes from pure dragonfly windows host

- oh and what about that linux guest receiving aenea rpc from windows host?:)



To understand why all this may become an issue, we need to take a look at how communication between dragonfly and the plugin works.


Probably by far the most convenient way is via sublime comand line interface. This is the default method used. For example after a command of the form

```python
"[smart] [<adjective>] argument <argument_index>"
```
like

```
"first argument 2"
```

The script invokes the subl cli tool with a command like that:

``` bash
subl --command python_voice_coding_plugin { "arg" : {
"command":"argument",
"format":1,
"adjective":"first",
"argument_index":2,
}
}
enable python voice coding plugin
```
So effectively we trigger the command our plugin provides in its top file and pass information about the type of query we want and the parameters we used as a dict encoded as a json string.

Of course this does not work across virtual machine barriers:)

To counter this issue the simplest idea, which involves only keystrokes, is to open with some key command sublime console and using a text command to invoke the PythonVoiceCodingPlugin command from the command line. But
from my experience this is often way to slow if there are a lot of parameters to pass and messes up with user-interface, as it opens up the console.

So this is not implemented, even though it does not need custom rpc.


For the time being I have bundles for 0.5.11 release of Caster that work as expected on Windows 10 64bit.



Expand Down Expand Up @@ -309,6 +270,8 @@ Many thanks to the contributors and maintainers of the following pypi packages:

For specific versions be sure to check the requirements.txt

For their licensees check out the dedicated [file](https://github.com/mpourmpoulis/PythonVoiceCodingPlugin/blob/master/DEPENDENCES_LICENSE.md)

## Acknowledgements

### Useful Learning Resources
Expand Down Expand Up @@ -336,10 +299,23 @@ Many thanks to all of the developers that have put their time and effort behind

* Natlink

* Dragonfly
* Dragonfly and [Dragonfly2](https://github.com/dictation-toolbox/dragonfly)

* Caster


also some of the other tools I found useful developing this project

* TabNine

* Quoda

* Automatic Package Reloader

* MarkdownTOC

* ScreenToGif

* Jedi


Loading

0 comments on commit ba97f95

Please sign in to comment.