Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
ali1k committed Oct 24, 2018
1 parent 56599d3 commit a00b379
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions decksToRDF.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@ swR:${id}-${item.id} swV:hasTag swTagR:${tag.id} .
item.contentItems.forEach((content)=>{
if(content.kind === 'slide'){
console.log(`
swR:${id}-${item.id} swV:hasContentItem swR:${id}-${item.id}/${content.kind}/${content.ref.id}-${content.ref.revision} .
swR:${id}-${item.id}/${content.kind}/${content.ref.id}-${content.ref.revision} a swV:SlideRevision ;
swR:${id}-${item.id} swV:hasContentItem <https://slidewiki.org/deck/${id}-${item.id}/${content.kind}/${content.ref.id}-${content.ref.revision}> .
<https://slidewiki.org/deck/${id}-${item.id}/${content.kind}/${content.ref.id}-${content.ref.revision}> a swV:SlideRevision ;
swV:isRevisedFrom swSlideR:${content.ref.id} ;
swV:isEqualTo swSlideR:${content.ref.id}-${content.ref.revision} ;
swV:order """${content.order}""" .
`);
}else{
console.log(`
swR:${id}-${item.id} swV:hasContentItem swR:${id}-${item.id}/${content.kind}/${content.ref.id}-${content.ref.revision} .
swR:${id}-${item.id}/${content.kind}/${content.ref.id}-${content.ref.revision} a swV:DeckRevision ;
swR:${id}-${item.id} swV:hasContentItem <https://slidewiki.org/deck/${id}-${item.id}/${content.kind}/${content.ref.id}-${content.ref.revision}> .
<https://slidewiki.org/deck/${id}-${item.id}/${content.kind}/${content.ref.id}-${content.ref.revision}> a swV:DeckRevision ;
swV:isRevisedFrom swR:${content.ref.id} ;
swV:isEqualTo swR:${content.ref.id}-${content.ref.revision} ;
swV:order """${content.order}""" .
Expand Down
6 changes: 6 additions & 0 deletions usersToRDF.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ swR:${id} a swV:User .
`);
for(let prop in obj){
if(selected.indexOf(prop) !== -1){
if(prop === 'picture'){
console.log(`
swR:${id} swV:picture <${obj[prop]}> .
`);
continue;
}
console.log(`
swR:${id} swV:${prop} """${obj[prop] ? obj[prop] : '-'}""" .
`);
Expand Down

0 comments on commit a00b379

Please sign in to comment.