Skip to content

Commit d17174f

Browse files
committed
feat: add data licensing source registry
1 parent e3cefa8 commit d17174f

9 files changed

Lines changed: 829 additions & 0 deletions

File tree

LICENSE-DATA.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# MRTDown Data License
2+
3+
Unless a file or generated notice says otherwise, MRTDown-authored canonical
4+
data and generated data exports in this repository are licensed under the
5+
Creative Commons Attribution 4.0 International License (`CC-BY-4.0`):
6+
7+
https://creativecommons.org/licenses/by/4.0/
8+
9+
This covers MRTDown-authored static rail entities, issue metadata, normalized
10+
claims, impact events, generated fixture records, and generated export
11+
metadata.
12+
13+
## Third-Party Material
14+
15+
Evidence records may include third-party source text, posts, article metadata,
16+
government or agency source material, user-submitted report text, trademarks,
17+
screenshots, or links to upstream publications. MRTDown does not license those
18+
third-party materials under `CC-BY-4.0`.
19+
20+
Consumers must follow the upstream rights and terms for third-party material.
21+
The source registry in `data/rights/source-registry.json` classifies recurring
22+
source types and records the attribution policy used by generated artifacts.
23+
24+
## Singapore Open Data
25+
26+
Where data is mirrored or derived from Singapore government open data sources,
27+
upstream Singapore Open Data Licence notices continue to apply to the upstream
28+
material. MRTDown licenses only its own curation, normalization, and derived
29+
metadata under `CC-BY-4.0`.
30+
31+
## Source Code
32+
33+
This data license does not apply to package source code, scripts, or tooling.
34+
Package and repository code remains separately marked as `UNLICENSED` unless a
35+
future software license file says otherwise.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ npm run lint
2626
- `data/station`, `data/line`, `data/service`, `data/operator`, `data/town`,
2727
and `data/landmark`: canonical static entities.
2828
- `data/issue/YYYY/MM/<issue_id>/`: canonical issue bundles.
29+
- `data/rights/source-registry.json`: source rights and attribution rules used
30+
for evidence classification.
2931
- `fixtures/generated/data`: on-demand generated fixture data for tests and
3032
examples.
3133
- `packages/core`: shared schemas, period helpers, and state helpers.
@@ -116,6 +118,18 @@ Supported issue types are `disruption`, `maintenance`, and `infra`.
116118
Use open-ended periods for ongoing issues. CLI validation is required whenever
117119
canonical data changes.
118120

121+
## Data Licensing
122+
123+
MRTDown-authored canonical data and generated data exports are covered by
124+
`CC-BY-4.0` as described in `LICENSE-DATA.md`. Package source code remains
125+
separately marked as `UNLICENSED`.
126+
127+
Evidence may contain or link to third-party posts, articles, source text,
128+
government source material, or direct report text. Those upstream materials are
129+
not licensed by MRTDown. Recurring evidence source classes are recorded in
130+
`data/rights/source-registry.json` so generated attribution artifacts can
131+
preserve source-specific notices.
132+
119133
## Evidence Ingest
120134

121135
Webhook evidence payloads use the shared schemas in `@mrtdown/ingest-contracts`

data/rights/source-registry.json

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
{
2+
"schemaVersion": 1,
3+
"rights": [
4+
{
5+
"id": "CC-BY-4.0",
6+
"label": "Creative Commons Attribution 4.0 International",
7+
"url": "https://creativecommons.org/licenses/by/4.0/",
8+
"category": "mrtdown-authored",
9+
"summary": "MRTDown-authored canonical data, curation, normalization, and generated export metadata."
10+
},
11+
{
12+
"id": "Singapore-Open-Data-Licence-1.0",
13+
"label": "Singapore Open Data Licence version 1.0",
14+
"url": "https://data.gov.sg/open-data-licence",
15+
"category": "sg-open-data",
16+
"summary": "Singapore government open data source material; upstream notice must be preserved."
17+
},
18+
{
19+
"id": "LicenseRef-X-Content",
20+
"label": "X/Twitter source content",
21+
"url": null,
22+
"category": "platform-post",
23+
"summary": "Post content and platform material are not licensed by MRTDown."
24+
},
25+
{
26+
"id": "LicenseRef-Reddit-Content",
27+
"label": "Reddit source content",
28+
"url": null,
29+
"category": "platform-post",
30+
"summary": "Post and comment content is not licensed by MRTDown."
31+
},
32+
{
33+
"id": "LicenseRef-Mastodon-Content",
34+
"label": "Mastodon source content",
35+
"url": null,
36+
"category": "platform-post",
37+
"summary": "Post content and instance-hosted material are not licensed by MRTDown."
38+
},
39+
{
40+
"id": "LicenseRef-Facebook-Content",
41+
"label": "Facebook source content",
42+
"url": null,
43+
"category": "platform-post",
44+
"summary": "Post content and platform material are not licensed by MRTDown."
45+
},
46+
{
47+
"id": "LicenseRef-Publisher-All-Rights-Reserved",
48+
"label": "Publisher source content",
49+
"url": null,
50+
"category": "news-publication",
51+
"summary": "Publisher article text, media, and site material are not licensed by MRTDown."
52+
},
53+
{
54+
"id": "LicenseRef-Generic-Web-All-Rights-Reserved",
55+
"label": "Generic web source content",
56+
"url": null,
57+
"category": "generic-web",
58+
"summary": "Linked web source content is not licensed by MRTDown."
59+
},
60+
{
61+
"id": "LicenseRef-Direct-Crowd-Report-Inbound-Terms",
62+
"label": "Direct crowd report inbound terms",
63+
"url": null,
64+
"category": "crowd-report",
65+
"summary": "Direct report text requires explicit inbound submitter terms before public reuse."
66+
},
67+
{
68+
"id": "LicenseRef-Unknown-Third-Party",
69+
"label": "Unknown third-party content",
70+
"url": null,
71+
"category": "unknown-third-party",
72+
"summary": "Temporary classification for unresolved source rights."
73+
}
74+
],
75+
"rules": [
76+
{
77+
"id": "x-post",
78+
"label": "X/Twitter posts",
79+
"match": {
80+
"sourceUrlHost": ["x.com", "twitter.com"]
81+
},
82+
"category": "platform-post",
83+
"contentRights": "LicenseRef-X-Content",
84+
"mrtdownRights": "CC-BY-4.0",
85+
"policy": "third-party-content-not-licensed-by-mrtdown",
86+
"attributionTemplate": "{sourceUrl}",
87+
"publicExportAllowed": true
88+
},
89+
{
90+
"id": "reddit-post",
91+
"label": "Reddit posts and comments",
92+
"match": {
93+
"sourceUrlHost": ["reddit.com", "www.reddit.com"]
94+
},
95+
"category": "platform-post",
96+
"contentRights": "LicenseRef-Reddit-Content",
97+
"mrtdownRights": "CC-BY-4.0",
98+
"policy": "third-party-content-not-licensed-by-mrtdown",
99+
"attributionTemplate": "{sourceUrl}",
100+
"publicExportAllowed": true
101+
},
102+
{
103+
"id": "mastodon-post",
104+
"label": "Mastodon posts",
105+
"match": {
106+
"sourceUrlHost": ["mastodon.social"]
107+
},
108+
"category": "platform-post",
109+
"contentRights": "LicenseRef-Mastodon-Content",
110+
"mrtdownRights": "CC-BY-4.0",
111+
"policy": "third-party-content-not-licensed-by-mrtdown",
112+
"attributionTemplate": "{sourceUrl}",
113+
"publicExportAllowed": true
114+
},
115+
{
116+
"id": "facebook-post",
117+
"label": "Facebook posts",
118+
"match": {
119+
"sourceUrlHost": ["facebook.com", "www.facebook.com"]
120+
},
121+
"category": "platform-post",
122+
"contentRights": "LicenseRef-Facebook-Content",
123+
"mrtdownRights": "CC-BY-4.0",
124+
"policy": "third-party-content-not-licensed-by-mrtdown",
125+
"attributionTemplate": "{sourceUrl}",
126+
"publicExportAllowed": true
127+
},
128+
{
129+
"id": "lta-datamall",
130+
"label": "LTA DataMall",
131+
"match": {
132+
"sourceUrlHost": ["datamall.lta.gov.sg"]
133+
},
134+
"category": "sg-open-data",
135+
"contentRights": "Singapore-Open-Data-Licence-1.0",
136+
"mrtdownRights": "CC-BY-4.0",
137+
"policy": "preserve-upstream-open-data-notice",
138+
"attributionTemplate": "Contains information from LTA DataMall accessed via {sourceUrl}, made available under the Singapore Open Data Licence version 1.0.",
139+
"publicExportAllowed": true
140+
},
141+
{
142+
"id": "lta-website",
143+
"label": "LTA website publications",
144+
"match": {
145+
"sourceUrlHost": ["lta.gov.sg", "www.lta.gov.sg"]
146+
},
147+
"category": "generic-web",
148+
"contentRights": "LicenseRef-Generic-Web-All-Rights-Reserved",
149+
"mrtdownRights": "CC-BY-4.0",
150+
"policy": "third-party-content-not-licensed-by-mrtdown",
151+
"attributionTemplate": "{sourceUrl}",
152+
"publicExportAllowed": true
153+
},
154+
{
155+
"id": "cna-article",
156+
"label": "CNA/Mediacorp articles",
157+
"match": {
158+
"sourceUrlHost": ["channelnewsasia.com", "www.channelnewsasia.com"]
159+
},
160+
"category": "news-publication",
161+
"contentRights": "LicenseRef-Publisher-All-Rights-Reserved",
162+
"mrtdownRights": "CC-BY-4.0",
163+
"policy": "third-party-content-not-licensed-by-mrtdown",
164+
"attributionTemplate": "{sourceUrl}",
165+
"publicExportAllowed": true
166+
},
167+
{
168+
"id": "straits-times-article",
169+
"label": "Straits Times/SPH articles",
170+
"match": {
171+
"sourceUrlHost": ["straitstimes.com", "www.straitstimes.com"]
172+
},
173+
"category": "news-publication",
174+
"contentRights": "LicenseRef-Publisher-All-Rights-Reserved",
175+
"mrtdownRights": "CC-BY-4.0",
176+
"policy": "third-party-content-not-licensed-by-mrtdown",
177+
"attributionTemplate": "{sourceUrl}",
178+
"publicExportAllowed": true
179+
},
180+
{
181+
"id": "web-archive-snapshot",
182+
"label": "Web Archive snapshots",
183+
"match": {
184+
"sourceUrlHost": ["web.archive.org"],
185+
"sourceUrlPathPrefix": ["/web/"]
186+
},
187+
"category": "generic-web",
188+
"contentRights": "LicenseRef-Generic-Web-All-Rights-Reserved",
189+
"mrtdownRights": "CC-BY-4.0",
190+
"policy": "third-party-content-not-licensed-by-mrtdown",
191+
"attributionTemplate": "Archived source snapshot at {sourceUrl}; upstream source rights apply.",
192+
"publicExportAllowed": true
193+
},
194+
{
195+
"id": "direct-crowd-report",
196+
"label": "Direct crowd reports",
197+
"match": {
198+
"sourceUrlHost": ["reports.mrtdown.sg"],
199+
"evidenceType": ["report.public"]
200+
},
201+
"category": "crowd-report",
202+
"contentRights": "LicenseRef-Direct-Crowd-Report-Inbound-Terms",
203+
"mrtdownRights": "CC-BY-4.0",
204+
"policy": "direct-crowd-report-inbound-terms-required",
205+
"attributionTemplate": "Direct MRTDown crowd report {sourceUrl}",
206+
"publicExportAllowed": false
207+
},
208+
{
209+
"id": "fixture-example",
210+
"label": "Fixture example sources",
211+
"match": {
212+
"sourceUrlHost": ["example.com"]
213+
},
214+
"category": "mrtdown-authored",
215+
"contentRights": "CC-BY-4.0",
216+
"mrtdownRights": "CC-BY-4.0",
217+
"policy": "mrtdown-authored-public-data",
218+
"attributionTemplate": "MRTDown fixture source {sourceUrl}",
219+
"publicExportAllowed": true
220+
}
221+
]
222+
}

packages/core/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export * from './schema/Landmark.js';
1919
export * from './schema/Line.js';
2020
export * from './schema/Manifest.js';
2121
export * from './schema/Operator.js';
22+
export * from './schema/Rights.js';
2223
export * from './schema/SchematicMap.js';
2324
export * from './schema/Service.js';
2425
export * from './schema/Station.js';

0 commit comments

Comments
 (0)