peaksjs_widget


Namepeaksjs_widget JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
Summaryipywidget to interact with audio waveforms through peaks.js
upload_time2025-01-10 05:17:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseCopyright (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

![preview](widget-review.png)

## Installation

You can install using `pip`:

```shell script
pip install 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]"
```

When developing your extensions, you need to manually enable your extensions with the
lab frontend. This is done by the command:

```bash
jupyter labextension develop --overwrite .
yarn run build
```

### 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": null,
    "name": "peaksjs_widget",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "IPython, Jupyter, Widgets",
    "author": null,
    "author_email": "AntoineDaurat <ktonalberlin@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/b5/54/cb71d9402086242192f7013d65eb7d2ba5ab4846ef301c1c7fc419d72466/peaksjs_widget-0.2.1.tar.gz",
    "platform": null,
    "description": "\n# peaksjs-widget\n\nipywidget to interact with audio waveforms through peaks.js\n\n![preview](widget-review.png)\n\n## Installation\n\nYou can install using `pip`:\n\n```shell script\npip install 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]\"\n```\n\nWhen developing your extensions, you need to manually enable your extensions with the\nlab frontend. This is done by the command:\n\n```bash\njupyter labextension develop --overwrite .\nyarn run build\n```\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\n        All rights reserved.\n        \n        Redistribution and use in source and binary forms, with or without\n        modification, are permitted provided that the following conditions are met:\n        \n        1. Redistributions of source code must retain the above copyright notice, this\n           list of conditions and the following disclaimer.\n        \n        2. Redistributions in binary form must reproduce the above copyright notice,\n           this list of conditions and the following disclaimer in the documentation\n           and/or other materials provided with the distribution.\n        \n        3. Neither the name of the copyright holder nor the names of its\n           contributors may be used to endorse or promote products derived from\n           this software without specific prior written permission.\n        \n        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
    "summary": "ipywidget to interact with audio waveforms through peaks.js",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/ktonal/peaksjs-widget"
    },
    "split_keywords": [
        "ipython",
        " jupyter",
        " widgets"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cabf5a15e995e3bc703a8e8eb408ffcda819fd5491684ef8e15cdfc003eaf62f",
                "md5": "f197517c171a7c295707b9af0d94e314",
                "sha256": "822841004f10f0c2d290c2103fb3cd2997f9a5d7f988d215fdafd2b730cb8cb8"
            },
            "downloads": -1,
            "filename": "peaksjs_widget-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f197517c171a7c295707b9af0d94e314",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 274653,
            "upload_time": "2025-01-10T05:19:25",
            "upload_time_iso_8601": "2025-01-10T05:19:25.996759Z",
            "url": "https://files.pythonhosted.org/packages/ca/bf/5a15e995e3bc703a8e8eb408ffcda819fd5491684ef8e15cdfc003eaf62f/peaksjs_widget-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b554cb71d9402086242192f7013d65eb7d2ba5ab4846ef301c1c7fc419d72466",
                "md5": "c61264a5210671a3ed48702656cec98e",
                "sha256": "fc00a39be9c5cf2aba7aa647accc700e52db23266cd9162f5f7fa7824bbf6762"
            },
            "downloads": -1,
            "filename": "peaksjs_widget-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c61264a5210671a3ed48702656cec98e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 196094,
            "upload_time": "2025-01-10T05:17:32",
            "upload_time_iso_8601": "2025-01-10T05:17:32.207932Z",
            "url": "https://files.pythonhosted.org/packages/b5/54/cb71d9402086242192f7013d65eb7d2ba5ab4846ef301c1c7fc419d72466/peaksjs_widget-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-10 05:17:32",
    "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"
}
        
Elapsed time: 3.51794s