Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add colab example; set default theme * Update example-data/ImJoy_elFinder_Colab.ipynb Co-authored-by: Martin Hjelmare <marhje52@gmail.com> Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
- Loading branch information
1 parent
dfe7c48
commit ff3186c
Showing
4 changed files
with
96 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
{ | ||
"nbformat": 4, | ||
"nbformat_minor": 0, | ||
"metadata": { | ||
"colab": { | ||
"name": "ImJoy-elFinder-Colab.ipynb", | ||
"provenance": [], | ||
"collapsed_sections": [] | ||
}, | ||
"kernelspec": { | ||
"name": "python3", | ||
"display_name": "Python 3" | ||
} | ||
}, | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": { | ||
"id": "MgoYmq0DjwpX", | ||
"colab_type": "text" | ||
}, | ||
"source": [ | ||
"## ImJoy-elFinder in Google Colab\n", | ||
"\n", | ||
"ImJoy-elFinder is a file browser designed for the web.\n", | ||
"\n", | ||
"In this notebook, we demonstrate how you can run ImJoy-elFinder in Google Colab to support previewing, downloading and uploading files.\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"metadata": { | ||
"id": "sS2qnw42jqh8", | ||
"colab_type": "code", | ||
"colab": {} | ||
}, | ||
"source": [ | ||
"!pip install imjoy-elfinder" | ||
], | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"metadata": { | ||
"id": "pzGAXh2RkLej", | ||
"colab_type": "code", | ||
"colab": {} | ||
}, | ||
"source": [ | ||
"import threading\n", | ||
"from google.colab import output\n", | ||
"from imjoy_elfinder.app import main\n", | ||
"\n", | ||
"# start imjoy-elfinder server\n", | ||
"thread = threading.Thread(target=main, args=[[\"--root-dir=/content\", \"--port=8765\"]])\n", | ||
"thread.start()\n", | ||
"\n", | ||
"# view the \n", | ||
"output.serve_kernel_port_as_iframe(8765, height='800')" | ||
], | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"metadata": { | ||
"id": "v4aBe_K_lgF0", | ||
"colab_type": "code", | ||
"colab": {} | ||
}, | ||
"source": [ | ||
"# open imjoy-elfinder in a new tab\n", | ||
"output.serve_kernel_port_as_window(8765)" | ||
], | ||
"execution_count": null, | ||
"outputs": [] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"metadata": { | ||
"id": "_ufulSAnm286", | ||
"colab_type": "code", | ||
"colab": {} | ||
}, | ||
"source": [ | ||
"" | ||
], | ||
"execution_count": null, | ||
"outputs": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"version": "0.1.58" | ||
"version": "0.1.59" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters