mdld-parse 0.9.6 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -43
- package/dist/README.md +81 -43
- package/dist/docs/Parser.md +2 -1
- package/dist/docs/origin.md +2 -1
- package/dist/docs/primary-subject.md +3 -2
- package/dist/examples/demo/journal.md +26 -87
- package/dist/examples/demo/project.md +50 -64
- package/dist/examples/demo/recipe.md +24 -69
- package/dist/examples/demo/research.md +37 -79
- package/dist/examples/demo/space-mission.md +32 -103
- package/dist/index.html +375 -579
- package/dist/index.js +28 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -63,39 +63,6 @@ console.log(result.quads);
|
|
|
63
63
|
|
|
64
64
|
MD-LD allows you to author RDF graphs directly in Markdown using explicit `{...}` annotations:
|
|
65
65
|
|
|
66
|
-
## ⚡ Performance & Architecture
|
|
67
|
-
|
|
68
|
-
MD-LD v0.10.0 features a **character-based tokenization system** for optimal performance:
|
|
69
|
-
|
|
70
|
-
- **20-28% faster parsing** than regex-based approaches
|
|
71
|
-
- **Memory-efficient** with ~640 bytes per quad retained
|
|
72
|
-
- **Streaming-friendly** with O(n) linear time complexity
|
|
73
|
-
- **Character-based detection** replaces complex regex patterns
|
|
74
|
-
- **Unified tokenizer architecture** in `src/tokenizers.js`
|
|
75
|
-
|
|
76
|
-
### Tokenizer Architecture
|
|
77
|
-
|
|
78
|
-
The parser uses specialized character-based tokenizers:
|
|
79
|
-
|
|
80
|
-
```javascript
|
|
81
|
-
// Block-level tokenizers
|
|
82
|
-
detectFence() // ```code blocks
|
|
83
|
-
detectPrefix() // [prefix] <iri>
|
|
84
|
-
detectHeading() // # Headings
|
|
85
|
-
detectList() // - List items
|
|
86
|
-
detectBlockquote() // > Blockquotes
|
|
87
|
-
detectStandaloneSubject() // {=subject}
|
|
88
|
-
|
|
89
|
-
// Inline carrier scanner
|
|
90
|
-
scanInlineCarriers() // [text], **bold**, `code`, <URL>
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
This design provides:
|
|
94
|
-
- **Better maintainability** - Easier to debug and extend
|
|
95
|
-
- **Improved error handling** - More precise edge case detection
|
|
96
|
-
- **Cleaner code structure** - No complex regex patterns
|
|
97
|
-
- **Full backward compatibility** - All 127 tests passing
|
|
98
|
-
|
|
99
66
|
```markdown
|
|
100
67
|
[my] <tag:alice@example.com,2026:>
|
|
101
68
|
# 2024-07-18 {=my:journal-2024-07-18 .my:Event my:date ^^xsd:date}
|
|
@@ -118,13 +85,15 @@ pnpm install mdld-parse
|
|
|
118
85
|
```javascript
|
|
119
86
|
import { parse } from 'mdld-parse';
|
|
120
87
|
|
|
121
|
-
const markdown =
|
|
122
|
-
[Alice] {author}`;
|
|
88
|
+
const markdown = `[ex] <tag:alice@example.org,2026:>
|
|
123
89
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
90
|
+
# Demo document {=ex:example/doc .prov:Entity label}
|
|
91
|
+
|
|
92
|
+
> A demo document for MD-LD {comment}
|
|
93
|
+
[Alice] {+ex:alice ?ex:author .prov:Person label}
|
|
94
|
+
`;
|
|
95
|
+
|
|
96
|
+
const result = parse({ text: markdown });
|
|
128
97
|
|
|
129
98
|
console.log(result.quads);
|
|
130
99
|
// RDF/JS quads ready for n3.js, rdflib, etc.
|
|
@@ -136,7 +105,7 @@ console.log(result.quads);
|
|
|
136
105
|
<script type="module">
|
|
137
106
|
import { parse } from 'https://cdn.jsdelivr.net/npm/mdld-parse/+esm';
|
|
138
107
|
|
|
139
|
-
const result = parse('# Hello {=ex:hello label}');
|
|
108
|
+
const result = parse('[ex] <tag:alice@example.org,2026:>\n\n# Hello {=ex:hello label}');
|
|
140
109
|
</script>
|
|
141
110
|
```
|
|
142
111
|
|
|
@@ -154,9 +123,9 @@ Each predicate form determines the graph edge:
|
|
|
154
123
|
|
|
155
124
|
| Form | Edge | Example | Meaning |
|
|
156
125
|
|-------|---------|------------------------------|------------------|
|
|
157
|
-
| `p` | S → L | `[Alice] {
|
|
126
|
+
| `p` | S → L | `[Alice] {label}` | literal property |
|
|
158
127
|
| `?p` | S → O | `[NASA] {=ex:nasa ?org}` | object property |
|
|
159
|
-
| `!p`
|
|
128
|
+
| `!p` | O → S | `[Parent] {=ex:p !hasPart}` | reverse object |
|
|
160
129
|
|
|
161
130
|
## 📍 Elevated Statements
|
|
162
131
|
|
|
@@ -336,6 +305,72 @@ Generate node-centric MDLD showing all quads where a specific IRI appears in any
|
|
|
336
305
|
|
|
337
306
|
**Use case:** Perfect for exploring a specific node and all its relationships—where it appears as subject, object, predicate, type, or datatype. Creates an exhaustive view of everything related to the focus IRI. Ideal for node-centric knowledge graph explorers.
|
|
338
307
|
|
|
308
|
+
### `updateValue()` — Update Quad Carrier Text in Source Text
|
|
309
|
+
|
|
310
|
+
Update the carrier text of a literal quad in MDLD text. Only the carrier content is replaced — datatype (`^^xsd:integer`) and language (`@en`) annotations inside the `{…}` block are preserved as-is, since they are part of the annotation, not the carrier.
|
|
311
|
+
|
|
312
|
+
```javascript
|
|
313
|
+
import { parse, updateValue } from 'mdld-parse';
|
|
314
|
+
|
|
315
|
+
const mdld = `[ex] <http://example.org/>
|
|
316
|
+
|
|
317
|
+
# Article {=ex:article .ex:Article}
|
|
318
|
+
|
|
319
|
+
[Alice Smith] {ex:author}`;
|
|
320
|
+
|
|
321
|
+
const result = parse({ text: mdld });
|
|
322
|
+
const authorQuad = result.quads.find(q =>
|
|
323
|
+
q.subject.value === 'http://example.org/article' &&
|
|
324
|
+
q.predicate.value === 'http://example.org/author'
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
const updatedText = updateValue({
|
|
328
|
+
text: mdld,
|
|
329
|
+
quad: authorQuad,
|
|
330
|
+
value: 'Bob Johnson',
|
|
331
|
+
origin: result.origin // optional (auto-parses if not provided)
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
console.log(updatedText);
|
|
335
|
+
// [ex] <http://example.org/>
|
|
336
|
+
//
|
|
337
|
+
// # Article {=ex:article .ex:Article}
|
|
338
|
+
//
|
|
339
|
+
// [Bob Johnson] {ex:author}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**Annotation annotations are preserved:**
|
|
343
|
+
```javascript
|
|
344
|
+
// Original: > 25 {ex:age ^^xsd:integer}
|
|
345
|
+
updateValue({ text, quad, value: '30' });
|
|
346
|
+
// Result: > 30 {ex:age ^^xsd:integer} ← datatype preserved
|
|
347
|
+
|
|
348
|
+
// Original: > Hello {ex:greeting @en}
|
|
349
|
+
updateValue({ text, quad, value: 'Good morning' });
|
|
350
|
+
// Result: > Good morning {ex:greeting @en} ← language tag preserved
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**Parameters:**
|
|
354
|
+
- `text` (string) — The original MDLD text
|
|
355
|
+
- `quad` (object) — The quad to update (subject, predicate, object)
|
|
356
|
+
- `value` (string) — The new carrier text to set
|
|
357
|
+
- `origin` (object, optional) — ParseResult.origin (auto-parses if not provided)
|
|
358
|
+
|
|
359
|
+
**Returns:** Updated MDLD text, or original text if update fails (fail-safe)
|
|
360
|
+
|
|
361
|
+
**How it works:**
|
|
362
|
+
- Uses `locate()` to find the quad's position in the source text
|
|
363
|
+
- Uses `valueRange` to replace only the carrier text (excluding carrier markers like `[`, `]`)
|
|
364
|
+
- Annotation block `{…}` with predicate, datatype, language is untouched
|
|
365
|
+
- Auto-parses if result not provided (convenient but less efficient)
|
|
366
|
+
|
|
367
|
+
**Fail-safe behavior:**
|
|
368
|
+
- Returns original text if quad cannot be located
|
|
369
|
+
- Returns original text if valueRange is not available
|
|
370
|
+
- Never corrupts the source text
|
|
371
|
+
|
|
372
|
+
**Use case:** Perfect for editor applications that need to update literal values while preserving carrier syntax, datatype annotations, and language tags.
|
|
373
|
+
|
|
339
374
|
### Composition Patterns
|
|
340
375
|
|
|
341
376
|
With the unified named parameter API, `parse()` and `generate()` compose seamlessly through object spreading:
|
|
@@ -402,7 +437,10 @@ Locate the origin entry for a quad using the lean origin system.
|
|
|
402
437
|
- `quad` (object) — The quad to locate (subject, predicate, object)
|
|
403
438
|
- `origin` (object) — Origin object containing quadIndex
|
|
404
439
|
|
|
405
|
-
**Returns:** `{ blockId, range, carrierType, subject, predicate, context, value, polarity }` or `null`
|
|
440
|
+
**Returns:** `{ blockId, range, valueRange, carrierType, subject, predicate, context, value, polarity }` or `null`
|
|
441
|
+
|
|
442
|
+
- `range`: Full character range including carrier markers (e.g., `[`, `]`, `{`, `}`)
|
|
443
|
+
- `valueRange`: Character range excluding carrier markers (null if not available)
|
|
406
444
|
|
|
407
445
|
### `render(quads, options)`
|
|
408
446
|
|
package/dist/README.md
CHANGED
|
@@ -63,39 +63,6 @@ console.log(result.quads);
|
|
|
63
63
|
|
|
64
64
|
MD-LD allows you to author RDF graphs directly in Markdown using explicit `{...}` annotations:
|
|
65
65
|
|
|
66
|
-
## ⚡ Performance & Architecture
|
|
67
|
-
|
|
68
|
-
MD-LD v0.10.0 features a **character-based tokenization system** for optimal performance:
|
|
69
|
-
|
|
70
|
-
- **20-28% faster parsing** than regex-based approaches
|
|
71
|
-
- **Memory-efficient** with ~640 bytes per quad retained
|
|
72
|
-
- **Streaming-friendly** with O(n) linear time complexity
|
|
73
|
-
- **Character-based detection** replaces complex regex patterns
|
|
74
|
-
- **Unified tokenizer architecture** in `src/tokenizers.js`
|
|
75
|
-
|
|
76
|
-
### Tokenizer Architecture
|
|
77
|
-
|
|
78
|
-
The parser uses specialized character-based tokenizers:
|
|
79
|
-
|
|
80
|
-
```javascript
|
|
81
|
-
// Block-level tokenizers
|
|
82
|
-
detectFence() // ```code blocks
|
|
83
|
-
detectPrefix() // [prefix] <iri>
|
|
84
|
-
detectHeading() // # Headings
|
|
85
|
-
detectList() // - List items
|
|
86
|
-
detectBlockquote() // > Blockquotes
|
|
87
|
-
detectStandaloneSubject() // {=subject}
|
|
88
|
-
|
|
89
|
-
// Inline carrier scanner
|
|
90
|
-
scanInlineCarriers() // [text], **bold**, `code`, <URL>
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
This design provides:
|
|
94
|
-
- **Better maintainability** - Easier to debug and extend
|
|
95
|
-
- **Improved error handling** - More precise edge case detection
|
|
96
|
-
- **Cleaner code structure** - No complex regex patterns
|
|
97
|
-
- **Full backward compatibility** - All 127 tests passing
|
|
98
|
-
|
|
99
66
|
```markdown
|
|
100
67
|
[my] <tag:alice@example.com,2026:>
|
|
101
68
|
# 2024-07-18 {=my:journal-2024-07-18 .my:Event my:date ^^xsd:date}
|
|
@@ -118,13 +85,15 @@ pnpm install mdld-parse
|
|
|
118
85
|
```javascript
|
|
119
86
|
import { parse } from 'mdld-parse';
|
|
120
87
|
|
|
121
|
-
const markdown =
|
|
122
|
-
[Alice] {author}`;
|
|
88
|
+
const markdown = `[ex] <tag:alice@example.org,2026:>
|
|
123
89
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
90
|
+
# Demo document {=ex:example/doc .prov:Entity label}
|
|
91
|
+
|
|
92
|
+
> A demo document for MD-LD {comment}
|
|
93
|
+
[Alice] {+ex:alice ?ex:author .prov:Person label}
|
|
94
|
+
`;
|
|
95
|
+
|
|
96
|
+
const result = parse({ text: markdown });
|
|
128
97
|
|
|
129
98
|
console.log(result.quads);
|
|
130
99
|
// RDF/JS quads ready for n3.js, rdflib, etc.
|
|
@@ -136,7 +105,7 @@ console.log(result.quads);
|
|
|
136
105
|
<script type="module">
|
|
137
106
|
import { parse } from 'https://cdn.jsdelivr.net/npm/mdld-parse/+esm';
|
|
138
107
|
|
|
139
|
-
const result = parse('# Hello {=ex:hello label}');
|
|
108
|
+
const result = parse('[ex] <tag:alice@example.org,2026:>\n\n# Hello {=ex:hello label}');
|
|
140
109
|
</script>
|
|
141
110
|
```
|
|
142
111
|
|
|
@@ -154,9 +123,9 @@ Each predicate form determines the graph edge:
|
|
|
154
123
|
|
|
155
124
|
| Form | Edge | Example | Meaning |
|
|
156
125
|
|-------|---------|------------------------------|------------------|
|
|
157
|
-
| `p` | S → L | `[Alice] {
|
|
126
|
+
| `p` | S → L | `[Alice] {label}` | literal property |
|
|
158
127
|
| `?p` | S → O | `[NASA] {=ex:nasa ?org}` | object property |
|
|
159
|
-
| `!p`
|
|
128
|
+
| `!p` | O → S | `[Parent] {=ex:p !hasPart}` | reverse object |
|
|
160
129
|
|
|
161
130
|
## 📍 Elevated Statements
|
|
162
131
|
|
|
@@ -336,6 +305,72 @@ Generate node-centric MDLD showing all quads where a specific IRI appears in any
|
|
|
336
305
|
|
|
337
306
|
**Use case:** Perfect for exploring a specific node and all its relationships—where it appears as subject, object, predicate, type, or datatype. Creates an exhaustive view of everything related to the focus IRI. Ideal for node-centric knowledge graph explorers.
|
|
338
307
|
|
|
308
|
+
### `updateValue()` — Update Quad Carrier Text in Source Text
|
|
309
|
+
|
|
310
|
+
Update the carrier text of a literal quad in MDLD text. Only the carrier content is replaced — datatype (`^^xsd:integer`) and language (`@en`) annotations inside the `{…}` block are preserved as-is, since they are part of the annotation, not the carrier.
|
|
311
|
+
|
|
312
|
+
```javascript
|
|
313
|
+
import { parse, updateValue } from 'mdld-parse';
|
|
314
|
+
|
|
315
|
+
const mdld = `[ex] <http://example.org/>
|
|
316
|
+
|
|
317
|
+
# Article {=ex:article .ex:Article}
|
|
318
|
+
|
|
319
|
+
[Alice Smith] {ex:author}`;
|
|
320
|
+
|
|
321
|
+
const result = parse({ text: mdld });
|
|
322
|
+
const authorQuad = result.quads.find(q =>
|
|
323
|
+
q.subject.value === 'http://example.org/article' &&
|
|
324
|
+
q.predicate.value === 'http://example.org/author'
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
const updatedText = updateValue({
|
|
328
|
+
text: mdld,
|
|
329
|
+
quad: authorQuad,
|
|
330
|
+
value: 'Bob Johnson',
|
|
331
|
+
origin: result.origin // optional (auto-parses if not provided)
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
console.log(updatedText);
|
|
335
|
+
// [ex] <http://example.org/>
|
|
336
|
+
//
|
|
337
|
+
// # Article {=ex:article .ex:Article}
|
|
338
|
+
//
|
|
339
|
+
// [Bob Johnson] {ex:author}
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
**Annotation annotations are preserved:**
|
|
343
|
+
```javascript
|
|
344
|
+
// Original: > 25 {ex:age ^^xsd:integer}
|
|
345
|
+
updateValue({ text, quad, value: '30' });
|
|
346
|
+
// Result: > 30 {ex:age ^^xsd:integer} ← datatype preserved
|
|
347
|
+
|
|
348
|
+
// Original: > Hello {ex:greeting @en}
|
|
349
|
+
updateValue({ text, quad, value: 'Good morning' });
|
|
350
|
+
// Result: > Good morning {ex:greeting @en} ← language tag preserved
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**Parameters:**
|
|
354
|
+
- `text` (string) — The original MDLD text
|
|
355
|
+
- `quad` (object) — The quad to update (subject, predicate, object)
|
|
356
|
+
- `value` (string) — The new carrier text to set
|
|
357
|
+
- `origin` (object, optional) — ParseResult.origin (auto-parses if not provided)
|
|
358
|
+
|
|
359
|
+
**Returns:** Updated MDLD text, or original text if update fails (fail-safe)
|
|
360
|
+
|
|
361
|
+
**How it works:**
|
|
362
|
+
- Uses `locate()` to find the quad's position in the source text
|
|
363
|
+
- Uses `valueRange` to replace only the carrier text (excluding carrier markers like `[`, `]`)
|
|
364
|
+
- Annotation block `{…}` with predicate, datatype, language is untouched
|
|
365
|
+
- Auto-parses if result not provided (convenient but less efficient)
|
|
366
|
+
|
|
367
|
+
**Fail-safe behavior:**
|
|
368
|
+
- Returns original text if quad cannot be located
|
|
369
|
+
- Returns original text if valueRange is not available
|
|
370
|
+
- Never corrupts the source text
|
|
371
|
+
|
|
372
|
+
**Use case:** Perfect for editor applications that need to update literal values while preserving carrier syntax, datatype annotations, and language tags.
|
|
373
|
+
|
|
339
374
|
### Composition Patterns
|
|
340
375
|
|
|
341
376
|
With the unified named parameter API, `parse()` and `generate()` compose seamlessly through object spreading:
|
|
@@ -402,7 +437,10 @@ Locate the origin entry for a quad using the lean origin system.
|
|
|
402
437
|
- `quad` (object) — The quad to locate (subject, predicate, object)
|
|
403
438
|
- `origin` (object) — Origin object containing quadIndex
|
|
404
439
|
|
|
405
|
-
**Returns:** `{ blockId, range, carrierType, subject, predicate, context, value, polarity }` or `null`
|
|
440
|
+
**Returns:** `{ blockId, range, valueRange, carrierType, subject, predicate, context, value, polarity }` or `null`
|
|
441
|
+
|
|
442
|
+
- `range`: Full character range including carrier markers (e.g., `[`, `]`, `{`, `}`)
|
|
443
|
+
- `valueRange`: Character range excluding carrier markers (null if not available)
|
|
406
444
|
|
|
407
445
|
### `render(quads, options)`
|
|
408
446
|
|
package/dist/docs/Parser.md
CHANGED
|
@@ -534,7 +534,8 @@ const filteredRemove = processRetractions(state.quads, state.removeSet);
|
|
|
534
534
|
const primary = {
|
|
535
535
|
subject: state.primarySubject,
|
|
536
536
|
type: state.primaryType,
|
|
537
|
-
label: state.primaryLabel
|
|
537
|
+
label: state.primaryLabel,
|
|
538
|
+
comment: state.primaryComment
|
|
538
539
|
};
|
|
539
540
|
|
|
540
541
|
return {
|
package/dist/docs/origin.md
CHANGED
|
@@ -25,7 +25,8 @@ Each `OriginEntry` contains:
|
|
|
25
25
|
```javascript
|
|
26
26
|
{
|
|
27
27
|
blockId: string, // Unique identifier for the containing block
|
|
28
|
-
range: { start: number, end: number }, // Character range
|
|
28
|
+
range: { start: number, end: number }, // Character range including carrier markers
|
|
29
|
+
valueRange: { start: number, end: number } | null, // Character range excluding carrier markers
|
|
29
30
|
carrierType: string, // 'heading', 'blockquote', 'span'
|
|
30
31
|
subject: string, // Subject IRI of the quad
|
|
31
32
|
predicate: string, // Predicate IRI of the quad
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Primary Metadata Example
|
|
2
2
|
|
|
3
|
-
This example demonstrates the Primary Metadata feature in MD-LD, which provides immediate access to the main entity, type,
|
|
3
|
+
This example demonstrates the Primary Metadata feature in MD-LD, which provides immediate access to the main entity, type, label, comment described by a document.
|
|
4
4
|
|
|
5
|
-
## Primary Metadata
|
|
5
|
+
## Primary Metadata Quartet
|
|
6
6
|
|
|
7
7
|
MD-LD tracks three primary metadata fields during parsing to provide immediate document identity:
|
|
8
8
|
|
|
@@ -11,6 +11,7 @@ MD-LD tracks three primary metadata fields during parsing to provide immediate d
|
|
|
11
11
|
| **primarySubject** | First non-fragment `{=subject}` | Document identity (canonical append identity) |
|
|
12
12
|
| **primaryType** | First `rdf:type` declaration | Document category (semantic classification) |
|
|
13
13
|
| **primaryLabel** | First `rdfs:label` literal | Human-readable name (UI & display) |
|
|
14
|
+
| **primaryComment** | First `rdfs:comment` literal | Human-readable comment (UI & description) |
|
|
14
15
|
|
|
15
16
|
## Dual-Layer Architecture
|
|
16
17
|
|
|
@@ -2,118 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
# Personal Journal {=j:index .prov:Collection label}
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Everything I write ends up here. Started keeping this in [2026] {+j:2026/index ?prov:hadMember label}.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Year 2026 {=j:2026/index .prov:Collection label}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Quite a year so far. I've been writing through [January] {+j:2026/01/index ?prov:hadMember label}, [February] {+j:2026/02/index ?prov:hadMember label}, [March] {+j:2026/03/index ?prov:hadMember label}, [April] {+j:2026/04/index ?prov:hadMember label}, and now [May] {+j:2026/05/index ?prov:hadMember label}.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## May 2026 {=j:2026/05/index .prov:Collection label}
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
- February {+j:2026/02/index ?prov:hadMember}
|
|
15
|
-
- March {+j:2026/03/index ?prov:hadMember}
|
|
16
|
-
- April {+j:2026/04/index ?prov:hadMember}
|
|
17
|
-
- May {+j:2026/05/index ?prov:hadMember}
|
|
13
|
+
May kicked off on [2026-05-01] {prov:startedAtTime ^^xsd:date}. I'm splitting it into weeks: [1–3] {+j:2026/05/week-1/index ?prov:hadMember label}, [4–10] {+j:2026/05/week-2/index ?prov:hadMember label}, [11–17] {+j:2026/05/week-3/index ?prov:hadMember label}, [18–24] {+j:2026/05/week-4/index ?prov:hadMember label}, [25–31] {+j:2026/05/week-5/index ?prov:hadMember label}.
|
|
18
14
|
|
|
19
|
-
## May 2026 {=j:2026/05/index .prov:
|
|
15
|
+
## Week 2, May 2026 {=j:2026/05/week-2/index .prov:Collection label}
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
We have 5 weeks in May - [1-3] {+j:2026/05/week-1/index ?prov:hadMember}, [4-10] {+j:2026/05/week-2/index ?prov:hadMember}, [11-17] {+j:2026/05/week-3/index ?prov:hadMember}, [18-24] {+j:2026/05/week-4/index ?prov:hadMember}, [25-31] {+j:2026/05/week-5/index ?prov:hadMember}.
|
|
17
|
+
Week ran [2026-05-04] {prov:startedAtTime ^^xsd:date} to [2026-05-10] {prov:endedAtTime ^^xsd:date}. Decent week overall — [6] {j:totalActivities ^^xsd:integer} things logged, [5] {j:readingHours ^^xsd:integer} hrs reading, [8] {j:workHours ^^xsd:integer} hrs work, [3] {j:exerciseHours ^^xsd:integer} hrs moving. Set [5] {j:goalsTotal ^^xsd:integer} goals Monday, hit [4] {j:goalsCompleted ^^xsd:integer}, rolled [1] {j:goalsCarryOver ^^xsd:integer} over.
|
|
24
18
|
|
|
25
19
|
======
|
|
26
20
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
It's our first record in [week 2] {+j:2026/05/week-2/index ?prov:wasInformedBy}.
|
|
30
|
-
|
|
31
|
-
Complete day with activities, locations, and emotional state.
|
|
32
|
-
|
|
33
|
-
Started: [2026-05-06T08:00:00+04:00] {prov:startedAtTime ^^xsd:dateTime}
|
|
34
|
-
Ended: [2026-05-06T23:30:00+04:00] {prov:endedAtTime ^^xsd:dateTime}
|
|
35
|
-
|
|
36
|
-
Includes these activities: [morning] {+#morning !prov:wasInformedBy}, [afternoon] {+#afternoon !prov:wasInformedBy} and [social] {+#social !prov:wasInformedBy}.
|
|
37
|
-
|
|
38
|
-
### Morning Activities {=#morning .prov:Activity label}
|
|
39
|
-
|
|
40
|
-
I had a [walk] {+#walk ?prov:wasInformedBy} and a [coffee] {+#coffee-prep ?prov:wasInformedBy}.
|
|
41
|
-
|
|
42
|
-
**Morning Walk** {=#walk .prov:Activity label}
|
|
43
|
-
- Duration: [45] {j:duration ^^xsd:integer} minutes
|
|
44
|
-
- Distance: [2.5] {j:distance ^^xsd:decimal} miles
|
|
45
|
-
- Location: [Central Park] {+j:place/central-park .prov:Location ?prov:atLocation}
|
|
46
|
-
- Equipment: [Running Shoes] {+j:shoes/running ?prov:used}
|
|
47
|
-
- Generated: [Heart Rate Data] {+j:2026/05/06/hr-data ?prov:generated}
|
|
21
|
+
### 06 May 2026 {=j:2026/05/06/index .prov:Activity label}
|
|
48
22
|
|
|
49
|
-
|
|
50
|
-
- Location: [Home] {+j:place/home ?prov:atLocation}
|
|
51
|
-
- Resources: [Coffee Beans] {+j:coffee/beans ?prov:used}, [Water] {+j:coffee/water ?prov:used}
|
|
52
|
-
- Generated: [Morning Coffee] {+#morning-coffee ?prov:generated}
|
|
23
|
+
Good day. Up at [2026-05-06T08:00:00+04:00] {prov:startedAtTime ^^xsd:dateTime}, lights out [2026-05-06T23:30:00+04:00] {prov:endedAtTime ^^xsd:dateTime}. This is [week 2] {+j:2026/05/week-2/index ?prov:hadMember}. By end of day I had a [daily wrap-up] {+j:2026/05/06/summary .prov:Entity ?prov:generated label} written.
|
|
53
24
|
|
|
54
|
-
|
|
25
|
+
Morning led into afternoon which led into [evening out] {+#morning ?prov:wasInformedBy} → [#afternoon] {+#afternoon ?prov:wasInformedBy} → [#social] {+#social ?prov:wasInformedBy}.
|
|
55
26
|
|
|
56
|
-
|
|
57
|
-
- Book: [Dune] {+j:dune-book .prov:Entity ?prov:used}
|
|
58
|
-
- Pages: [42] {j:pages ^^xsd:integer}
|
|
59
|
-
- Duration: [2] {j:hours ^^xsd:integer}
|
|
60
|
-
- Generated: [Reading Notes] {+j:reading-notes ?prov:generated}
|
|
27
|
+
#### Morning {=#morning .prov:Activity label}
|
|
61
28
|
|
|
62
|
-
|
|
63
|
-
- Task: [API Documentation] {+j:api-docs .prov:Entity ?prov:used}
|
|
64
|
-
- Duration: [3] {j:hours ^^xsd:integer}
|
|
65
|
-
- Generated: [Documentation Updates] {+j:doc-updates ?prov:generated}
|
|
29
|
+
Started slow, which was the point. [Run first] {+#walk ?prov:wasInformedBy}, then [coffee] {+#coffee-prep ?prov:wasInformedBy}.
|
|
66
30
|
|
|
67
|
-
|
|
31
|
+
##### Morning Run {=#walk .prov:Activity label}
|
|
68
32
|
|
|
69
|
-
|
|
70
|
-
- Associated with: [Sam] {+j:sam .prov:Person ?prov:wasAssociatedWith}
|
|
71
|
-
- Location: [Local Cafe] {+j:cafe .prov:Location ?prov:atLocation}
|
|
72
|
-
- Duration: [30] {j:minutes ^^xsd:integer}
|
|
73
|
-
- Topic: [Career Changes] {j:topic}
|
|
33
|
+
[45] {j:durationMin ^^xsd:integer} minutes, [2.5] {j:distanceMiles ^^xsd:decimal} miles around [Central Park] {+j:place/central-park .prov:Location ?prov:atLocation label}. Wore my [running shoes] {+j:shoes/running .prov:Entity ?prov:used label} — watch logged [heart rate data] {+j:2026/05/06/hr-data .prov:Entity ?prov:generated label} the whole time.
|
|
74
34
|
|
|
75
|
-
|
|
35
|
+
##### Coffee {=#coffee-prep .prov:Activity label}
|
|
76
36
|
|
|
77
|
-
|
|
37
|
+
Back [home] {+j:place/home .prov:Location ?prov:atLocation label}. Ground the [beans] {+j:coffee/beans .prov:Entity ?prov:used label}, boiled [water] {+j:coffee/water .prov:Entity ?prov:used label}, got a proper [cup] {+#morning-coffee .prov:Entity ?prov:generated label}.
|
|
78
38
|
|
|
79
|
-
|
|
80
|
-
Date: [2026-05-06] {j:date ^^xsd:date}
|
|
81
|
-
Mood: [happy] {j:mood}
|
|
82
|
-
Energy level: [8] {j:energy ^^xsd:integer} out of 10
|
|
83
|
-
Stress level: [2] {j:stress ^^xsd:integer} out of 10
|
|
39
|
+
#### Afternoon {=#afternoon .prov:Activity ?prov:wasInformedBy label}
|
|
84
40
|
|
|
85
|
-
|
|
86
|
-
Places visited with frequency and context.
|
|
41
|
+
Split between reading and grinding through docs.
|
|
87
42
|
|
|
88
|
-
|
|
89
|
-
- [Central Park] {+j:central-park ?j:visited} - [3] {j:visitCount ^^xsd:integer} times this week
|
|
90
|
-
- [Local Cafe] {+j:cafe ?j:visited} - [2] {j:visitCount ^^xsd:integer} times this week
|
|
91
|
-
- [Home Office] {+j:home-office ?j:visited} - [5] {j:visitCount ^^xsd:integer} days this week
|
|
43
|
+
##### Reading {=#reading .prov:Activity label}
|
|
92
44
|
|
|
93
|
-
|
|
45
|
+
[2] {j:durationHours ^^xsd:integer} hours with [Dune] {+j:dune-book .prov:Entity ?prov:used label} — got through [42] {j:pages ^^xsd:integer} pages. Wrote up [some notes] {+j:reading-notes .prov:Entity ?prov:generated label} while it was fresh.
|
|
94
46
|
|
|
95
|
-
|
|
47
|
+
##### Work {=#work .prov:Activity ?prov:wasInformedBy label}
|
|
96
48
|
|
|
97
|
-
|
|
49
|
+
[3] {j:durationHours ^^xsd:integer} hours on [API docs] {+j:api-docs .prov:Entity ?prov:used label}. Pushed [a round of updates] {+j:doc-updates .prov:Entity ?prov:generated label}.
|
|
98
50
|
|
|
99
|
-
|
|
100
|
-
Ended: [2026-05-06T23:15:00Z] {prov:endedAtTime ^^xsd:dateTime}
|
|
51
|
+
#### Evening — coffee with Sam {=#social .prov:Activity ?prov:wasInformedBy label}
|
|
101
52
|
|
|
102
|
-
|
|
103
|
-
Total activities: [6] {j:totalActivities ^^xsd:integer}
|
|
104
|
-
Reading time: [5] {j:readingHours ^^xsd:integer} hours
|
|
105
|
-
Work time: [8] {j:workHours ^^xsd:integer} hours
|
|
106
|
-
Exercise time: [3] {j:exerciseHours ^^xsd:integer} hours
|
|
53
|
+
Met [Sam] {+j:sam .prov:Person ?prov:wasAssociatedWith label} at [our usual spot] {+j:place/cafe .prov:Location ?prov:atLocation label}. [30] {j:durationMin ^^xsd:integer} minutes turned into a real conversation about [career changes] {j:topic}.
|
|
107
54
|
|
|
108
|
-
###
|
|
109
|
-
Weekly goals: [Set on Monday] {j:weeklyGoals}
|
|
110
|
-
Completed: [4] {j:goalsCompleted ^^xsd:integer} out of 5
|
|
111
|
-
Carry over: [1] {j:goalsCarryOver ^^xsd:integer} goal
|
|
55
|
+
### Wrap-up {=j:2026/05/06/summary .prov:Entity label}
|
|
112
56
|
|
|
113
|
-
|
|
114
|
-
- Proper PROV-O activity chains
|
|
115
|
-
- Temporal properties with XSD
|
|
116
|
-
- Location and emotional tracking
|
|
117
|
-
- Activity aggregation and summarization
|
|
118
|
-
- Social interaction modeling
|
|
57
|
+
Mood: [happy] {j:mood}. Energy [8] {j:energy ^^xsd:integer}/10, stress [2] {j:stress ^^xsd:integer}/10 — good ratio. Was out at [Central Park] {+j:place/central-park ?j:visited}, [home] {+j:place/home ?j:visited}, and [the café] {+j:place/cafe ?j:visited}.
|
|
119
58
|
|