Skip to content

Commit

Permalink
skip records with error
Browse files Browse the repository at this point in the history
  • Loading branch information
ali1k committed Oct 24, 2018
1 parent 030ac9d commit 351a581
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions data/decks.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{"_id":122141,"user":17676,"hidden":true,"accessLevel":null,"editors":{"users":[],"groups":[]},"timestamp":"2018-10-22T20:32:19.133Z","description":"","translated_from":null,"lastUpdate":"2018-10-22T20:32:19.149Z","datasource":null,"license":"CC BY-SA","contributors":[{"user":17676,"count":1}],"active":1,"revisions":[{"id":1,"usage":[{"id":122124,"revision":1}],"title":"New deck","timestamp":"2018-10-22T20:32:19.133Z","lastUpdate":"2018-10-22T20:32:19.149Z","user":17676,"language":"en","parent":null,"tags":[],"comment":null,"abstract":null,"footer":null,"contentItems":[{"order":1,"ref":{"id":797935,"revision":1},"kind":"slide"}],"variants":[],"theme":"default","allowMarkdown":false}]}
{"_id":122142,"user":17868,"hidden":true,"accessLevel":null,"editors":{"users":[],"groups":[]},"timestamp":"2018-10-22T20:48:14.023Z","description":"Theory Exercise 3 E and J","translated_from":{"status":"original"},"lastUpdate":"2018-10-22T21:57:56.357Z","datasource":null,"license":"CC BY-SA","contributors":[{"user":17868,"count":17}],"active":1,"revisions":[{"id":1,"usage":[],"title":"MaxwellSilversteinTheoryExercise3","timestamp":"2018-10-22T20:48:14.023Z","lastUpdate":"2018-10-22T21:57:56.357Z","user":17868,"language":"en","parent":null,"tags":[],"comment":null,"abstract":null,"footer":null,"contentItems":[{"order":1,"ref":{"id":797956,"revision":4},"kind":"slide"},{"order":2,"ref":{"id":797963,"revision":3},"kind":"slide"},{"order":3,"ref":{"id":797964,"revision":4},"kind":"slide"},{"order":4,"kind":"slide","ref":{"id":797968,"revision":3},"variants":[]},{"order":5,"ref":{"id":797973,"revision":3},"kind":"slide"},{"order":6,"ref":{"id":797974,"revision":2},"kind":"slide"},{"order":7,"ref":{"id":797977,"revision":2},"kind":"slide"}],"variants":[],"theme":"default","allowMarkdown":false}]}
{"_id":122143,"user":17835,"hidden":false,"accessLevel":null,"editors":{"users":[],"groups":[]},"timestamp":"2018-10-22T21:01:36.251Z","description":"Van Duyne presentation of groups of characteristics I and J","translated_from":{"status":"original"},"lastUpdate":"2018-10-22T21:59:52.384Z","datasource":null,"license":"CC BY-SA","contributors":[{"user":17835,"count":18}],"active":1,"revisions":[{"id":1,"usage":[],"title":"Van Duyne I and L","timestamp":"2018-10-22T21:01:36.251Z","lastUpdate":"2018-10-22T21:59:52.384Z","user":17835,"language":"en","parent":null,"tags":[],"comment":null,"abstract":null,"footer":null,"contentItems":[{"order":1,"ref":{"id":797950,"revision":5},"kind":"slide"},{"order":2,"kind":"slide","ref":{"id":797980,"revision":1},"variants":[]},{"order":3,"kind":"slide","ref":{"id":797951,"revision":3},"variants":[]},{"order":4,"kind":"slide","ref":{"id":797959,"revision":2},"variants":[]},{"order":5,"kind":"slide","ref":{"id":797961,"revision":3},"variants":[]},{"order":6,"kind":"slide","ref":{"id":797966,"revision":2},"variants":[]},{"order":7,"kind":"slide","ref":{"id":797967,"revision":2},"variants":[]},{"order":8,"kind":"slide","ref":{"id":797971,"revision":3},"variants":[]},{"order":9,"kind":"slide","ref":{"id":797976,"revision":2},"variants":[]},{"order":10,"kind":"slide","ref":{"id":797978,"revision":2},"variants":[]}],"variants":[],"theme":"default","allowMarkdown":false,"description":"Van Duyne presentation of groups of characteristics I and J"}]}
{"_id":78876,"description":"this is to test how deck import works","language":"en","license":"CC BY-SA","user":2,"translated_from":{"status":"original"},"contributors":[{"user":2,"count":6}],"active":1,"timestamp":"2017-07-21T07:55:18.530Z","lastUpdate":"2017-07-21T07:55:40.355Z","datasource":null,"revisions":[{"id":1,"usage":[{"id":78865,"revision":NaN}],"title":"My First Imported Deck","timestamp":"2017-07-21T07:55:18.530Z","lastUpdate":"2017-07-21T07:55:40.355Z","user":2,"language":"en","parent":null,"tags":[],"comment":null,"abstract":null,"footer":null,"contentItems":[{"order":1,"kind":"slide","ref":{"id":415002,"revision":2}}],"theme":"default"}],"editors":{"users":[],"groups":[]}}
{"_id":122144,"user":17711,"hidden":true,"accessLevel":null,"editors":{"users":[],"groups":[]},"timestamp":"2018-10-22T21:14:07.261Z","description":"Pattern D - Writing and Managing Content\n\nLuis Antillon, Jacqueline Levitan, Sam Osheroff, Marie Rogers","translated_from":{"status":"original"},"lastUpdate":"2018-10-22T21:38:01.524Z","datasource":null,"license":"CC BY-SA","contributors":[{"user":17711,"count":9}],"active":1,"revisions":[{"id":1,"usage":[],"title":"UI Van Duyne Pattern D","timestamp":"2018-10-22T21:14:07.261Z","lastUpdate":"2018-10-22T21:38:01.524Z","user":17711,"language":"en","parent":null,"tags":[],"comment":null,"abstract":null,"footer":null,"contentItems":[{"order":1,"ref":{"id":797952,"revision":2},"kind":"slide"},{"order":2,"ref":{"id":797958,"revision":6},"kind":"slide"}],"variants":[],"theme":"default","allowMarkdown":false,"description":"Pattern D - Writing and Managing Content\n\nLuis Antillon, Jacqueline Levitan, Sam Osheroff, Marie Rogers"}]}
3 changes: 3 additions & 0 deletions decksToRDF.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ fs.createReadStream('data/decks.txt')
.pipe(ndjson.parse())
.on('data', function(obj) {
convertToRDF(obj);
})
.on('error', function(obj) {
console.log('#######Error#########');
});

//list of selected properties
Expand Down
3 changes: 3 additions & 0 deletions slidesToRDF.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ fs.createReadStream('data/slides.txt')
.pipe(ndjson.parse())
.on('data', function(obj) {
convertToRDF(obj);
})
.on('error', function(obj) {
console.log('#######Error#########');
});

//list of selected properties
Expand Down
3 changes: 3 additions & 0 deletions tagsToRDF.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ fs.createReadStream('data/tags.txt')
.pipe(ndjson.parse())
.on('data', function(obj) {
convertToRDF(obj);
})
.on('error', function(obj) {
console.log('#######Error#########');
});

//list of selected properties
Expand Down
3 changes: 3 additions & 0 deletions usergroupsToRDF.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ fs.createReadStream('data/usergroups.txt')
.pipe(ndjson.parse())
.on('data', function(obj) {
convertToRDF(obj);
})
.on('error', function(obj) {
console.log('#######Error#########');
});

//list of selected properties
Expand Down
3 changes: 3 additions & 0 deletions usersToRDF.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ fs.createReadStream('data/users.txt')
.pipe(ndjson.parse())
.on('data', function(obj) {
convertToRDF(obj);
})
.on('error', function(obj) {
console.log('#######Error#########');
});

//list of selected properties
Expand Down

0 comments on commit 351a581

Please sign in to comment.