Skip to content

Commit

Permalink
Merge branch 'master' into develop-0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mpourmpoulis authored Jan 27, 2020
2 parents d224d8e + 08870f7 commit f7dc3b4
Show file tree
Hide file tree
Showing 20 changed files with 12,839 additions and 1 deletion.
1 change: 1 addition & 0 deletions .no-sublime-package
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

133 changes: 133 additions & 0 deletions DEPENDENCES_LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# libraries licenses

Licenses for my dependencies, I have copy pasted them from your github repositories, if you see anything wrong please contact me!

## pyparsing

```
# Copyright (c) 2003-2019 Paul T. McGuire
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
```

## asttokens

```
# Copyright 2016 Grist Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
```

## astmonkey

```
Copyright [2013] [Konrad Hałas]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
```

## six

```
Copyright (c) 2010-2019 Benjamin Peterson
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```

## segment_tree

```
MIT License
Copyright (c) 2017 Evgeny Yurtaev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## pydot

```
Copyright (c) 2014 Carlos Jenkins
Copyright (c) 2014 Lance Helper
Copyright (c) 2004 Ero Carrera
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
24 changes: 24 additions & 0 deletions bundles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,27 @@ To install them simply copy paste the script insise caster "apps" folder:)

once again thanks to @LexiconCode there are bundles for the upcoming Caster 1.0.0 but installation is a bit different(to be updated)

For use within Linux see also the Aenea folder

## Update

Also you should know that Caster 1.x.x is also supported but you must enable it by saying

```
enable python voice coding plugin
```

also the datum needs to be stored in a different folder. Up until recently these used to be

```
C:\Users\%USERNAME%\.caster\rules
```

but the latest masterhas moved to this folder to

```
C:\Users\%USERNAME%\AppData\Local\caster\rules
```

https://github.com/dictation-toolbox/Caster/pull/718

4 changes: 3 additions & 1 deletion third_party/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*
*.dist-info
__pycache__

1 change: 1 addition & 0 deletions third_party/astmonkey/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.3.6'
35 changes: 35 additions & 0 deletions third_party/astmonkey/transformers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import ast


class ParentChildNodeTransformer(object):

def visit(self, node):
self._prepare_node(node)
for field, value in ast.iter_fields(node):
self._process_field(node, field, value)
return node

@staticmethod
def _prepare_node(node):
if not hasattr(node, 'parent'):
node.parent = None
if not hasattr(node, 'parents'):
node.parents = []
if not hasattr(node, 'children'):
node.children = []

def _process_field(self, node, field, value):
if isinstance(value, list):
for index, item in enumerate(value):
if isinstance(item, ast.AST):
self._process_child(item, node, field, index)
elif isinstance(value, ast.AST):
self._process_child(value, node, field)

def _process_child(self, child, parent, field_name, index=None):
self.visit(child)
child.parent = parent
child.parents.append(parent)
child.parent_field = field_name
child.parent_field_index = index
child.parent.children.append(child)
46 changes: 46 additions & 0 deletions third_party/astmonkey/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import ast
import sys


def is_docstring(node):
if node.parent is None or node.parent.parent is None:
return False
def_node = node.parent.parent
return (
isinstance(def_node, (ast.FunctionDef, ast.ClassDef, ast.Module)) and def_node.body and
isinstance(def_node.body[0], ast.Expr) and isinstance(def_node.body[0].value, ast.Str) and
def_node.body[0].value == node
)


def get_by_python_version(classes, python_version=sys.version_info):
result = None
for cls in classes:
if cls.__python_version__ <= python_version:
if not result or cls.__python_version__ > result.__python_version__:
result = cls
if not result:
raise NotImplementedError('astmonkey does not support Python %s.' % sys.version)
return result


class CommaWriter:

def __init__(self, write_func, add_space_at_beginning=False):
self.write_func = write_func
self.add_space_at_beginning = add_space_at_beginning
self.not_called_yet = True

def __call__(self, *args, **kwargs):
if self.not_called_yet:
self.not_called_yet = False
if self.add_space_at_beginning:
self.write_func(' ')
else:
self.write_func(', ')

def check_version(from_inclusive=None, to_exclusive=None):
if (not from_inclusive or sys.version_info >= from_inclusive) \
and (not to_exclusive or sys.version_info < to_exclusive):
return True
return False
Loading

0 comments on commit f7dc3b4

Please sign in to comment.