jupyterlab-autosave-on-focus-change


Namejupyterlab-autosave-on-focus-change JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/s-weigand/jupyterlab_autosave_on_focus_change
SummaryJupyterlab extension to autosave files on focus change
upload_time2021-05-07 10:42:44
maintainer
docs_urlNone
authorSebastian Weigand
requires_python>=3.6
licenseBSD-3-Clause
keywords jupyter jupyterlab jupyterlab3 autosave focus change 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/)

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 >= 3.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
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/s-weigand/jupyterlab_autosave_on_focus_change",
    "name": "jupyterlab-autosave-on-focus-change",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "Jupyter,JupyterLab,JupyterLab3,autosave,focus,change,extension",
    "author": "Sebastian Weigand",
    "author_email": "s.weigand.phy@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/db/08/13dd41a47f9729437032f6166d015700ad25faaf7b09a096f69e11961086/jupyterlab_autosave_on_focus_change-0.1.2.tar.gz",
    "platform": "Linux",
    "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\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 >= 3.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\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Jupyterlab extension to autosave files on focus change",
    "version": "0.1.2",
    "split_keywords": [
        "jupyter",
        "jupyterlab",
        "jupyterlab3",
        "autosave",
        "focus",
        "change",
        "extension"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "ae7d3f293910e5f8a13c44043a2f3d7d",
                "sha256": "57ce3e7c34bc4fb4ab48e5b8aee13d5b8a9e286e5faa7aa54ad3e526aec67530"
            },
            "downloads": -1,
            "filename": "jupyterlab_autosave_on_focus_change-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ae7d3f293910e5f8a13c44043a2f3d7d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 36596,
            "upload_time": "2021-05-07T10:42:42",
            "upload_time_iso_8601": "2021-05-07T10:42:42.528440Z",
            "url": "https://files.pythonhosted.org/packages/f8/18/a1b443ea08a98d936bd349660ba3f5bf9dbdb0976acb4e77d87ba0a8dbaa/jupyterlab_autosave_on_focus_change-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "cc5567a70481a4db06104bee9e92c08f",
                "sha256": "f4ed52b2a4e6df3210b48afe5eb51c4c55493edb635bb1c43bbdfc4118919ddd"
            },
            "downloads": -1,
            "filename": "jupyterlab_autosave_on_focus_change-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "cc5567a70481a4db06104bee9e92c08f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 97433,
            "upload_time": "2021-05-07T10:42:44",
            "upload_time_iso_8601": "2021-05-07T10:42:44.582570Z",
            "url": "https://files.pythonhosted.org/packages/db/08/13dd41a47f9729437032f6166d015700ad25faaf7b09a096f69e11961086/jupyterlab_autosave_on_focus_change-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-05-07 10:42:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "s-weigand",
    "error": "Could not fetch GitHub repository",
    "lcname": "jupyterlab-autosave-on-focus-change"
}
        
Elapsed time: 0.25238s