Name | peaksjs-widget JSON |
Version |
0.1.4
JSON |
| download |
home_page | |
Summary | ipywidget to interact with audio waveforms through peaks.js |
upload_time | 2023-05-08 06:00:43 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | Copyright (c) 2023 AntoineDaurat All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
ipython
jupyter
widgets
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
# peaksjs-widget
ipywidget to interact with audio waveforms through peaks.js

## Installation
You can install using `pip`:
```shell script
pip install peaksjs_widget
```
If you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
the nbextension:
```shell script
jupyter nbextension enable --py [--sys-prefix|--user|--system] peaksjs_widget
```
## Shortcuts
you can interact with the waveform/widgets with following shortcuts:
- Navigation:
* `Ctrl + wheel`: zoom
* `SHIFT + dbl-click`: reset zoom
* `SHIFT + wheel`: scroll waveform
* `arrow left/right`: move playhead left/right
* `SHIFT + arrow left/right`: move playhead left/right a lot.
- Controls:
* `dbl-click`: play from there
* `SPACE BAR`: play/pause
- Segments:
* `alt + click`: add segment
* `SHIFT + click` on a segment: remove segment
* `Ctrl + alt + click` on a segment: edit segment's label
- Points:
* `Ctrl + click`: add point
* `SHIFT + click` on a point: remove point
* `Ctrl + alt + click` on a point: edit point's label
you can also drag points and segments' boundaries with the mouse to edit their position
## Development Installation
Create a dev environment:
```shell script
conda create -n peaksjs_widget-dev -c conda-forge nodejs yarn python jupyterlab
conda activate peaksjs_widget-dev
```
Install the python. This will also build the TS package.
```shell script
pip install -e ".[test, examples]"
```
When developing your extensions, you need to manually enable your extensions with the
notebook / lab frontend. For lab, this is done by the command:
```
jupyter labextension develop --overwrite .
yarn run build
```
For classic notebook, you need to run:
```
jupyter nbextension install --sys-prefix --symlink --overwrite --py peaksjs_widget
jupyter nbextension enable --sys-prefix --py peaksjs_widget
```
Note that the `--symlink` flag doesn't work on Windows, so you will here have to run
the `install` command every time that you rebuild your extension. For certain installations
you might also need another flag instead of `--sys-prefix`, but we won't cover the meaning
of those flags here.
### How to see your changes
#### Typescript:
If you use JupyterLab to develop then you can watch the source directory and run JupyterLab at the same time in different
terminals to watch for changes in the extension's source and automatically rebuild the widget.
```shell script
# Watch the source directory in one terminal, automatically rebuilding when needed
yarn run watch
# Run JupyterLab in another terminal
jupyter lab
```
After a change wait for the build to finish and then refresh your browser and the changes should take effect.
#### Python:
If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.
## Updating the version
To update the version, install tbump and use it to bump the version.
By default it will also create a tag.
```shell script
pip install tbump
tbump <new-version>
```
## Publish the package
on npm
````shell script
npm login
npm publish
````
on pypi
```shell script
rm -rf dist/
pyproject-build .
twine upload dist/peaksjs* -u k-tonal
```
Raw data
{
"_id": null,
"home_page": "",
"name": "peaksjs-widget",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "IPython,Jupyter,Widgets",
"author": "",
"author_email": "AntoineDaurat <ktonalberlin@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/83/9b/af79a7e630582390f80b454c87aff9c3636a44ab12463e55f34325528f80/peaksjs_widget-0.1.4.tar.gz",
"platform": null,
"description": "\n# peaksjs-widget\n\nipywidget to interact with audio waveforms through peaks.js\n\n\n\n## Installation\n\nYou can install using `pip`:\n\n```shell script\npip install peaksjs_widget\n```\n\nIf you are using Jupyter Notebook 5.2 or earlier, you may also need to enable\nthe nbextension:\n```shell script\njupyter nbextension enable --py [--sys-prefix|--user|--system] peaksjs_widget\n```\n\n## Shortcuts\n\nyou can interact with the waveform/widgets with following shortcuts:\n\n- Navigation:\n * `Ctrl + wheel`: zoom\n * `SHIFT + dbl-click`: reset zoom\n * `SHIFT + wheel`: scroll waveform\n * `arrow left/right`: move playhead left/right\n * `SHIFT + arrow left/right`: move playhead left/right a lot.\n- Controls:\n * `dbl-click`: play from there\n * `SPACE BAR`: play/pause \n- Segments:\n * `alt + click`: add segment\n * `SHIFT + click` on a segment: remove segment\n * `Ctrl + alt + click` on a segment: edit segment's label\n- Points:\n * `Ctrl + click`: add point\n * `SHIFT + click` on a point: remove point\n * `Ctrl + alt + click` on a point: edit point's label\n\nyou can also drag points and segments' boundaries with the mouse to edit their position\n\n## Development Installation\n\nCreate a dev environment:\n```shell script\nconda create -n peaksjs_widget-dev -c conda-forge nodejs yarn python jupyterlab\nconda activate peaksjs_widget-dev\n```\n\nInstall the python. This will also build the TS package.\n```shell script\npip install -e \".[test, examples]\"\n```\n\nWhen developing your extensions, you need to manually enable your extensions with the\nnotebook / lab frontend. For lab, this is done by the command:\n\n```\njupyter labextension develop --overwrite .\nyarn run build\n```\n\nFor classic notebook, you need to run:\n\n```\njupyter nbextension install --sys-prefix --symlink --overwrite --py peaksjs_widget\njupyter nbextension enable --sys-prefix --py peaksjs_widget\n```\n\nNote that the `--symlink` flag doesn't work on Windows, so you will here have to run\nthe `install` command every time that you rebuild your extension. For certain installations\nyou might also need another flag instead of `--sys-prefix`, but we won't cover the meaning\nof those flags here.\n\n### How to see your changes\n#### Typescript:\nIf you use JupyterLab to develop then you can watch the source directory and run JupyterLab at the same time in different\nterminals to watch for changes in the extension's source and automatically rebuild the widget.\n\n```shell script\n# Watch the source directory in one terminal, automatically rebuilding when needed\nyarn run watch\n# Run JupyterLab in another terminal\njupyter lab\n```\n\nAfter a change wait for the build to finish and then refresh your browser and the changes should take effect.\n\n#### Python:\nIf you make a change to the python code then you will need to restart the notebook kernel to have it take effect.\n\n## Updating the version\n\nTo update the version, install tbump and use it to bump the version.\nBy default it will also create a tag.\n\n```shell script\npip install tbump\ntbump <new-version>\n```\n\n## Publish the package\non npm\n````shell script\nnpm login \nnpm publish\n````\non pypi\n```shell script\nrm -rf dist/\npyproject-build .\ntwine upload dist/peaksjs* -u k-tonal\n```",
"bugtrack_url": null,
"license": "Copyright (c) 2023 AntoineDaurat All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
"summary": "ipywidget to interact with audio waveforms through peaks.js",
"version": "0.1.4",
"project_urls": {
"Homepage": "https://github.com/ktonal/peaksjs-widget"
},
"split_keywords": [
"ipython",
"jupyter",
"widgets"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ddb98e63c6b870aa8a098caba2bae01a5dff2479cfef45d38c1a9c4261f86d6e",
"md5": "c5878d7e890dd49a1a6a5360097334d4",
"sha256": "458793eca66cf8a5f6734e73d18e3608b6cc7956ce859a3caaa5d987b97c3c76"
},
"downloads": -1,
"filename": "peaksjs_widget-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c5878d7e890dd49a1a6a5360097334d4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 1240188,
"upload_time": "2023-05-08T06:00:39",
"upload_time_iso_8601": "2023-05-08T06:00:39.761443Z",
"url": "https://files.pythonhosted.org/packages/dd/b9/8e63c6b870aa8a098caba2bae01a5dff2479cfef45d38c1a9c4261f86d6e/peaksjs_widget-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "839baf79a7e630582390f80b454c87aff9c3636a44ab12463e55f34325528f80",
"md5": "9a50cc2ca3d900e31944ac960b677d70",
"sha256": "d138a6a54c9ffff358cf848a9cba893c015d5144787dfbff1c257262009745d0"
},
"downloads": -1,
"filename": "peaksjs_widget-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "9a50cc2ca3d900e31944ac960b677d70",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 814422,
"upload_time": "2023-05-08T06:00:43",
"upload_time_iso_8601": "2023-05-08T06:00:43.181347Z",
"url": "https://files.pythonhosted.org/packages/83/9b/af79a7e630582390f80b454c87aff9c3636a44ab12463e55f34325528f80/peaksjs_widget-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-08 06:00:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ktonal",
"github_project": "peaksjs-widget",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "peaksjs-widget"
}