# Plover Steno Engine Hooks Logger
[![Build Status][Build Status image]][Build Status url] [![PyPI - Version][PyPI version image]][PyPI url] [![PyPI - Downloads][PyPI downloads image]][PyPI url] [![linting: pylint][linting image]][linting url]
[Plover][] uses [Engine Hooks][] to allow [plugins][] to listen to its
[steno engine][] events. This hybrid [extension][]/[GUI Tool][] plugin simply
connects into all the known Engine Hooks, and logs out the given parameters to
the [Plover log][], which can be handy during Plover plugin development.
## Install
1. In the Plover application, open the Plugins Manager (either click the Plugins
Manager icon, or from the `Tools` menu, select `Plugins Manager`).
2. From the list of plugins, find `plover-steno-engine-hooks`
3. Click "Install/Update"
4. When it finishes installing, restart Plover
### Extension Logging
1. After re-opening Plover, open the Configuration screen (either click the
Configuration icon, or from the main Plover application menu, select
`Preferences...`)
2. Open the Plugins tab
3. Check the box next to `plover_steno_engine_hooks` to activate the extension
### GUI Tool Logging
1. After re-opening Plover, click the Steno Engine Hooks Logger button on the
Plover application to enable GUI-related logging.
## Usage
Since both the Extension and GUI Tool logging cover the same ground, you will
likely only want to use one at a single time (the extension, or the GUI Tool,
depending on what kind of plugin you are developing), otherwise the logs will
get very noisy.
To view the logs, open up `plover.log`, located under your [Plover configuration
directory][]:
- Windows: `C:\Users\<your username>\AppData\Local\plover`
- macOS: `~/Library/Application Support/plover`
- Linux: `~/.config/plover`
There, you should see entries there prefixed with `[STENO ENGINE HOOK
(EXTENSION)]` or `[STENO ENGINE HOOK (GUI)]`.
If you ever find the logs getting too noisy, then comment out any of the hooks
you don't need to listen to in the `_HOOKS` list under the `Logger` class.
## Development
Clone from GitHub with [git][] and install test-related dependencies with
[pip][]:
```console
git clone git@github.com:paulfioravanti/plover-steno-engine-hooks-logger.git
cd plover-steno-engine-hooks-logger
python -m pip install --editable ".[test]"
```
If you are a [Tmuxinator][] user, you may find my
[plover_steno_engine_hooks_logger project file][] of reference.
### Python Version
Plover's Python environment currently uses version 3.9 (see Plover's
[`workflow_context.yml`][] to confirm the current version).
So, in order to avoid unexpected issues, use your runtime version manager to
make sure your local development environment also uses Python 3.9.x.
### Type Checking and Linting
Since the only parts of the plugin able to be tested are ones that do not rely
directly on Plover, automated testing has not been possible. But, at least there
are some code quality checks performed:
- [Pylint][] is used for code quality
- [Mypy][] is used for static type checking
Run type checking and linting with the following commands:
```console
pylint plover_steno_engine_hooks_logger
mypy plover_steno_engine_hooks_logger
```
If you are a [`just`][] user, you may find the [`justfile`][] useful during
development in running multiple test commands. You can run the following command
from the project root directory:
```console
just
```
### Deploying Changes
After making any code changes, install the plugin into Plover with the following
command:
```console
plover --script plover_plugins install --editable .
```
When necessary, the plugin can be uninstalled via the command line with the
following command:
```console
plover --script plover_plugins uninstall plover-steno-engine-hooks-logger
```
[Build Status image]: https://github.com/paulfioravanti/plover-steno-engine-hooks-logger/actions/workflows/ci.yml/badge.svg
[Build Status url]: https://github.com/paulfioravanti/plover-steno-engine-hooks-logger/actions/workflows/ci.yml
[Engine Hooks]: https://plover.readthedocs.io/en/latest/api/engine.html#engine-hooks
[extension]: https://plover.readthedocs.io/en/latest/plugin-dev/extensions.html
[git]: https://git-scm.com/
[GUI Tool]: https://plover.readthedocs.io/en/latest/plugin-dev/gui_tools.html
[Invoke Plover from the command line]: https://github.com/openstenoproject/plover/wiki/Invoke-Plover-from-the-command-line
[`just`]: https://github.com/casey/just
[`justfile`]: ./justfile
[linting image]: https://img.shields.io/badge/linting-pylint-yellowgreen
[linting url]: https://github.com/pylint-dev/pylint
[Mypy]: https://github.com/python/mypy
[pip]: https://pip.pypa.io/en/stable/
[Plover]: https://www.openstenoproject.org/
[Plover log]: https://plover.readthedocs.io/en/latest/api/log.html
[Plover Plugins Registry]: https://github.com/openstenoproject/plover_plugins_registry
[Plover configuration directory]: https://plover.readthedocs.io/en/latest/api/oslayer_config.html#plover.oslayer.config.CONFIG_DIR
[plover_steno_engine_hooks_logger project file]: https://github.com/paulfioravanti/dotfiles/blob/master/tmuxinator/plover_steno_engine_hooks_logger.yml
[plugins]: https://plover.readthedocs.io/en/latest/plugins.html
[Pylint]: https://github.com/pylint-dev/pylint
[PyPI]: https://pypi.org/
[PyPI downloads image]: https://img.shields.io/pypi/dm/plover-steno-engine-hooks-logger
[PyPI version image]: https://img.shields.io/pypi/v/plover-steno-engine-hooks-logger
[PyPI url]: https://pypi.org/project/plover-steno-engine-hooks-logger/
[steno engine]: https://plover.readthedocs.io/en/latest/api/engine.html
[Tmuxinator]: https://github.com/tmuxinator/tmuxinator
[`workflow_context.yml`]: https://github.com/openstenoproject/plover/blob/master/.github/workflows/ci/workflow_context.yml
Raw data
{
"_id": null,
"home_page": "https://github.com/paulfioravanti/plover-steno-engine-hooks-logger",
"name": "plover-steno-engine-hooks-logger",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "plover plover_plugin",
"author": "Paul Fioravanti",
"author_email": "paul@paulfioravanti.com",
"download_url": "https://files.pythonhosted.org/packages/3d/0a/4d86a340ef067a0a0529358e0ac086bf4d3c855e9ec8dfc8512c7d76c6fb/plover_steno_engine_hooks_logger-0.3.6.tar.gz",
"platform": null,
"description": "# Plover Steno Engine Hooks Logger\n\n[![Build Status][Build Status image]][Build Status url] [![PyPI - Version][PyPI version image]][PyPI url] [![PyPI - Downloads][PyPI downloads image]][PyPI url] [![linting: pylint][linting image]][linting url]\n\n[Plover][] uses [Engine Hooks][] to allow [plugins][] to listen to its\n[steno engine][] events. This hybrid [extension][]/[GUI Tool][] plugin simply\nconnects into all the known Engine Hooks, and logs out the given parameters to\nthe [Plover log][], which can be handy during Plover plugin development.\n\n## Install\n\n1. In the Plover application, open the Plugins Manager (either click the Plugins\n Manager icon, or from the `Tools` menu, select `Plugins Manager`).\n2. From the list of plugins, find `plover-steno-engine-hooks`\n3. Click \"Install/Update\"\n4. When it finishes installing, restart Plover\n\n### Extension Logging\n\n1. After re-opening Plover, open the Configuration screen (either click the\n Configuration icon, or from the main Plover application menu, select\n `Preferences...`)\n2. Open the Plugins tab\n3. Check the box next to `plover_steno_engine_hooks` to activate the extension\n\n### GUI Tool Logging\n\n1. After re-opening Plover, click the Steno Engine Hooks Logger button on the\n Plover application to enable GUI-related logging.\n\n## Usage\n\nSince both the Extension and GUI Tool logging cover the same ground, you will\nlikely only want to use one at a single time (the extension, or the GUI Tool,\ndepending on what kind of plugin you are developing), otherwise the logs will\nget very noisy.\n\nTo view the logs, open up `plover.log`, located under your [Plover configuration\ndirectory][]:\n\n- Windows: `C:\\Users\\<your username>\\AppData\\Local\\plover`\n- macOS: `~/Library/Application Support/plover`\n- Linux: `~/.config/plover`\n\nThere, you should see entries there prefixed with `[STENO ENGINE HOOK\n(EXTENSION)]` or `[STENO ENGINE HOOK (GUI)]`.\n\nIf you ever find the logs getting too noisy, then comment out any of the hooks\nyou don't need to listen to in the `_HOOKS` list under the `Logger` class.\n\n## Development\n\nClone from GitHub with [git][] and install test-related dependencies with\n[pip][]:\n\n```console\ngit clone git@github.com:paulfioravanti/plover-steno-engine-hooks-logger.git\ncd plover-steno-engine-hooks-logger\npython -m pip install --editable \".[test]\"\n```\n\nIf you are a [Tmuxinator][] user, you may find my\n[plover_steno_engine_hooks_logger project file][] of reference.\n\n### Python Version\n\nPlover's Python environment currently uses version 3.9 (see Plover's\n[`workflow_context.yml`][] to confirm the current version).\n\nSo, in order to avoid unexpected issues, use your runtime version manager to\nmake sure your local development environment also uses Python 3.9.x.\n\n### Type Checking and Linting\n\nSince the only parts of the plugin able to be tested are ones that do not rely\ndirectly on Plover, automated testing has not been possible. But, at least there\nare some code quality checks performed:\n\n- [Pylint][] is used for code quality\n- [Mypy][] is used for static type checking\n\nRun type checking and linting with the following commands:\n\n```console\npylint plover_steno_engine_hooks_logger\nmypy plover_steno_engine_hooks_logger\n```\n\nIf you are a [`just`][] user, you may find the [`justfile`][] useful during\ndevelopment in running multiple test commands. You can run the following command\nfrom the project root directory:\n\n```console\njust\n```\n\n### Deploying Changes\n\nAfter making any code changes, install the plugin into Plover with the following\ncommand:\n\n```console\nplover --script plover_plugins install --editable .\n```\n\nWhen necessary, the plugin can be uninstalled via the command line with the\nfollowing command:\n\n```console\nplover --script plover_plugins uninstall plover-steno-engine-hooks-logger\n```\n\n[Build Status image]: https://github.com/paulfioravanti/plover-steno-engine-hooks-logger/actions/workflows/ci.yml/badge.svg\n[Build Status url]: https://github.com/paulfioravanti/plover-steno-engine-hooks-logger/actions/workflows/ci.yml\n[Engine Hooks]: https://plover.readthedocs.io/en/latest/api/engine.html#engine-hooks\n[extension]: https://plover.readthedocs.io/en/latest/plugin-dev/extensions.html\n[git]: https://git-scm.com/\n[GUI Tool]: https://plover.readthedocs.io/en/latest/plugin-dev/gui_tools.html\n[Invoke Plover from the command line]: https://github.com/openstenoproject/plover/wiki/Invoke-Plover-from-the-command-line\n[`just`]: https://github.com/casey/just\n[`justfile`]: ./justfile\n[linting image]: https://img.shields.io/badge/linting-pylint-yellowgreen\n[linting url]: https://github.com/pylint-dev/pylint\n[Mypy]: https://github.com/python/mypy\n[pip]: https://pip.pypa.io/en/stable/\n[Plover]: https://www.openstenoproject.org/\n[Plover log]: https://plover.readthedocs.io/en/latest/api/log.html\n[Plover Plugins Registry]: https://github.com/openstenoproject/plover_plugins_registry\n[Plover configuration directory]: https://plover.readthedocs.io/en/latest/api/oslayer_config.html#plover.oslayer.config.CONFIG_DIR\n[plover_steno_engine_hooks_logger project file]: https://github.com/paulfioravanti/dotfiles/blob/master/tmuxinator/plover_steno_engine_hooks_logger.yml\n[plugins]: https://plover.readthedocs.io/en/latest/plugins.html\n[Pylint]: https://github.com/pylint-dev/pylint\n[PyPI]: https://pypi.org/\n[PyPI downloads image]: https://img.shields.io/pypi/dm/plover-steno-engine-hooks-logger\n[PyPI version image]: https://img.shields.io/pypi/v/plover-steno-engine-hooks-logger\n[PyPI url]: https://pypi.org/project/plover-steno-engine-hooks-logger/\n[steno engine]: https://plover.readthedocs.io/en/latest/api/engine.html\n[Tmuxinator]: https://github.com/tmuxinator/tmuxinator\n[`workflow_context.yml`]: https://github.com/openstenoproject/plover/blob/master/.github/workflows/ci/workflow_context.yml\n\n\n",
"bugtrack_url": null,
"license": "GNU General Public License v3 or later (GPLv3+)",
"summary": "Logs params given to Plover steno engine hooks",
"version": "0.3.6",
"project_urls": {
"Homepage": "https://github.com/paulfioravanti/plover-steno-engine-hooks-logger"
},
"split_keywords": [
"plover",
"plover_plugin"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "eacfe5baaa322e34b9e6fabdf1868e04058f8785b6995d6da1188a36205a033a",
"md5": "703ca1f700a508aaeecf1dd5e5f9e5f2",
"sha256": "153af410c801479461ed3c3d86fd390ac00c11e681b7cd25c338434bf7f92910"
},
"downloads": -1,
"filename": "plover_steno_engine_hooks_logger-0.3.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "703ca1f700a508aaeecf1dd5e5f9e5f2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 20197,
"upload_time": "2024-10-03T01:28:26",
"upload_time_iso_8601": "2024-10-03T01:28:26.133052Z",
"url": "https://files.pythonhosted.org/packages/ea/cf/e5baaa322e34b9e6fabdf1868e04058f8785b6995d6da1188a36205a033a/plover_steno_engine_hooks_logger-0.3.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3d0a4d86a340ef067a0a0529358e0ac086bf4d3c855e9ec8dfc8512c7d76c6fb",
"md5": "673334f44541d5f760ecafc0746ac824",
"sha256": "49410d71e8f746353c6ea5709a0af5d29e54cb5a346dfa8e5a6a8e71ace7f08f"
},
"downloads": -1,
"filename": "plover_steno_engine_hooks_logger-0.3.6.tar.gz",
"has_sig": false,
"md5_digest": "673334f44541d5f760ecafc0746ac824",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20523,
"upload_time": "2024-10-03T01:28:27",
"upload_time_iso_8601": "2024-10-03T01:28:27.614411Z",
"url": "https://files.pythonhosted.org/packages/3d/0a/4d86a340ef067a0a0529358e0ac086bf4d3c855e9ec8dfc8512c7d76c6fb/plover_steno_engine_hooks_logger-0.3.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-03 01:28:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "paulfioravanti",
"github_project": "plover-steno-engine-hooks-logger",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "plover-steno-engine-hooks-logger"
}