Skip to content

Commit 2406ce1

Browse files
author
Hofstetter Benjamin (extern)
committed
update readme and prepare release
1 parent 17705a1 commit 2406ce1

File tree

10 files changed

+82628
-59
lines changed

10 files changed

+82628
-59
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to the "vscode-sparql-notebook" extension will be documented in this file.
44

5+
## 0.0.31
6+
Feature: Add Code Cell Statusbar Item to show connection endpoint url or file path.
7+
Feature: Add Code Cell Statusbar Item to show the source of the cell content (cell or file)
8+
Feature: Accept file paths as endpoint url.
59
## 0.0.30
610
Fix: Store external query files in onDidSaveNotebookDocument callback. This is needed to make the notebook file portable.
711
## 0.0.29

README.md

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ This extension is still pretty raw but it works for us [tm]. Bug reports & contr
2323
- Open any `.sparqlbook` file as a Notebook.
2424
- Execute query blocks in the Notebook UI and view output.
2525
- Configure endpoint connections in the SPARQL Notebook side panel.
26+
- Export a `.sparqlbook` file to Markdown.
27+
- Attach `.sparql` or `.rq` files to cells.
28+
- Use a local RDF file as a data source.
2629

2730
## Installation
2831

@@ -32,6 +35,49 @@ You can install it directly from the Visual Studio Code Extension tab. It is ava
3235

3336
Open any `.sparqlbook` file with the `Open With` menu option. Then, select the `SPARQL Notebook` format. Connect to a SPARQL Endpoint and execute query blocks and view output interactively.
3437

38+
## Endpoints
39+
40+
Endpoints are the destinations for sending SPARQL queries, and there are two types:
41+
42+
### Remote Servers (HTTP / HTTPS)
43+
You can connect to a remote server by clicking the `+` button in the `SPARQL Connections` panel. Fill in the server URL and optional credentials. If you omit credentials, the extension will attempt a connection without them. This connection is used throughout the entire notebook, except when a cell defines its own endpoint.
44+
45+
### Local Endpoints
46+
Configure a local endpoint by right-clicking on a TTL, NT, or RDF file and selecting `SPARQL Notebook: Use File as Store`. This creates a new local endpoint populated with the chosen file's content. The entire notebook uses this endpoint, except when a cell specifies its own.
47+
48+
![local-file-store](https://github.com/zazuko/vscode-sparql-notebook/assets/8033981/c02dc4bd-1cd1-4c01-8032-cc2d74fceb5c)
49+
50+
### Cell-Specific Endpoints
51+
You can assign an endpoint to a specific cell by adding a comment with the endpoint URL or file path in a code cell:
52+
53+
```sparql
54+
# [endpoint=https://lindas.admin.ch/query]
55+
```
56+
57+
or
58+
```sparql
59+
# [endpoint=./relative/path/file.ttl]
60+
```
61+
62+
```sparql
63+
# [endpoint=/absolute/path/file.ttl]
64+
```
65+
Working with relative paths makes the notebook portable.
66+
67+
### Cell Status Bar
68+
The cell status bar displays information about the endpoint in use and its source.
69+
70+
## Code Cell (SPARQL Cell)
71+
A code cell contains a SPARQL query, which can be a SELECT, ASK, CONSTRUCT, or DESCRIBE query. Execute a code cell by clicking the Run Cell button in the cell toolbar or pressing Ctrl+Enter (or Option+Enter on Mac).
72+
73+
### Query from a file
74+
You can attach a query file to a cell. The query file will load and execute when you run the cell. Supported file extensions include `.sparql` and `.rq`. Saving the notebook also saves the query file.
75+
76+
![ext-query](https://github.com/zazuko/vscode-sparql-notebook/assets/8033981/68da289e-1d1f-4b6d-9986-bcfc455aa15a)
77+
78+
### Cell Status Bar
79+
The cell status bar indicates whether the cell uses a query file.
80+
3581
## FAQ
3682

3783
### Show SELECT Results as a Table
@@ -51,34 +97,9 @@ Technically that means set the default renderer for MIME-Type `application/sparq
5197

5298
Right click a `.sparqlbook`file and select `Export to Markdown`.
5399

54-
### Use query files
55-
56-
You can attach a query file to a cell. The query file will be loaded and executed when the cell is executed. The query file can be a `.sparql` or `.rq` file.
57-
58-
The query files will be updated on notebook save.
59-
60-
![ext-query](https://github.com/zazuko/vscode-sparql-notebook/assets/8033981/68da289e-1d1f-4b6d-9986-bcfc455aa15a)
61-
62-
63-
### Use a local RDF file
64100

65-
You can query a local rdf file. The file can be a `.ttl`, `.nt` or `.rdf` file.
66-
67-
![local-file-store](https://github.com/zazuko/vscode-sparql-notebook/assets/8033981/c02dc4bd-1cd1-4c01-8032-cc2d74fceb5c)
68101

69102
## Contribute
70103

71104
This extension uses the [
72105
Notebook API ](https://code.visualstudio.com/api/extension-guides/notebook). Contributions & bug fixes are always welcome!
73-
74-
# Development
75-
76-
The notebook extension is located in `src/extension`.
77-
78-
## Notebook Output Cells
79-
### SELECT / ASK Results
80-
A "renderer" refers to a component or extension that is responsible for displaying specific types of content or output within a notebook cell.
81-
82-
This project provides a renderer for `application/sparql-results+json` MIME-Type. This is the MIME-Type that is used to represent SPARQL SELECT and SPARQL ASK results.
83-
84-
You find the renderer in `src/renderer`. It is a simple React component that renders a table.

package-lock.json

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"repository": {
1010
"url": "https://github.com/zazuko/vscode-sparql-notebook.git"
1111
},
12-
"version": "0.0.30",
12+
"version": "0.0.31",
1313
"engines": {
1414
"vscode": "^1.77.0"
1515
},

samples/query-from-rdf-file.sparqlbook

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,11 @@
4040
"language": "sparql",
4141
"value": "DESCRIBE <https://politics.ld.admin.ch/person/1257>",
4242
"metadata": {}
43+
},
44+
{
45+
"kind": 2,
46+
"language": "sparql",
47+
"value": "# [endpoint=./rdf/curia.nt]\n\nDESCRIBE <https://politics.ld.admin.ch/person/1257>",
48+
"metadata": {}
4349
}
4450
]

0 commit comments

Comments
 (0)