Name | jupyterlab-autosave-on-focus-change JSON |
Version |
0.4.1
JSON |
| download |
home_page | None |
Summary | Jupyterlab extension to autosave files on focus change |
upload_time | 2024-10-19 20:17:03 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | BSD 3-Clause License Copyright (c) 2020, Sebastian Weigand All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. * 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 |
jupyter
jupyterlab
jupyterlab-extension
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Jupyterlab Autosave on Focus Change
[![PyPi Version](https://img.shields.io/pypi/v/jupyterlab_autosave_on_focus_change.svg)](https://pypi.org/project/jupyterlab_autosave_on_focus_change/)
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/jupyterlab_autosave_on_focus_change.svg)](https://pypi.org/project/jupyterlab_autosave_on_focus_change/)
![Github Actions Status](https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/workflows/Build/badge.svg)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/s-weigand/jupyterlab_autosave_on_focus_change/main?urlpath=lab)
[![Docs](https://img.shields.io/badge/documentation-yes-brightgreen.svg)](https://s-weigand.github.io/jupyterlab_autosave_on_focus_change/)
<!-- prettier-ignore-start -->
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<!-- prettier-ignore-end -->
A Jupyterlab extension to autosave files on focus change.
<br>
<img style="display: block; margin: auto;" src="https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/blob/main/assets/demo.gif?raw=true">
Who doesn't know this scenario, you changed some code or input file and the changes don't apply because (**again!**)
you forgot to save the file.
This is where editor settings to save files when the tab (or the whole editor) loose focus come in super handy.
This extension aims to do the same for jupyterlab as the following setting in VS-Code.
```json
"files.autoSave": "onFocusChange",
```
## Features
- Autosave on focus change
- De-/Activation via Settings Menu
- File exclusion with glob patterns
## Requirements
- JupyterLab >= 4.0
## Install
```bash
pip install jupyterlab-autosave-on-focus-change
```
## Contributing
### Development install
Note: You will need NodeJS to build the extension package.
The `jlpm` command is JupyterLab's pinned version of
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
`yarn` or `npm` in lieu of `jlpm` below.
```bash
# Clone the repo to your local environment
# Change directory to the jupyterlab_autosave_on_focus_change directory
# Install package in development mode
pip install -e .
# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Rebuild extension Typescript source after making changes
jlpm run build
```
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 extension.
```bash
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab
```
With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
By default, the `jlpm run build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
```bash
jupyter lab build --minimize=False
```
### Uninstall
```bash
pip uninstall jupyterlab-autosave-on-focus-change
```
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/s-weigand"><img src="https://avatars.githubusercontent.com/u/9513634?v=4?s=100" width="100px;" alt="Sebastian Weigand"/><br /><sub><b>Sebastian Weigand</b></sub></a><br /><a href="https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/commits?author=s-weigand" title="Code">💻</a> <a href="#ideas-s-weigand" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-s-weigand" title="Maintenance">🚧</a> <a href="#projectManagement-s-weigand" title="Project Management">📆</a> <a href="#infra-s-weigand" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/commits?author=s-weigand" title="Tests">⚠️</a> <a href="https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/commits?author=s-weigand" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.wumengyan.com/"><img src="https://avatars.githubusercontent.com/u/85606983?v=4?s=100" width="100px;" alt="mengyanw"/><br /><sub><b>mengyanw</b></sub></a><br /><a href="https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/commits?author=mengyanw" title="Code">💻</a> <a href="#maintenance-mengyanw" title="Maintenance">🚧</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lahwaacz"><img src="https://avatars.githubusercontent.com/u/1289205?v=4?s=100" width="100px;" alt="Jakub Klinkovský"/><br /><sub><b>Jakub Klinkovský</b></sub></a><br /><a href="https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/issues?q=author%3Alahwaacz" title="Bug reports">🐛</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
Raw data
{
"_id": null,
"home_page": null,
"name": "jupyterlab-autosave-on-focus-change",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "jupyter, jupyterlab, jupyterlab-extension",
"author": null,
"author_email": "Sebastian Weigand <s.weigand.phy@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d5/45/bebcee2b144da3b5243a38cbf64f581ec7b855054375928947d943de6fb9/jupyterlab_autosave_on_focus_change-0.4.1.tar.gz",
"platform": null,
"description": "# Jupyterlab Autosave on Focus Change\n\n[![PyPi Version](https://img.shields.io/pypi/v/jupyterlab_autosave_on_focus_change.svg)](https://pypi.org/project/jupyterlab_autosave_on_focus_change/)\n[![Supported Python Versions](https://img.shields.io/pypi/pyversions/jupyterlab_autosave_on_focus_change.svg)](https://pypi.org/project/jupyterlab_autosave_on_focus_change/)\n![Github Actions Status](https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/workflows/Build/badge.svg)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/s-weigand/jupyterlab_autosave_on_focus_change/main?urlpath=lab)\n[![Docs](https://img.shields.io/badge/documentation-yes-brightgreen.svg)](https://s-weigand.github.io/jupyterlab_autosave_on_focus_change/)\n\n<!-- prettier-ignore-start -->\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n<!-- prettier-ignore-end -->\n\nA Jupyterlab extension to autosave files on focus change.\n\n<br>\n\n<img style=\"display: block; margin: auto;\" src=\"https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/blob/main/assets/demo.gif?raw=true\">\n\nWho doesn't know this scenario, you changed some code or input file and the changes don't apply because (**again!**)\nyou forgot to save the file.\n\nThis is where editor settings to save files when the tab (or the whole editor) loose focus come in super handy.\n\nThis extension aims to do the same for jupyterlab as the following setting in VS-Code.\n\n```json\n \"files.autoSave\": \"onFocusChange\",\n```\n\n## Features\n\n- Autosave on focus change\n- De-/Activation via Settings Menu\n- File exclusion with glob patterns\n\n## Requirements\n\n- JupyterLab >= 4.0\n\n## Install\n\n```bash\npip install jupyterlab-autosave-on-focus-change\n```\n\n## Contributing\n\n### Development install\n\nNote: You will need NodeJS to build the extension package.\n\nThe `jlpm` command is JupyterLab's pinned version of\n[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use\n`yarn` or `npm` in lieu of `jlpm` below.\n\n```bash\n# Clone the repo to your local environment\n# Change directory to the jupyterlab_autosave_on_focus_change directory\n# Install package in development mode\npip install -e .\n# Link your development version of the extension with JupyterLab\njupyter labextension develop . --overwrite\n# Rebuild extension Typescript source after making changes\njlpm run build\n```\n\nYou 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 extension.\n\n```bash\n# Watch the source directory in one terminal, automatically rebuilding when needed\njlpm run watch\n# Run JupyterLab in another terminal\njupyter lab\n```\n\nWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).\n\nBy default, the `jlpm run build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:\n\n```bash\njupyter lab build --minimize=False\n```\n\n### Uninstall\n\n```bash\npip uninstall jupyterlab-autosave-on-focus-change\n```\n\n## Contributors \u2728\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/s-weigand\"><img src=\"https://avatars.githubusercontent.com/u/9513634?v=4?s=100\" width=\"100px;\" alt=\"Sebastian Weigand\"/><br /><sub><b>Sebastian Weigand</b></sub></a><br /><a href=\"https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/commits?author=s-weigand\" title=\"Code\">\ud83d\udcbb</a> <a href=\"#ideas-s-weigand\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a> <a href=\"#maintenance-s-weigand\" title=\"Maintenance\">\ud83d\udea7</a> <a href=\"#projectManagement-s-weigand\" title=\"Project Management\">\ud83d\udcc6</a> <a href=\"#infra-s-weigand\" title=\"Infrastructure (Hosting, Build-Tools, etc)\">\ud83d\ude87</a> <a href=\"https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/commits?author=s-weigand\" title=\"Tests\">\u26a0\ufe0f</a> <a href=\"https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/commits?author=s-weigand\" title=\"Documentation\">\ud83d\udcd6</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://www.wumengyan.com/\"><img src=\"https://avatars.githubusercontent.com/u/85606983?v=4?s=100\" width=\"100px;\" alt=\"mengyanw\"/><br /><sub><b>mengyanw</b></sub></a><br /><a href=\"https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/commits?author=mengyanw\" title=\"Code\">\ud83d\udcbb</a> <a href=\"#maintenance-mengyanw\" title=\"Maintenance\">\ud83d\udea7</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/lahwaacz\"><img src=\"https://avatars.githubusercontent.com/u/1289205?v=4?s=100\" width=\"100px;\" alt=\"Jakub Klinkovsk\u00fd\"/><br /><sub><b>Jakub Klinkovsk\u00fd</b></sub></a><br /><a href=\"https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/issues?q=author%3Alahwaacz\" title=\"Bug reports\">\ud83d\udc1b</a></td>\n </tr>\n </tbody>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License Copyright (c) 2020, Sebastian Weigand All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. * 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": "Jupyterlab extension to autosave files on focus change",
"version": "0.4.1",
"project_urls": {
"Bug Tracker": "https://github.com/s-weigand/jupyterlab_autosave_on_focus_change/issues",
"Homepage": "https://github.com/s-weigand/jupyterlab_autosave_on_focus_change",
"Repository": "https://github.com/s-weigand/jupyterlab_autosave_on_focus_change.git"
},
"split_keywords": [
"jupyter",
" jupyterlab",
" jupyterlab-extension"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f0ffb5e6973201724534e6976f8159a3c2437a928bc9c243be6b6e5a0035c0d9",
"md5": "91302f73d3026ddbe8e495a0533a9814",
"sha256": "038aefc5d0793852b400f6d967362c379497fe8a40ef640ce3cf294ed9670cba"
},
"downloads": -1,
"filename": "jupyterlab_autosave_on_focus_change-0.4.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "91302f73d3026ddbe8e495a0533a9814",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 31147,
"upload_time": "2024-10-19T20:17:01",
"upload_time_iso_8601": "2024-10-19T20:17:01.599936Z",
"url": "https://files.pythonhosted.org/packages/f0/ff/b5e6973201724534e6976f8159a3c2437a928bc9c243be6b6e5a0035c0d9/jupyterlab_autosave_on_focus_change-0.4.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d545bebcee2b144da3b5243a38cbf64f581ec7b855054375928947d943de6fb9",
"md5": "4d7fd86f6cb6c22142c3f1cd0af1e79f",
"sha256": "54bbec282cfe56f50566e7ed7caf51c98db7280695da97efc089b981622964c9"
},
"downloads": -1,
"filename": "jupyterlab_autosave_on_focus_change-0.4.1.tar.gz",
"has_sig": false,
"md5_digest": "4d7fd86f6cb6c22142c3f1cd0af1e79f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 4206981,
"upload_time": "2024-10-19T20:17:03",
"upload_time_iso_8601": "2024-10-19T20:17:03.085537Z",
"url": "https://files.pythonhosted.org/packages/d5/45/bebcee2b144da3b5243a38cbf64f581ec7b855054375928947d943de6fb9/jupyterlab_autosave_on_focus_change-0.4.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-19 20:17:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "s-weigand",
"github_project": "jupyterlab_autosave_on_focus_change",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "jupyterlab-autosave-on-focus-change"
}