Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

2.0 lit #6

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ to use with csvlint from inside a folder containing the csv tables.
```bash
csvlint Act.csv schema=https://raw.githubusercontent.com/readchina/csv-schema/master/readingdata/Act.json
```

csv or schemas can be checked on this webpage: http://csvlint.io/

Find quick references or test regular expressions on: https://regex101.com/
13 changes: 13 additions & 0 deletions readingdata/Act.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
"required": false,
"min-length": 4
}
}, {
"name": "narrative_time",
"constraints": {
"required": false,
"min-length": 2,
"pattern": "(^$|NULL|[0-3])"
}
}, {
"name": "substantial_discussion",
"constraints": {
Expand All @@ -67,6 +74,12 @@
"required": false,
"pattern": "(\W?|[1-3])"
}
}, {
"name": "fictionality",
"constraints": {
"required": false,
"pattern":"F?"
}
}, {
"name": "commentary",
"constraints": {
Expand Down
59 changes: 59 additions & 0 deletions readingdata/NarrativePosition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"fields": [{
"name": "nar_pos_id",
"constraints": {
"required": true,
"unique": true,
"pattern": "N[0-9]{2}"
}
},
{
"name": "nar_pos_name",
"constraints": {
"required": true
}
},
{
"name": "note",
"constraints": {
"required": false
}
},
{
"name": "source",
"constraints": {
"required": false
}
},
{
"name": "created",
"constraints": {
"required": true,
"type": "http://www.w3.org/2001/XMLSchema#date"
}
},
{
"name": "created_by",
"constraints": {
"required": true,
"pattern": "[A-Z]{2}"
}
},
{
"name": "last_modified",
"constraints": {
"required": true,
"type": "http://www.w3.org/2001/XMLSchema#date"
}
},
{
"name": "last_modified_by",
"constraints": {
"required": true,
"pattern": "[A-Z]{2}"
}
}
],
"primaryKey": "nar_pos_id",
"missingValues": ["", "NULL"]
}
18 changes: 18 additions & 0 deletions readingdata/Person.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@
"required": false,
"pattern": "(^$|NULL|S[0-9]{2}|unknown)"
}
}, {
"name": "narrative_age",
"constraints": {
"required": false,
"pattern": "(^$|NULL|[0-3])"
}
}, {
"name": "neibu_access",
"constraints": {
Expand Down Expand Up @@ -115,6 +121,18 @@
"constraints": {
"required": false
}
}, {
"name": "fictionality",
"constraints": {
"required": false,
"pattern": "F?"
}
}, {
"name": "narrative_status",
"constraints": {
"required": false,
"pattern": "(^$|NULL|N[0-9]{2}|S[0-9]{2}|unknown)"
}
}, {
"name": "commentary",
"constraints": {
Expand Down
6 changes: 6 additions & 0 deletions readingdata/PrimarySource.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@
"constraints": {
"required": false
}
}, {
"name": "fictionality",
"constraints": {
"required": false,
"pattern": "F?"
}
}, {
"name": "commentary",
"constraints": {
Expand Down
2 changes: 1 addition & 1 deletion readingdata/Quotation.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"name": "source",
"constraints": {
"required": true,
"pattern": "(P|S)S[0-9]{5}"
"pattern": "(P|S)S[0-9]{5}|AW[0-9]{5}"
}
},
{
Expand Down
12 changes: 12 additions & 0 deletions readingdata/SecondarySource.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@
"constraints": {
"required": false
}
}, {
"name": "fictionality",
"constraints": {
"required": false,
"pattern": "F?"
}
}, {
"name": "main_narrator",
"constraints": {
"required": false,
"pattern": "(^$|P[0-9]{4}|SS[0-9]{5}|I[0-9]{4})"
}
}, {
"name": "commentary",
"constraints": {
Expand Down