Skip to content

Commit 1a250c8

Browse files
document custom tabular-data-viewer Uri handler and commands invocation (#96, #101, and #110)
1 parent 5ea0d2b commit 1a250c8

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,25 @@ Currently supported Tabular Data 中 Commands include:
135135
| `listDataPackages` | List Data Packages | Lists over 750 public Data GitHub Repositories with [`datapackage.json`](https://specs.frictionlessdata.io/data-package/#introduction) configuration files that ship with Tabular Data Viewer 中 v1.8.0 and above for exploring public datasets and Tabular Data Resources. Curated list of those Data Packages 📦 is configured in our [`packages.json`](https://github.com/RandomFractals/tabular-data-viewer/blob/main/src/configuration/packages.json) configuration file. |
136136
| `listDataResources` | List Data Resources | Lists Tabular Data 中 Resources for an open `datapackage.json` file in an active vscode editor or a public dataset GitHub repository selected from the Data Package 📦 Quick Pick List above.|
137137
| `openDataFile` | Open Data File | Prompts for a local `file:///` or remote `https://` Tabular Data Resource or a Data Package 📦 Url to load and view the Data Resource List or a Table View 🀄 for data files. |
138-
| `openTextDocument` | Open Text Document | Opens local Tabular Data Resource in bilt-in vscode Text Editor, or opens it in a browser for GitHub hosted data sources and other data files loaded via remote `https://` urls. |
138+
| `openTextDocument` | Open Text Document | Opens local Tabular Data Resource in built-in vscode Text Editor, or opens it in a browser for GitHub hosted data sources and other data files loaded via remote `https://` Urls. |
139139
| `viewTable` | View Table | Displays Table View 🀄 for an open Tabular Data file in vsode Editor or from context menus in built-in File Explorer. |
140140
| `viewDataFileOnGitHub` | View Data File on GitHub | Opens public GitHub Repository Data File or a Data Package in a browser. |
141141
| `viewSettings` | View Settings | Displays Tabular Data Viewer 中 Configuration Settings. |
142142

143+
Tabular Data Viewer 中 v1.8.0 and above provides a custom [Uri Handler](https://github.com/RandomFractals/tabular-data-viewer/issues/96) for launching Table Views 🀄 and other `tabular.data` commands from a Url in a browser. All of the listed commands above can be launched from a browser using the following `vscode://` Url format:
144+
145+
```
146+
vscode://RandomFractalsInc.tabular-data-viewer/<command>[#<dataUrl>|?dataUrl=<dataUrl>]
147+
```
148+
149+
which instructs a browser to open VSCode IDE Desktop application, activate Tabular Data Viewer 中 extension, and execute one of the `tabular.data.` commands via system-wide Urls. Commands that require a data file or data package Url accept that parameter via fragment/anchor (#) portion of the Url, or via `dataUrl` query parameter.
150+
151+
For example, the following `vscode://` Url will display Table View 🀄 for the public https://github.com/datasets/world-cities data repository. Copy and paste this Url in your browser to try it:
152+
153+
```
154+
vscode://RandomFractalsInc.tabular-data-viewer/viewTable#https://raw.githubusercontent.com/datasets/world-cities/master/data/world-cities.csv
155+
```
156+
143157
# Observable JS Notebook
144158

145159
You can try [Tabular Data Viewer 🀄 Observable Notebook 📓](https://observablehq.com/@randomfractals/tabular-data-viewer) with public datasets and supported data formats in a browser:

0 commit comments

Comments
 (0)