Skip to content

Commit b9f88f0

Browse files
committed
add support for two new worai commands
1 parent ddae9ea commit b9f88f0

File tree

4 files changed

+50
-1
lines changed

4 files changed

+50
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: list-entities-outside-dataset
3+
---
4+
5+
List entities that do not belong to the account dataset.
6+
7+
This command fetches the `dataset_uri` via `get_me`, queries GraphQL for all entity IRIs, and prints those that do not start with the dataset URI.
8+
9+
## Usage
10+
- `worai list-entities-outside-dataset [options]`
11+
12+
## Options
13+
14+
| Option | Type | Default | Description |
15+
| --- | --- | --- | --- |
16+
| `--dataset-uri` | string | | Override dataset URI (otherwise fetched via `get_me`). |
17+
| `--endpoint` | string | `https://api.wordlift.io/graphql` | WordLift GraphQL endpoint. |
18+
| `--base-url` | string | `https://api.wordlift.io` | WordLift API base URL. |
19+
| `--limit` | int | `0` | Limit number of entities to list. |
20+
| `--query-template` | string | | GraphQL query template with `{dataset_uri}` placeholder (optional). |
21+
22+
## Examples
23+
- `worai list-entities-outside-dataset`
24+
- `worai list-entities-outside-dataset --limit 100`
25+
- `worai list-entities-outside-dataset --dataset-uri https://example.com/dataset`
26+
27+
## Notes
28+
- Requires `WORDLIFT_KEY` (or `wordlift.api_key` in config).
29+
- If your GraphQL schema differs, pass a custom `--query-template`. The default query is `entities { iri }`.

docs/worai/commands/validate.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# validate
2+
3+
Validate RDF (Turtle or JSON-LD) against SHACL shapes. Required properties surface as errors; recommended properties surface as warnings.
4+
5+
## Usage
6+
- `worai validate <file.ttl|file.jsonld|url> [--shape <shape>] [--report-file <path>] [--format pretty|raw] [--color|--no-color]`
7+
8+
## Examples
9+
- `worai validate ./data.jsonld`
10+
- `worai validate ./data.jsonld --shape review-snippet`
11+
- `worai validate ./data.jsonld --shape ./custom-shape.ttl --report-file ./report.txt`
12+
- `worai validate https://api.wordlift.io/data/example.jsonld --shape review-snippet`
13+
- `worai validate ./data.jsonld --format raw`
14+
- `worai validate ./data.jsonld --format pretty --no-color`
15+
16+
## Built-in shapes
17+
- `review-snippet` (Google review snippet constraints; shapes prefixed `google_`)
18+
- `schema-review` (Schema.org Review/AggregateRating grammar; shapes prefixed `schema_`)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docs",
3-
"version": "3.9.0",
3+
"version": "3.9.1",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",

sidebars.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ const sidebars = {
159159
"worai/commands/find-url-by-type",
160160
"worai/commands/link-groups",
161161
"worai/commands/patch",
162+
"worai/commands/list-entities-outside-dataset",
163+
"worai/commands/validate",
162164
"worai/commands/upload-entities-from-turtle",
163165
],
164166
},

0 commit comments

Comments
 (0)