diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-12-24 13:54:03 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-12-24 13:54:03 +0900 |
| commit | 28e8bdf7f8286bd431b7f3b709e79f3827b31469 (patch) | |
| tree | 85b44eff6da4d8443198fb6e04dfb6ee55244588 /debian/.local/bin/vipy | |
| parent | 8470ff001befcfd0f626dea69a9e76d43aee0511 (diff) | |
updates
Diffstat (limited to 'debian/.local/bin/vipy')
| -rwxr-xr-x | debian/.local/bin/vipy | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/debian/.local/bin/vipy b/debian/.local/bin/vipy new file mode 100755 index 0000000..8e0e3cb --- /dev/null +++ b/debian/.local/bin/vipy @@ -0,0 +1,42 @@ +#!/bin/sh + +# Create a new notebook JSON structure +notebook='{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython" + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}' + +[ -z "$1" ] && echo "Enter a file name!" && exit + +# Write the JSON to a new .ipynb file +echo "$notebook" >"$1.ipynb" + +# Check if the file was created successfully +[ -f "$1.ipynb" ] && echo "$1.ipynb created successfully." || echo "Failed to create a Jupyter Notebook." |
