{"id":20931823,"url":"https://github.com/hyperspy/start_jupyter_cm","last_synced_at":"2025-04-09T13:06:46.877Z","repository":{"id":47413487,"uuid":"49141552","full_name":"hyperspy/start_jupyter_cm","owner":"hyperspy","description":"Add entries to start Jupyter QtConsole, JupyterLab or Jupyter Notebook from the context menu","archived":false,"fork":false,"pushed_at":"2025-01-14T17:22:07.000Z","size":1525,"stargazers_count":35,"open_issues_count":4,"forks_count":8,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-02T10:14:28.421Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperspy.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-06T14:58:26.000Z","updated_at":"2025-01-14T17:22:02.000Z","dependencies_parsed_at":"2024-03-18T09:25:43.758Z","dependency_job_id":"b6b069a1-ccfc-41cb-af67-20565233ae94","html_url":"https://github.com/hyperspy/start_jupyter_cm","commit_stats":{"total_commits":190,"total_committers":6,"mean_commits":"31.666666666666668","dds":"0.34736842105263155","last_synced_commit":"526d54fbca35224c42e1bf4a6e95227bd25de2d8"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperspy%2Fstart_jupyter_cm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperspy%2Fstart_jupyter_cm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperspy%2Fstart_jupyter_cm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperspy%2Fstart_jupyter_cm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperspy","download_url":"https://codeload.github.com/hyperspy/start_jupyter_cm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045231,"owners_count":21038553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T21:45:56.796Z","updated_at":"2025-04-09T13:06:46.842Z","avatar_url":"https://github.com/hyperspy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"start\\_jupyter\\_cm\n==================\n\n|python_version| |pypi_version| |conda-forge| |tests| |license|\n\n.. |pypi_version| image:: https://img.shields.io/pypi/v/start-jupyter-cm.svg?style=flat\n   :target: https://pypi.python.org/pypi/start-jupyter-cm\n   :alt: PyPI version\n\n.. |python_version| image:: https://img.shields.io/pypi/pyversions/start-jupyter-cm.svg?style=flat\n   :target: https://pypi.python.org/pypi/start-jupyter-cm\n   :alt: Supported python versions\n\n.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/start_jupyter_cm\n   :target: https://anaconda.org/conda-forge/start_jupyter_cm\n   :alt: Conda forge version\n\n.. |Tests| image:: https://github.com/hyperspy/start_jupyter_cm/actions/workflows/tests.yml/badge.svg\n   :target: https://github.com/hyperspy/start_jupyter_cm/actions/workflows/tests.yml\n   :alt: Github tests status\n\n.. |license| image:: https://img.shields.io/badge/License-GPLv3-blue.svg\n   :target: https://www.gnu.org/licenses/gpl-3.0\n   :alt: License: GPL v3\n\nDescription\n-----------\n\nAdd entries to start the `Jupyter Notebook \u003chttps://jupyter-notebook.readthedocs.io\u003e`__,\n`Jupyter QtConsole \u003chttps://qtconsole.readthedocs.io\u003e`__ or\n`JupyterLab \u003chttps://jupyterlab.readthedocs.io\u003e`__ from the file\nmanager context menu. This offers a convenient way of starting Jupyter\nin a folder. Currently it only supports Microsoft Windows, GNOME (and\nits many derivatives), and macOS. Contributions to support other OSs/desktop\nenvironments are highly welcome.\n\n`WinPython \u003chttp://winpython.github.io\u003e`__ and\n`Anaconda \u003chttps://www.anaconda.com/distribution\u003e`__/\n`Miniconda \u003chttps://docs.conda.io/en/latest/miniconda.html\u003e`__/\n`Miniforge \u003chttps://github.com/conda-forge/miniforge\u003e`__/\n`Mambaforge \u003chttps://github.com/conda-forge/miniforge#mambaforge\u003e`__\ndistributions are supported. If run from a conda environment other than `root`,\nthe name of the environment will be specified in brackets in the context menu name.\n\nMicrosoft Windows\n~~~~~~~~~~~~~~~~~\n\n.. figure:: https://github.com/hyperspy/start_jupyter_cm/raw/main/images/jupyter_cm_windows.png\n   :alt: Jupyter context menu entries in windows\n   :width: 250px\n\n   Jupyter context menu entries in windows.\n\n\nIn addition to starting the QtConsole, the Jupyter Notebook or the Jupyter Lab,\nand launching the default browser, in Microsoft Windows the process runs from\na terminal. Closing the terminal closes the QtConsole or the Jupyter server.\nSingle and all users installations are supported, see installation instructions below.\n\nLinux\n~~~~~\n\nOn linux, the supported file managers are: Nautilus (GNOME), Caja (MATE), Dolphin (KDE) and Nemo (Cinnamon).\nWith Nautilus and Caja, the shortcut will appear in the *Scripts* menu and with\nDolphin, it will appear in the *Actions* menu.\n\n.. figure:: https://github.com/hyperspy/start_jupyter_cm/raw/main/images/jupyter_cm_gnome.png\n   :alt: Jupyter context menu entries in Nautilus\n   :width: 450px\n\n   Jupyter context menu entries on Linux (Nautilus).\n\n\nWhen selecting multiple folders, one instance of Jupyter\nQtConsole/notebook/lab opens in each of the selected folders. Selecting a\nfile starts Jupyter in the file directory.\n\nNote that on Linux the processes run in the background: to stop the jupyter\nnotebook or lab, don't forget to exit using the *quit* button - only closing\nthe tab will not stop the jupyter server. Alternatively, `nbmanager \u003chttps://github.com/takluyver/nbmanager\u003e`__\ncan discover all running servers and shut them down using via an UI.\n\n\nmacOS\n~~~~~\n\n.. figure:: https://github.com/hyperspy/start_jupyter_cm/raw/main/images/jupyter_cm_macos.png\n   :alt: Jupyter context menu entries in macOS\n   :width: 450px\n\n   Jupyter context menu entries on macOS.\n\n\nThe context menu is only available when an object (folder or file) is\nselected in Finder. The Jupyter options will be available from the\n\"Services\" section of the menu. If a folder is selected then an instance of\nJupyter QTConsole/notebook/lab opens in the selected folder. If a file\nis selected then Jupyter is started in the file directory. If the\nfile is a jupyter notebook (\\*.ipynb), then selecting Jupyter notebook/lab\nwill open the file in that program; Jupyter QtConsole will still only\nopen in the file directory.\n\nAs the processes are opened through a shell script in Automator, a spinning\ncog will be visible in the menu bar when the processes are running. Once you\nhave finished with the server then manually kill the process via the\ndrop-down menu from this spinning cog.\n\nThe launchers have been tested on macOS Mojave (10.14) to Sonoma (14).\n\nInstallation instructions\n-------------------------\n\nInstall from pypi using pip:\n\n.. code:: bash\n\n    $ pip install start_jupyter_cm\n\nOr install from conda-forge channel using conda (in a Anaconda/Miniconda distribution):\n\n.. code:: bash\n\n    $ conda install -c conda-forge start_jupyter_cm\n\nUsage\n-----\n\nCreate context menu shortcut(s)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nAfter installation, enable the context menu entries from a terminal as follows:\n\n.. code:: bash\n\n    $ start_jupyter_cm\n\nOn Microscoft Windows, the administrator rights are required to add the\nentry for all users, otherwise the entries will be added only for the\ncurrent user. In GNOME and OSX only for the current user.\n\nRemove context menu shortcut(s)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo remove the context menu entries execute the following in a terminal:\n\n.. code::\n\n    $ start_jupyter_cm --remove\n\nAlso, be aware that, uninstalling the package does not\nremove the context menu entries. If you are left with the context menu\nentries after uninstalling ``start_jupyter_cm``, reinstall it, remove\nthe entries as above and uninstall it again.\n\nOptional arguments\n~~~~~~~~~~~~~~~~~~\n\nOn Linux, several file manager can be installed, to create or remove the context\nmenu shortcut(s) for a specific file manager, use the ``--file_manager`` (``-f``) option:\n\n.. code:: bash\n\n    $ start_jupyter_cm -f nautilus\n\nHelp\n~~~~\n\nUse the command line help for more information:\n\n.. code:: bash\n\n    $ start_jupyter_cm -h\n\n\nMore information\n----------------\n\nLinux\n~~~~~\n\nOn linux, the context menu shortcuts are created by adding scripts or\nconfiguration files for each file manager. The location of these files are:\n\n- Nautilus: ``~/.local/share/nautilus/scripts``\n- Caja: ``~/.config/caja/scripts``\n- Dolphin: ``~/.local/share/kservices5/ServiceMenus``\n- Nemo: ``~/.local/share/nemo/actions``\n\n\nRelated software\n----------------\n\n-  `nbmanager \u003chttps://github.com/takluyver/nbmanager\u003e`__ Discover and\n   shutdown Jupyter servers.\n-  `nbopen \u003chttps://github.com/takluyver/nbopen\u003e`__ Open a notebook\n   using your filemanager.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperspy%2Fstart_jupyter_cm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperspy%2Fstart_jupyter_cm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperspy%2Fstart_jupyter_cm/lists"}