whyis-fediverse 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl
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.
- whyis_fediverse/static/js/comment.js +85 -0
- whyis_fediverse/static/js/discussion.js +73 -0
- whyis_fediverse/static/js/new_post.js +180 -0
- whyis_fediverse/static/js/post.js +91 -0
- whyis_fediverse/static/js/post_view.js +94 -0
- whyis_fediverse/templates/__init__.py +0 -0
- whyis_fediverse/templates/all_discussion.json +31 -0
- whyis_fediverse/templates/discussion.html +63 -0
- whyis_fediverse/templates/discussion.json +31 -0
- whyis_fediverse/templates/object_data.json +71 -0
- whyis_fediverse/templates/object_replies.json +11 -0
- whyis_fediverse/templates/object_view.html +16 -0
- whyis_fediverse/templates/resource_get.json +6 -0
- whyis_fediverse/templates/resource_search.json +9 -0
- whyis_fediverse/templates/space_get.json +6 -0
- whyis_fediverse/templates/space_search.json +7 -0
- whyis_fediverse/test_example.trig +115 -0
- whyis_fediverse/test_example.ttl +115 -0
- whyis_fediverse/vocab.ttl +83 -0
- {whyis_fediverse-0.1.1.dist-info → whyis_fediverse-0.1.3.dist-info}/METADATA +1 -1
- whyis_fediverse-0.1.3.dist-info/RECORD +27 -0
- {whyis_fediverse-0.1.1.dist-info → whyis_fediverse-0.1.3.dist-info}/WHEEL +1 -1
- whyis_fediverse-0.1.1.dist-info/RECORD +0 -8
- {whyis_fediverse-0.1.1.dist-info → whyis_fediverse-0.1.3.dist-info}/LICENSE +0 -0
- {whyis_fediverse-0.1.1.dist-info → whyis_fediverse-0.1.3.dist-info}/entry_points.txt +0 -0
- {whyis_fediverse-0.1.1.dist-info → whyis_fediverse-0.1.3.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import dayjs from '//unpkg.com/dayjs@1.11.13/esm';
|
|
2
|
+
import relativeTime from '//unpkg.com/dayjs@1.11.13/esm/plugin/relativeTime';
|
|
3
|
+
dayjs.extend(relativeTime);
|
|
4
|
+
import {Vue, axios, createApp} from '../../../dist/whyis.js';
|
|
5
|
+
export default Vue.component('fedi-comment', {
|
|
6
|
+
name: "fedi-comment",
|
|
7
|
+
props:{
|
|
8
|
+
value: {
|
|
9
|
+
type: Object,
|
|
10
|
+
require: true
|
|
11
|
+
},
|
|
12
|
+
expanded: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
replies: [],
|
|
20
|
+
loading: false,
|
|
21
|
+
loadError: false,
|
|
22
|
+
otherArgs: null,
|
|
23
|
+
pageSize: 20,
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
template: `
|
|
27
|
+
<md-content style="margin-top:1.5em">
|
|
28
|
+
<div style="width:fit-content; margin-top:0.5em; border-radius:1em; padding-left:0.75em; padding-right:0.75em; background-color:lightgray">
|
|
29
|
+
<a :href="value.attributedTo.id">
|
|
30
|
+
<small>
|
|
31
|
+
<strong>{{value.attributedTo.name}}</strong>
|
|
32
|
+
</small>
|
|
33
|
+
</a>
|
|
34
|
+
<div v-html="value.content"></div>
|
|
35
|
+
</div>
|
|
36
|
+
<div v-if="value.attachment != null && value.attachment.length != 0">
|
|
37
|
+
<img style="" v-for="image in value.attachment" :src="image.url" :alt="image.url">
|
|
38
|
+
</div>
|
|
39
|
+
</md-content>
|
|
40
|
+
`,
|
|
41
|
+
watch: {
|
|
42
|
+
},
|
|
43
|
+
components: {
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
published: function() {
|
|
47
|
+
return dayjs(this.value.published).fromNow();
|
|
48
|
+
},
|
|
49
|
+
// a computed getter
|
|
50
|
+
images: function () {
|
|
51
|
+
console.log(this.value.attachment);
|
|
52
|
+
// `this` points to the vm instance
|
|
53
|
+
let result = this.value.attachment.filter(function(x) {x.type.indexOf('Image') >= 0});
|
|
54
|
+
console.log(result);
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
methods: {
|
|
59
|
+
async loadPage() {
|
|
60
|
+
// non-page sized results means we've reached the end.
|
|
61
|
+
if (this.results.length % this.pageSize > 0)
|
|
62
|
+
return
|
|
63
|
+
const result = await axios.get(`${ROOT_URL}about`,
|
|
64
|
+
{ params: {
|
|
65
|
+
view: "comments",
|
|
66
|
+
uri: this.entity,
|
|
67
|
+
limit: this.pageSize,
|
|
68
|
+
offset: this.results.length
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
this.results.push(...result.data)
|
|
72
|
+
},
|
|
73
|
+
async scrollBottom () {
|
|
74
|
+
if (Math.ceil(window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
|
75
|
+
await this.loadPage()
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
async mounted (){
|
|
80
|
+
},
|
|
81
|
+
async unmounted() {
|
|
82
|
+
},
|
|
83
|
+
created(){
|
|
84
|
+
}
|
|
85
|
+
})
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {Vue, axios, createApp} from '../../../dist/whyis.js';
|
|
2
|
+
import post from './post.js';
|
|
3
|
+
import newPost from './new_post.js';
|
|
4
|
+
|
|
5
|
+
export default Vue.component('fedi-discussion', {
|
|
6
|
+
name: "fedi-discussion",
|
|
7
|
+
props:{
|
|
8
|
+
entity: {
|
|
9
|
+
type: String,
|
|
10
|
+
require: true
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
data() {
|
|
14
|
+
return {
|
|
15
|
+
results: [],
|
|
16
|
+
loading: false,
|
|
17
|
+
loadError: false,
|
|
18
|
+
otherArgs: null,
|
|
19
|
+
pageSize: 20,
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
template: `
|
|
23
|
+
<div style="max-width:500px">
|
|
24
|
+
<spinner :loading="loading" text='Loading...' v-if="loading"/>
|
|
25
|
+
<div v-else>
|
|
26
|
+
<fedi-new-post style="margin-top:0.5em; border-radius:0.5em"
|
|
27
|
+
:entity="entity">
|
|
28
|
+
</fedi-new-post>
|
|
29
|
+
<fedi-post style="margin-top:0.5em; border-radius:0.5em"
|
|
30
|
+
v-for="(post, index) in results"
|
|
31
|
+
:key="post.id"
|
|
32
|
+
:entity="entity"
|
|
33
|
+
v-bind:value="post">
|
|
34
|
+
</fedi-post>
|
|
35
|
+
</div>
|
|
36
|
+
</div>`,
|
|
37
|
+
watch: {
|
|
38
|
+
},
|
|
39
|
+
components: {
|
|
40
|
+
},
|
|
41
|
+
methods: {
|
|
42
|
+
async loadPage() {
|
|
43
|
+
// non-page sized results means we've reached the end.
|
|
44
|
+
if (this.results.length % this.pageSize > 0)
|
|
45
|
+
return
|
|
46
|
+
const result = await axios.get(`${ROOT_URL}about`,
|
|
47
|
+
{ params: {
|
|
48
|
+
view: "comments",
|
|
49
|
+
uri: this.entity,
|
|
50
|
+
limit: this.pageSize,
|
|
51
|
+
offset: this.results.length
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
this.results.push(...result.data)
|
|
55
|
+
},
|
|
56
|
+
async scrollBottom () {
|
|
57
|
+
if (Math.ceil(window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
|
58
|
+
await this.loadPage()
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
async mounted (){
|
|
63
|
+
window.addEventListener("scroll", this.scrollBottom)
|
|
64
|
+
this.loading = true
|
|
65
|
+
await this.loadPage()
|
|
66
|
+
this.loading = false
|
|
67
|
+
},
|
|
68
|
+
async unmounted() {
|
|
69
|
+
window.removeEventListener("scroll", this.scrollBottom)
|
|
70
|
+
},
|
|
71
|
+
created(){
|
|
72
|
+
}
|
|
73
|
+
})
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import {Vue, axios, createApp} from '../../../dist/whyis.js';
|
|
2
|
+
|
|
3
|
+
function newPost(uri) {
|
|
4
|
+
return {
|
|
5
|
+
"@context" : [
|
|
6
|
+
"https://www.w3.org/ns/activitystreams",
|
|
7
|
+
{
|
|
8
|
+
"np" : "http://www.nanopub.org/nschema#",
|
|
9
|
+
"schema" : "http://schema.org/"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"id" : uri,
|
|
13
|
+
"type" : "Note",
|
|
14
|
+
"attributedTo" : {
|
|
15
|
+
"id" : USER.uri,
|
|
16
|
+
"name" : USER.name
|
|
17
|
+
},
|
|
18
|
+
"to" : [],
|
|
19
|
+
"attachment" : [],
|
|
20
|
+
"content" : "",
|
|
21
|
+
"inReplyTo" : null,
|
|
22
|
+
"summary" : null,
|
|
23
|
+
"context" : null,
|
|
24
|
+
"published" : null,
|
|
25
|
+
"name" : null
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async function uploadFiles(fileList, uri){
|
|
30
|
+
let distrData = new FormData();
|
|
31
|
+
let distrLDs = Array(fileList.length);
|
|
32
|
+
distrData.append('upload_type', 'http://purl.org/dc/dcmitype/Collection')
|
|
33
|
+
|
|
34
|
+
// append the files to FormData
|
|
35
|
+
Array
|
|
36
|
+
.from(Array(fileList.length).keys())
|
|
37
|
+
.map(x => {
|
|
38
|
+
let new_file_name = crypto.randomUUID();
|
|
39
|
+
let upload_name = fileList[x].name;
|
|
40
|
+
distrData.append(new_file_name, fileList[x], new_file_name);
|
|
41
|
+
distrLDs[x] = {
|
|
42
|
+
'id': `${uri}/${new_file_name}`,
|
|
43
|
+
"type": [],
|
|
44
|
+
'url': `${uri}/${new_file_name}`,
|
|
45
|
+
"mediaType": fileList[x].type,
|
|
46
|
+
'http://www.w3.org/2000/01/rdf-schema#label': fileList[x].name,
|
|
47
|
+
}
|
|
48
|
+
if (fileList[x].type.indexOf("image") > -1) {
|
|
49
|
+
distrLDs[x].type.push("Image");
|
|
50
|
+
distrLDs[x].type.push("schema:ImageObject");
|
|
51
|
+
} else if (fileList[x].type.indexOf("video") > -1) {
|
|
52
|
+
distrLDs[x].type.push("Video");
|
|
53
|
+
distrLDs[x].type.push("schema:VideoObject");
|
|
54
|
+
} else {
|
|
55
|
+
distrLDs[x].type.push("Document");
|
|
56
|
+
distrLDs[x].type.push("schema:DigitalDocument");
|
|
57
|
+
}
|
|
58
|
+
console.log(distrLDs[x]);
|
|
59
|
+
});
|
|
60
|
+
console.log(distrLDs);
|
|
61
|
+
|
|
62
|
+
const baseUrl = `${window.location.origin}/about?uri=${uri}`;
|
|
63
|
+
await axios.post( baseUrl,
|
|
64
|
+
distrData,
|
|
65
|
+
{
|
|
66
|
+
headers: {
|
|
67
|
+
'Content-Type': 'multipart/form-data',
|
|
68
|
+
},
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
return distrLDs;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export default Vue.component('fedi-new-post', {
|
|
75
|
+
name: "fedi-new-post",
|
|
76
|
+
props:{
|
|
77
|
+
entity: {
|
|
78
|
+
type: String,
|
|
79
|
+
require: false
|
|
80
|
+
},
|
|
81
|
+
inReplyTo: {
|
|
82
|
+
type: String,
|
|
83
|
+
require: false
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
data() {
|
|
87
|
+
let id = crypto.randomUUID();
|
|
88
|
+
let uri = `${LOD_PREFIX}/note/${id}`;
|
|
89
|
+
console.log(uri, id);
|
|
90
|
+
return {
|
|
91
|
+
user: USER,
|
|
92
|
+
otherArgs: null,
|
|
93
|
+
attachments: [],
|
|
94
|
+
id : id,
|
|
95
|
+
uri : uri,
|
|
96
|
+
post: newPost(uri),
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
template: `
|
|
100
|
+
<md-card>
|
|
101
|
+
<md-card-content>
|
|
102
|
+
<md-field>
|
|
103
|
+
<label>What's on your mind?</label>
|
|
104
|
+
<md-textarea v-on:keyup.enter.exact="sendPost()"
|
|
105
|
+
v-model="post.content"
|
|
106
|
+
md-autogrow>
|
|
107
|
+
</md-textarea>
|
|
108
|
+
<md-button class="md-icon-button" @click="sendPost()">
|
|
109
|
+
<md-icon md-size="small">send</md-icon>
|
|
110
|
+
</md-button>
|
|
111
|
+
</md-field>
|
|
112
|
+
<md-field id="media_upload">
|
|
113
|
+
<label>Add media</label>
|
|
114
|
+
<md-file ref="attachments" v-model="attachments" multiple />
|
|
115
|
+
</md-field>
|
|
116
|
+
</md-card-content>
|
|
117
|
+
</md-card>
|
|
118
|
+
`,
|
|
119
|
+
watch: {
|
|
120
|
+
},
|
|
121
|
+
components: {
|
|
122
|
+
},
|
|
123
|
+
methods: {
|
|
124
|
+
async loadPage() {
|
|
125
|
+
},
|
|
126
|
+
async scrollBottom () {
|
|
127
|
+
if (Math.ceil(window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
|
128
|
+
console.log(this.post);
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
async sendPost() {
|
|
132
|
+
console.log(this.post);
|
|
133
|
+
console.log(this)
|
|
134
|
+
if (this.inReplyTo != null) {
|
|
135
|
+
this.post.inReplyTo = this.inReplyTo;
|
|
136
|
+
}
|
|
137
|
+
if (this.entity != null) {
|
|
138
|
+
this.post.context = this.entity;
|
|
139
|
+
}
|
|
140
|
+
let now = new Date();
|
|
141
|
+
this.post.published = now.toISOString();
|
|
142
|
+
|
|
143
|
+
let attachments = this.$refs.attachments.$refs.inputFile.files;
|
|
144
|
+
let old_id = this.id;
|
|
145
|
+
let post = this.post;
|
|
146
|
+
|
|
147
|
+
this.id = crypto.randomUUID();
|
|
148
|
+
this.uri = `${LOD_PREFIX}/note/${this.id}`;
|
|
149
|
+
this.post = newPost(this.uri);
|
|
150
|
+
this.attachments = null;
|
|
151
|
+
|
|
152
|
+
if (attachments.length >0) {
|
|
153
|
+
const collectionURI = `${LOD_PREFIX}/media/${old_id}`;
|
|
154
|
+
console.log(collectionURI);
|
|
155
|
+
post.attachment = await uploadFiles(attachments,
|
|
156
|
+
collectionURI);
|
|
157
|
+
}
|
|
158
|
+
console.log(post);
|
|
159
|
+
let metadata = JSON.stringify(post);
|
|
160
|
+
const baseUrl = `${window.location.origin}/pub`;
|
|
161
|
+
|
|
162
|
+
await axios.post( baseUrl, metadata, {
|
|
163
|
+
headers: {
|
|
164
|
+
'Content-Type': 'application/ld+json'
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
if (this.inReplyTo == null) {
|
|
169
|
+
window.location.href = `${window.location.origin}/about?uri=${post.id}`;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
async mounted (){
|
|
174
|
+
|
|
175
|
+
},
|
|
176
|
+
async unmounted() {
|
|
177
|
+
},
|
|
178
|
+
created(){
|
|
179
|
+
}
|
|
180
|
+
})
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import dayjs from '//unpkg.com/dayjs@1.11.13/esm';
|
|
2
|
+
import relativeTime from '//unpkg.com/dayjs@1.11.13/esm/plugin/relativeTime';
|
|
3
|
+
dayjs.extend(relativeTime);
|
|
4
|
+
import {Vue, axios, createApp} from '../../../dist/whyis.js';
|
|
5
|
+
export default Vue.component('fedi-post', {
|
|
6
|
+
name: "fedi-post",
|
|
7
|
+
props:{
|
|
8
|
+
value: {
|
|
9
|
+
type: Object,
|
|
10
|
+
require: true
|
|
11
|
+
},
|
|
12
|
+
expanded: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
data() {
|
|
18
|
+
return {
|
|
19
|
+
replies: [],
|
|
20
|
+
loading: false,
|
|
21
|
+
loadError: false,
|
|
22
|
+
otherArgs: null,
|
|
23
|
+
pageSize: 20,
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
template: `
|
|
27
|
+
<md-card>
|
|
28
|
+
<md-card-header>
|
|
29
|
+
<md-card-header-text>
|
|
30
|
+
<div class="md-subhead">
|
|
31
|
+
<a :href="value.attributedTo.id">
|
|
32
|
+
<md-avatar class="md-avatar-icon">{{value.attributedTo.name[0]}}</md-avatar>
|
|
33
|
+
<strong>{{value.attributedTo.name}}</strong> <small>(@{{value.attributedTo.id.split('/').pop()}})</small>
|
|
34
|
+
</a>
|
|
35
|
+
<br/>
|
|
36
|
+
<small><a :href="value.id">{{published}}</a></small>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="md-title" v-if="value.name"><a :href="value.id">{{value.name}}</a></div>
|
|
39
|
+
</md-card-header-text>
|
|
40
|
+
</md-card-header>
|
|
41
|
+
<md-card-content v-html="value.content"></md-card-content>
|
|
42
|
+
<md-card-media v-if="value.attachment != null && value.attachment.length != 0">
|
|
43
|
+
<img v-for="image in value.attachment" :src="image.url" :alt="image.url">
|
|
44
|
+
</md-card-media>
|
|
45
|
+
</md-card>
|
|
46
|
+
`,
|
|
47
|
+
watch: {
|
|
48
|
+
},
|
|
49
|
+
components: {
|
|
50
|
+
},
|
|
51
|
+
computed: {
|
|
52
|
+
published: function() {
|
|
53
|
+
return dayjs(this.value.published).fromNow();
|
|
54
|
+
},
|
|
55
|
+
// a computed getter
|
|
56
|
+
images: function () {
|
|
57
|
+
console.log(this.value.attachment);
|
|
58
|
+
// `this` points to the vm instance
|
|
59
|
+
let result = this.value.attachment.filter(function(x) {x.type.indexOf('Image') >= 0});
|
|
60
|
+
console.log(result);
|
|
61
|
+
return result;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
async loadPage() {
|
|
66
|
+
// non-page sized results means we've reached the end.
|
|
67
|
+
if (this.results.length % this.pageSize > 0)
|
|
68
|
+
return
|
|
69
|
+
const result = await axios.get(`${ROOT_URL}about`,
|
|
70
|
+
{ params: {
|
|
71
|
+
view: "comments",
|
|
72
|
+
uri: this.entity,
|
|
73
|
+
limit: this.pageSize,
|
|
74
|
+
offset: this.results.length
|
|
75
|
+
}
|
|
76
|
+
})
|
|
77
|
+
this.results.push(...result.data)
|
|
78
|
+
},
|
|
79
|
+
async scrollBottom () {
|
|
80
|
+
if (Math.ceil(window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
|
81
|
+
await this.loadPage()
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
async mounted (){
|
|
86
|
+
},
|
|
87
|
+
async unmounted() {
|
|
88
|
+
},
|
|
89
|
+
created(){
|
|
90
|
+
}
|
|
91
|
+
})
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {Vue, axios, createApp} from '../../../dist/whyis.js';
|
|
2
|
+
import post from './post.js';
|
|
3
|
+
import comment from './comment.js';
|
|
4
|
+
import newPost from './new_post.js';
|
|
5
|
+
|
|
6
|
+
export default Vue.component('fedi-post-view', {
|
|
7
|
+
name: "fedi-post-view",
|
|
8
|
+
props:{
|
|
9
|
+
object: {
|
|
10
|
+
type: String,
|
|
11
|
+
require: true
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
post: null,
|
|
17
|
+
replies: null,
|
|
18
|
+
loading: false,
|
|
19
|
+
loadError: false,
|
|
20
|
+
otherArgs: null,
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
template: `
|
|
24
|
+
<div>
|
|
25
|
+
<spinner :loading="loading" text='Loading...' v-if="loading"/>
|
|
26
|
+
<div v-else class="md-layout md-gutter">
|
|
27
|
+
<div class="md-layout-item md-scrollbar">
|
|
28
|
+
<fedi-post v-if="post != null"
|
|
29
|
+
v-bind:value="post">
|
|
30
|
+
</fedi-post>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="md-layout-item md-scrollbar">
|
|
33
|
+
<div>
|
|
34
|
+
<md-empty-state
|
|
35
|
+
v-if="replies == null || replies.length == 0"
|
|
36
|
+
md-icon="forum"
|
|
37
|
+
md-label="Reply to this thread"
|
|
38
|
+
md-description="Reply below to continue this conversation.">
|
|
39
|
+
</md-empty-state>
|
|
40
|
+
<fedi-comment v-else
|
|
41
|
+
v-for="reply in replies"
|
|
42
|
+
:key="reply.id"
|
|
43
|
+
v-bind:value="reply">
|
|
44
|
+
</fedi-comment>
|
|
45
|
+
</div>
|
|
46
|
+
<fedi-new-post v-if="post != null"
|
|
47
|
+
:inReplyTo="post.id"
|
|
48
|
+
:entity="post.context">
|
|
49
|
+
</fedi-new-post>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>`,
|
|
53
|
+
watch: {
|
|
54
|
+
},
|
|
55
|
+
components: {
|
|
56
|
+
},
|
|
57
|
+
methods: {
|
|
58
|
+
async scrollBottom () {
|
|
59
|
+
// if (Math.ceil(window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
|
|
60
|
+
// await this.loadPage()
|
|
61
|
+
// }
|
|
62
|
+
},
|
|
63
|
+
async loadPost() {
|
|
64
|
+
let response = await axios.get(`${ROOT_URL}about`,
|
|
65
|
+
{
|
|
66
|
+
params: {
|
|
67
|
+
view: "data",
|
|
68
|
+
uri: this.object
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
console.log(response.data);
|
|
72
|
+
this.post = response.data;
|
|
73
|
+
},
|
|
74
|
+
async loadReplies() {
|
|
75
|
+
let response = await axios.get(`${ROOT_URL}about`,
|
|
76
|
+
{
|
|
77
|
+
params: {
|
|
78
|
+
view: "replies",
|
|
79
|
+
uri: this.object
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
this.replies = response.data;
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
async mounted (){
|
|
86
|
+
this.loading = true
|
|
87
|
+
await Promise.all([this.loadPost(), this.loadReplies()])
|
|
88
|
+
this.loading = false
|
|
89
|
+
this.pollInterval = setInterval(this.loadReplies, 2000)
|
|
90
|
+
},
|
|
91
|
+
async unmounted() {
|
|
92
|
+
window.removeEventListener("scroll", this.scrollBottom)
|
|
93
|
+
}
|
|
94
|
+
})
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{% set context_query = '
|
|
2
|
+
PREFIX astr: <https://www.w3.org/ns/activitystreams#>
|
|
3
|
+
|
|
4
|
+
select distinct ?object where {
|
|
5
|
+
values ?type {
|
|
6
|
+
astr:Object
|
|
7
|
+
astr:Article
|
|
8
|
+
astr:Audio
|
|
9
|
+
astr:Document
|
|
10
|
+
astr:Event
|
|
11
|
+
astr:Image
|
|
12
|
+
astr:Note
|
|
13
|
+
astr:Page
|
|
14
|
+
astr:Place
|
|
15
|
+
astr:Profile
|
|
16
|
+
astr:Relationship
|
|
17
|
+
astr:Tombstone
|
|
18
|
+
astr:Video
|
|
19
|
+
}
|
|
20
|
+
?object a ?type;
|
|
21
|
+
astr:published ?published.
|
|
22
|
+
|
|
23
|
+
minus { ?object astr:inReplyTo []}
|
|
24
|
+
} order by desc (?published) ' -%}
|
|
25
|
+
[
|
|
26
|
+
{% for row in context_query | query(limit=args.get('limit', 100),
|
|
27
|
+
offset=args.get('offset',0)) -%}
|
|
28
|
+
{{row['object'] | include('data') | safe }}{% if not loop.last %}, {% endif %}
|
|
29
|
+
{%- endfor %}
|
|
30
|
+
]
|
|
31
|
+
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{% extends "base_vue.html" %}
|
|
2
|
+
{% from "elements/upload.html" import vue_upload_button_tab_modal %}
|
|
3
|
+
{% from "_macros.html" import render_resource_link, render_rdfa_resource_link, get_label, facts_panel, summary_panel, content %}
|
|
4
|
+
{% block title %}{{get_label(this.description())}}{% endblock %}
|
|
5
|
+
{% block scripts %}
|
|
6
|
+
<script type="module" src="{{ url_for('static',filename='plugins/fediverse/js/discussion.js')}}"></script>
|
|
7
|
+
|
|
8
|
+
{% endblock %}
|
|
9
|
+
{% block content %}
|
|
10
|
+
{% set attributes = this | include("attributes") | fromjson %}
|
|
11
|
+
|
|
12
|
+
<md-card-header>
|
|
13
|
+
<md-card-header-text>
|
|
14
|
+
<ul class="nav nav-tabs">
|
|
15
|
+
{% for v in this | get_views_list -%}
|
|
16
|
+
<li class="nav-item {% if v['view'].value == view %}active{% endif %}">
|
|
17
|
+
<a class="nav-link {% if v['view'].value == view %}active{% endif %}"
|
|
18
|
+
href="{{url_for('entity.view', uri=this.identifier, view=v['view'])}}">
|
|
19
|
+
{{v['label']}}
|
|
20
|
+
</a>
|
|
21
|
+
</li>
|
|
22
|
+
{%- endfor %}
|
|
23
|
+
{% if this.description().value(ns.whyis.hasFileID) %}
|
|
24
|
+
<li class="nav-item">
|
|
25
|
+
<a class="nav-link"
|
|
26
|
+
href="{{url_for('entity.view',uri=this.identifier)}}">
|
|
27
|
+
Download
|
|
28
|
+
</a>
|
|
29
|
+
</li>
|
|
30
|
+
{% endif %}
|
|
31
|
+
<li class="nav-item">
|
|
32
|
+
{{ vue_upload_button_tab_modal(this) }}
|
|
33
|
+
</li>
|
|
34
|
+
{% if not this.identifier.startswith(ns.local) %}
|
|
35
|
+
<li class="nav-item">
|
|
36
|
+
<a class="nav-link" href="{{this.identifier}}"
|
|
37
|
+
aria-label="Visit Page" title="Visit Page">
|
|
38
|
+
Visit
|
|
39
|
+
</a>
|
|
40
|
+
</li>
|
|
41
|
+
{% endif %}
|
|
42
|
+
</ul>
|
|
43
|
+
<div class="md-layout md-gutter md-alignment-center-left" style = "margin-top: 6px;">
|
|
44
|
+
<div class = "md-layout-item">
|
|
45
|
+
<div class="md-title">{{attributes.label}}</div>
|
|
46
|
+
{% if attributes.type | length > 0 %}<div class="md-subhead" style="max-width: fit-content;">
|
|
47
|
+
{% for type in attributes.type %}{{type.label}}{% if not loop.last %}, {% endif %} {% endfor %}
|
|
48
|
+
</div>{% endif %}
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</md-card-header-text>
|
|
52
|
+
{% if attributes.thumbnail %}<md-card-media md-big >
|
|
53
|
+
<img src="{{url_for('entity.view', uri=attributes.thumbnail)}}" alt="{{attributes.label}}"/>
|
|
54
|
+
</md-card-media>{% endif %}
|
|
55
|
+
</md-card-header>
|
|
56
|
+
<md-card-content>
|
|
57
|
+
<div class="md-layout md-gutter">
|
|
58
|
+
<div class="md-layout-item">
|
|
59
|
+
<fedi-discussion entity="{{this.identifier}}"></fedi-discussion>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</md-card-content>
|
|
63
|
+
{% endblock %}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{% set context_query = '
|
|
2
|
+
PREFIX astr: <https://www.w3.org/ns/activitystreams#>
|
|
3
|
+
select distinct ?object where {
|
|
4
|
+
values ?type {
|
|
5
|
+
astr:Object
|
|
6
|
+
astr:Article
|
|
7
|
+
astr:Audio
|
|
8
|
+
astr:Document
|
|
9
|
+
astr:Event
|
|
10
|
+
astr:Image
|
|
11
|
+
astr:Note
|
|
12
|
+
astr:Page
|
|
13
|
+
astr:Place
|
|
14
|
+
astr:Profile
|
|
15
|
+
astr:Relationship
|
|
16
|
+
astr:Tombstone
|
|
17
|
+
astr:Video
|
|
18
|
+
}
|
|
19
|
+
?object astr:context ?entity.
|
|
20
|
+
?object a ?type;
|
|
21
|
+
astr:published ?published.
|
|
22
|
+
|
|
23
|
+
minus { ?object astr:inReplyTo []}
|
|
24
|
+
} order by desc (?published) ' -%}
|
|
25
|
+
[
|
|
26
|
+
{% for obj in context_query | query(values={"entity":this.identifier},
|
|
27
|
+
limit=args.get('limit', 100),
|
|
28
|
+
offset=args.get('offset',0)) %}
|
|
29
|
+
{{row['object'] | include('data') | safe }}{% if not loop.last %}, {% endif %}
|
|
30
|
+
{%- endfor %}
|
|
31
|
+
]
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{% macro object(element, context=False) %}
|
|
2
|
+
{
|
|
3
|
+
{%- if context %}"@context" : "https://www.w3.org/ns/activitystreams",{% endif %}
|
|
4
|
+
"type" : [
|
|
5
|
+
{%- for t in element[app.NS.RDF.type] -%}
|
|
6
|
+
"{{t.identifier.replace(app.NS.astr,'')}}"{% if not loop.last %}, {% endif %}
|
|
7
|
+
{%- endfor -%}
|
|
8
|
+
],
|
|
9
|
+
{%- if element.value(app.NS.astr.attributedTo) %}
|
|
10
|
+
"attributedTo" : {{object(element.value(app.NS.astr.attributedTo))}},
|
|
11
|
+
{%- endif %}
|
|
12
|
+
{%- if element.value(app.NS.astr.to) %}
|
|
13
|
+
"to" : [
|
|
14
|
+
{% for o in element[app.NS.astr.to] -%}
|
|
15
|
+
{{object(o)}}{% if not loop.last %}, {% endif %}
|
|
16
|
+
{%- endfor %}
|
|
17
|
+
],
|
|
18
|
+
{%- endif %}
|
|
19
|
+
{%- if element.value(app.NS.astr.attachment) %}
|
|
20
|
+
"attachment" : [
|
|
21
|
+
{% for o in element[app.NS.astr.attachment] -%}
|
|
22
|
+
{{object(o)}}{% if not loop.last %}, {% endif %}
|
|
23
|
+
{%- endfor %}
|
|
24
|
+
],
|
|
25
|
+
{%- endif %}
|
|
26
|
+
"replies" : [
|
|
27
|
+
{% for o in app.db.subjects(app.NS.astr.inReplyTo, element.identifier) -%}
|
|
28
|
+
"{{o}}"{% if not loop.last %}, {% endif %}
|
|
29
|
+
{%- endfor %}
|
|
30
|
+
],
|
|
31
|
+
{% for o in app.db.subjects(app.NS.astr.object, element.identifier) -%}
|
|
32
|
+
{% if not loop.first %}"reactions" : [{%endif%}
|
|
33
|
+
{{object(app.db.resource(o))}}{% if not loop.last %}, {% endif %}
|
|
34
|
+
{% if not loop.first %}],{% endif %}
|
|
35
|
+
{%- endfor %}
|
|
36
|
+
{%- if element.value(app.NS.astr.content) %}
|
|
37
|
+
"content" : {{element.value(app.NS.astr.content).value|markdown|tojson |safe}},
|
|
38
|
+
{%- endif %}
|
|
39
|
+
{%- if element.value(app.NS.astr.summary) %}
|
|
40
|
+
"summary" : "{{element.value(app.NS.astr.summary).value }}",
|
|
41
|
+
{%- endif %}
|
|
42
|
+
{%- if element.value(ns.whyis.hasFileID) %}
|
|
43
|
+
"url" : "{{url_for('entity.view',uri=element.identifier)}}",
|
|
44
|
+
{%- else %}
|
|
45
|
+
"url" : "{{element.identifier }}",
|
|
46
|
+
{%- endif %}
|
|
47
|
+
{%- if element.value(app.NS.astr.actor) %}
|
|
48
|
+
"actor" : "{{element.value(app.NS.astr.actor).identifier }}",
|
|
49
|
+
{%- endif %}
|
|
50
|
+
{%- if element.value(app.NS.astr.object) %}
|
|
51
|
+
"object" : "{{element.value(app.NS.astr.object).identifier }}",
|
|
52
|
+
{%- endif %}
|
|
53
|
+
{%- if element.value(app.NS.astr.context) %}
|
|
54
|
+
"context" : "{{element.value(app.NS.astr.context).identifier }}",
|
|
55
|
+
{%- endif %}
|
|
56
|
+
{%- if element.value(app.NS.astr.inReplyTo) %}
|
|
57
|
+
"inReplyTo" : "{{element.value(app.NS.astr.inReplyTo).identifier }}",
|
|
58
|
+
{%- endif %}
|
|
59
|
+
{%- if element.value(app.NS.astr.mediaType) %}
|
|
60
|
+
"mediaType" : "{{element.value(app.NS.astr.mediaType).value }}",
|
|
61
|
+
{%- endif %}
|
|
62
|
+
{%- if element.value(app.NS.astr.published) %}
|
|
63
|
+
"published" : "{{element.value(app.NS.astr.published).value }}",
|
|
64
|
+
{%- endif %}
|
|
65
|
+
{%- if element.value(app.NS.astr.name) %}
|
|
66
|
+
"name" : "{{element.value(app.NS.astr.name).value }}",
|
|
67
|
+
{%- endif %}
|
|
68
|
+
"id" : "{{element.identifier}}"
|
|
69
|
+
}
|
|
70
|
+
{%- endmacro -%}
|
|
71
|
+
{{object(this, True)}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{% set context_query = '
|
|
2
|
+
PREFIX astr: <https://www.w3.org/ns/activitystreams#>
|
|
3
|
+
select distinct ?reply where {
|
|
4
|
+
?reply astr:inReplyTo+ ?post.
|
|
5
|
+
?reply astr:published ?published.
|
|
6
|
+
} order by (?published) ' -%}
|
|
7
|
+
[
|
|
8
|
+
{% for row in context_query | query(values={"post":this.identifier}) %}
|
|
9
|
+
{{row['reply'] | include('data') | safe }}{% if not loop.last %}, {% endif %}
|
|
10
|
+
{%- endfor %}
|
|
11
|
+
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{% extends "base_vue.html" %}
|
|
2
|
+
{% from "elements/upload.html" import vue_upload_button_tab_modal %}
|
|
3
|
+
{% from "_macros.html" import render_resource_link, render_rdfa_resource_link, get_label, facts_panel, summary_panel, content %}
|
|
4
|
+
{% block title %}{% endblock %}
|
|
5
|
+
{% block scripts %}
|
|
6
|
+
<script type="module" src="{{url_for('static',filename='plugins/fediverse/js/post_view.js')}}"></script>
|
|
7
|
+
{% endblock %}
|
|
8
|
+
{% block content %}
|
|
9
|
+
<md-card-content>
|
|
10
|
+
<div class="md-layout md-gutter">
|
|
11
|
+
<div class="md-layout-item">
|
|
12
|
+
<fedi-post-view object="{{this.identifier}}"></fedi-post-view>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</md-card-content>
|
|
16
|
+
{% endblock %}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
## Metamodeling prefixes (models that describe models):
|
|
2
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
5
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
6
|
+
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
|
7
|
+
|
|
8
|
+
# The Knowledge Graph Map Ontology (KGMO) is a novel way to note relationships
|
|
9
|
+
# observationally and inductively and without triggering OWL semantics.
|
|
10
|
+
# Publication venue and date TBD.
|
|
11
|
+
@prefix kgmo: <http://purl.org/twc/kgmo/>.
|
|
12
|
+
|
|
13
|
+
## Whyis support prefixes:
|
|
14
|
+
@prefix np: <http://www.nanopub.org/nschema#>.
|
|
15
|
+
@prefix whyis: <http://vocab.rpi.edu/whyis/> .
|
|
16
|
+
@prefix prov: <http://www.w3.org/ns/prov#>.
|
|
17
|
+
@prefix mediatype: <https://www.iana.org/assignments/media-types/>.
|
|
18
|
+
@prefix dcterms: <http://purl.org/dc/terms/>.
|
|
19
|
+
# For pv:File:
|
|
20
|
+
@prefix pv: <http://purl.org/net/provenance/ns#>.
|
|
21
|
+
# For ov:hasContentType:
|
|
22
|
+
@prefix ov: <http://open.vocab.org/terms/> .
|
|
23
|
+
|
|
24
|
+
## Media-specifc prefixes:
|
|
25
|
+
# Note that ActivityStreams supercedes schema.org when available.
|
|
26
|
+
# properties for the as: namespace are recorded here:
|
|
27
|
+
# https://www.w3.org/TR/activitystreams-vocabulary
|
|
28
|
+
@prefix as: <https://www.w3.org/ns/activitystreams#> .
|
|
29
|
+
@prefix schema: <http://schema.org/> .
|
|
30
|
+
|
|
31
|
+
## Domain prefixes:
|
|
32
|
+
# Wikidata is for instances and classes:
|
|
33
|
+
@prefix wd: <http://www.wikidata.org/entity/> .
|
|
34
|
+
# SIO is for relationships between instances:
|
|
35
|
+
@prefix sio: <htttp://semanticscience.org/resource/>.
|
|
36
|
+
|
|
37
|
+
## ARCLIGHT-specific prefixes:
|
|
38
|
+
@prefix file: <http://purl.org/arclight/file/> .
|
|
39
|
+
@prefix user: <http://purl.org/whyis/local/user/> .
|
|
40
|
+
@prefix action: <http://purl.org/arclight/action/> .
|
|
41
|
+
@prefix entity: <http://purl.org/arclight/entity/> .
|
|
42
|
+
@prefix tool: <http://purl.org/arclight/tool/> .
|
|
43
|
+
@prefix image: <http://purl.org/arclight/image/> .
|
|
44
|
+
@prefix exif: <http://purl.org/arclight/exif/> .
|
|
45
|
+
|
|
46
|
+
# Ontology terms for things like models and activities.
|
|
47
|
+
@prefix ao: <http://purl.org/arclight/ontology/> .
|
|
48
|
+
|
|
49
|
+
# Nanopublication URIs live here:
|
|
50
|
+
@prefix pub: <http://purl.org/whyis/local/pub/> .
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
pub:test1 {
|
|
54
|
+
pub:test1 a np:Nanopublication;
|
|
55
|
+
np:hasAssertion pub:test1_assertion;
|
|
56
|
+
np:hasProvenance pub:test1_provenance;
|
|
57
|
+
np:hasPublicationInfo pub:test1_pubinfo.
|
|
58
|
+
|
|
59
|
+
pub:test1_assertion a np:Assertion.
|
|
60
|
+
pub:test1_provenance a np:Provenance.
|
|
61
|
+
pub:test1_pubinfo a np:PublicationInfo.
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
pub:test1_assertion {
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
pub:test1_pubinfo {
|
|
69
|
+
|
|
70
|
+
pub:test1 a as:Note.
|
|
71
|
+
|
|
72
|
+
pub:test1 as:content "Hello, World!!".
|
|
73
|
+
|
|
74
|
+
pub:test1
|
|
75
|
+
as:attributedTo user:mccusj2;
|
|
76
|
+
as:published "2023-10-30-21T12:34:56Z"^^xsd:dateTime.
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# Note that this would actually be recorded in a user profile,
|
|
80
|
+
# we don't need to repeat any of this in individual pubs.
|
|
81
|
+
user:mccusj2 a as:Person ;
|
|
82
|
+
as:name "Jamie McCusker" .
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
pub:test2 {
|
|
86
|
+
pub:test2 a np:Nanopublication;
|
|
87
|
+
np:hasAssertion pub:test2_assertion;
|
|
88
|
+
np:hasProvenance pub:test2_provenance;
|
|
89
|
+
np:hasPublicationInfo pub:test2_pubinfo.
|
|
90
|
+
|
|
91
|
+
pub:test2_assertion a np:Assertion.
|
|
92
|
+
pub:test2_provenance a np:Provenance.
|
|
93
|
+
pub:test2_pubinfo a np:PublicationInfo.
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
pub:test2_assertion {
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
pub:test2_pubinfo {
|
|
101
|
+
|
|
102
|
+
pub:test2 a as:Note.
|
|
103
|
+
|
|
104
|
+
pub:test2 as:content "And another thing!".
|
|
105
|
+
|
|
106
|
+
pub:test2
|
|
107
|
+
as:attributedTo user:mccusj2;
|
|
108
|
+
as:published "2024-06-30-21T12:34:56Z"^^xsd:dateTime.
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
# Note that this would actually be recorded in a user profile,
|
|
112
|
+
# we don't need to repeat any of this in individual pubs.
|
|
113
|
+
user:mccusj2 a as:Person ;
|
|
114
|
+
as:name "Jamie McCusker" .
|
|
115
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
## Metamodeling prefixes (models that describe models):
|
|
2
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
3
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
4
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
5
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
6
|
+
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
|
7
|
+
|
|
8
|
+
# The Knowledge Graph Map Ontology (KGMO) is a novel way to note relationships
|
|
9
|
+
# observationally and inductively and without triggering OWL semantics.
|
|
10
|
+
# Publication venue and date TBD.
|
|
11
|
+
@prefix kgmo: <http://purl.org/twc/kgmo/>.
|
|
12
|
+
|
|
13
|
+
## Whyis support prefixes:
|
|
14
|
+
@prefix np: <http://www.nanopub.org/nschema#>.
|
|
15
|
+
@prefix whyis: <http://vocab.rpi.edu/whyis/> .
|
|
16
|
+
@prefix prov: <http://www.w3.org/ns/prov#>.
|
|
17
|
+
@prefix mediatype: <https://www.iana.org/assignments/media-types/>.
|
|
18
|
+
@prefix dcterms: <http://purl.org/dc/terms/>.
|
|
19
|
+
# For pv:File:
|
|
20
|
+
@prefix pv: <http://purl.org/net/provenance/ns#>.
|
|
21
|
+
# For ov:hasContentType:
|
|
22
|
+
@prefix ov: <http://open.vocab.org/terms/> .
|
|
23
|
+
|
|
24
|
+
## Media-specifc prefixes:
|
|
25
|
+
# Note that ActivityStreams supercedes schema.org when available.
|
|
26
|
+
# properties for the as: namespace are recorded here:
|
|
27
|
+
# https://www.w3.org/TR/activitystreams-vocabulary
|
|
28
|
+
@prefix as: <https://www.w3.org/ns/activitystreams#> .
|
|
29
|
+
@prefix schema: <http://schema.org/> .
|
|
30
|
+
|
|
31
|
+
## Domain prefixes:
|
|
32
|
+
# Wikidata is for instances and classes:
|
|
33
|
+
@prefix wd: <http://www.wikidata.org/entity/> .
|
|
34
|
+
# SIO is for relationships between instances:
|
|
35
|
+
@prefix sio: <htttp://semanticscience.org/resource/>.
|
|
36
|
+
|
|
37
|
+
## ARCLIGHT-specific prefixes:
|
|
38
|
+
@prefix file: <http://purl.org/arclight/file/> .
|
|
39
|
+
@prefix user: <http://purl.org/whyis/local/user/> .
|
|
40
|
+
@prefix action: <http://purl.org/arclight/action/> .
|
|
41
|
+
@prefix entity: <http://purl.org/arclight/entity/> .
|
|
42
|
+
@prefix tool: <http://purl.org/arclight/tool/> .
|
|
43
|
+
@prefix image: <http://purl.org/arclight/image/> .
|
|
44
|
+
@prefix exif: <http://purl.org/arclight/exif/> .
|
|
45
|
+
|
|
46
|
+
# Ontology terms for things like models and activities.
|
|
47
|
+
@prefix ao: <http://purl.org/arclight/ontology/> .
|
|
48
|
+
|
|
49
|
+
# Nanopublication URIs live here:
|
|
50
|
+
@prefix pub: <http://purl.org/whyis/local/pub/> .
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
pub:test1_head {
|
|
54
|
+
pub:test1 a np:Nanopublication;
|
|
55
|
+
np:hasAssertion pub:test1_assertion;
|
|
56
|
+
np:hasProvenance pub:test1_provenance;
|
|
57
|
+
np:hasPublicationInfo pub:test1_pubinfo.
|
|
58
|
+
|
|
59
|
+
pub:test1_assertion a np:Assertion.
|
|
60
|
+
pub:test1_provenance a np:Provenance.
|
|
61
|
+
pub:test1_pubinfo a np:PublicationInfo.
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
pub:test1_assertion {
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
pub:test1_pubinfo {
|
|
69
|
+
|
|
70
|
+
pub:test1 a as:Note.
|
|
71
|
+
|
|
72
|
+
pub:test1 as:content "Hello, World!!".
|
|
73
|
+
|
|
74
|
+
pub:test1
|
|
75
|
+
as:attributedTo user:mccusj2;
|
|
76
|
+
as:published "2023-10-30-21T12:34:56Z"^^xsd:dateTime.
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# Note that this would actually be recorded in a user profile,
|
|
80
|
+
# we don't need to repeat any of this in individual pubs.
|
|
81
|
+
user:mccusj2 a as:Person ;
|
|
82
|
+
as:name "Jamie McCusker" .
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
pub:test2_head {
|
|
86
|
+
pub:test2 a np:Nanopublication;
|
|
87
|
+
np:hasAssertion pub:test2_assertion;
|
|
88
|
+
np:hasProvenance pub:test2_provenance;
|
|
89
|
+
np:hasPublicationInfo pub:test2_pubinfo.
|
|
90
|
+
|
|
91
|
+
pub:test2_assertion a np:Assertion.
|
|
92
|
+
pub:test2_provenance a np:Provenance.
|
|
93
|
+
pub:test2_pubinfo a np:PublicationInfo.
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
pub:test2_assertion {
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
pub:test2_pubinfo {
|
|
101
|
+
|
|
102
|
+
pub:test2 a as:Note.
|
|
103
|
+
|
|
104
|
+
pub:test2 as:content "And another thing!".
|
|
105
|
+
|
|
106
|
+
pub:test2
|
|
107
|
+
as:attributedTo user:mccusj2;
|
|
108
|
+
as:published "2024-06-30-21T12:34:56Z"^^xsd:dateTime.
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
# Note that this would actually be recorded in a user profile,
|
|
112
|
+
# we don't need to repeat any of this in individual pubs.
|
|
113
|
+
user:mccusj2 a as:Person ;
|
|
114
|
+
as:name "Jamie McCusker" .
|
|
115
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
@prefix : <http://vocab.rpi.edu/whyis/> .
|
|
2
|
+
@prefix dc: <http://purl.org/dc/terms/> .
|
|
3
|
+
@prefix np: <http://www.nanopub.org/nschema#> .
|
|
4
|
+
@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
5
|
+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
6
|
+
@prefix sio: <http://semanticscience.org/resource/> .
|
|
7
|
+
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
|
|
8
|
+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
9
|
+
@prefix auth: <http://vocab.tw.rpi.edu/auth/> .
|
|
10
|
+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
11
|
+
@prefix prov: <http://www.w3.org/ns/prov#> .
|
|
12
|
+
@prefix rdfg: <http://www.w3.org/2004/03/trix/rdfg-1/> .
|
|
13
|
+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
14
|
+
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
|
15
|
+
@prefix flaskld: <http://vocab.rpi.edu/flaskld/> .
|
|
16
|
+
@prefix whyis: <http://vocab.rpi.edu/whyis/> .
|
|
17
|
+
@prefix bibo: <http://purl.org/ontology/bibo/> .
|
|
18
|
+
@prefix dcat: <http://www.w3.org/ns/dcat#> .
|
|
19
|
+
@prefix sdd: <http://purl.org/twc/sdd/> .
|
|
20
|
+
@prefix mediatype: <https://www.iana.org/assignments/media-types/>.
|
|
21
|
+
|
|
22
|
+
@prefix as: <https://www.w3.org/ns/activitystreams#>.
|
|
23
|
+
|
|
24
|
+
whyis:discussion dc:identifier "discussion";
|
|
25
|
+
rdfs:subPropertyOf whyis:hasView.
|
|
26
|
+
|
|
27
|
+
whyis:comments dc:identifier "comments";
|
|
28
|
+
rdfs:subPropertyOf whyis:hasView.
|
|
29
|
+
|
|
30
|
+
whyis:hasData dc:identifier "data";
|
|
31
|
+
rdfs:subPropertyOf whyis:hasView.
|
|
32
|
+
|
|
33
|
+
whyis:hasReplies dc:identifier "replies";
|
|
34
|
+
rdfs:subPropertyOf whyis:hasView.
|
|
35
|
+
|
|
36
|
+
rdfs:Resource
|
|
37
|
+
whyis:comments "whyis_fediverse:discussion.json";
|
|
38
|
+
whyis:discussion "whyis_fediverse:discussion.html".
|
|
39
|
+
|
|
40
|
+
whyis:HomePage
|
|
41
|
+
whyis:comments "whyis_fediverse:all_discussion.json".
|
|
42
|
+
|
|
43
|
+
as:Object a owl:Class;
|
|
44
|
+
whyis:hasView "whyis_fediverse:object_view.html";
|
|
45
|
+
whyis:hasData "whyis_fediverse:object_data.json";
|
|
46
|
+
whyis:hasReplies "whyis_fediverse:object_replies.json";
|
|
47
|
+
rdfs:subClassOf rdfs:Resource.
|
|
48
|
+
|
|
49
|
+
as:Article a owl:Class;
|
|
50
|
+
rdfs:subClassOf as:Object.
|
|
51
|
+
|
|
52
|
+
as:Audio a owl:Class;
|
|
53
|
+
rdfs:subClassOf as:Object.
|
|
54
|
+
|
|
55
|
+
as:Document a owl:Class;
|
|
56
|
+
rdfs:subClassOf as:Object.
|
|
57
|
+
|
|
58
|
+
as:Event a owl:Class;
|
|
59
|
+
rdfs:subClassOf as:Object.
|
|
60
|
+
|
|
61
|
+
as:Image a owl:Class;
|
|
62
|
+
rdfs:subClassOf as:Object.
|
|
63
|
+
|
|
64
|
+
as:Note a owl:Class;
|
|
65
|
+
rdfs:subClassOf as:Object.
|
|
66
|
+
|
|
67
|
+
as:Page a owl:Class;
|
|
68
|
+
rdfs:subClassOf as:Object.
|
|
69
|
+
|
|
70
|
+
as:Place a owl:Class;
|
|
71
|
+
rdfs:subClassOf as:Object.
|
|
72
|
+
|
|
73
|
+
as:Profile a owl:Class;
|
|
74
|
+
rdfs:subClassOf as:Object.
|
|
75
|
+
|
|
76
|
+
as:Relationship a owl:Class;
|
|
77
|
+
rdfs:subClassOf as:Object.
|
|
78
|
+
|
|
79
|
+
as:Tombstone a owl:Class;
|
|
80
|
+
rdfs:subClassOf as:Object.
|
|
81
|
+
|
|
82
|
+
as:Video a owl:Class;
|
|
83
|
+
rdfs:subClassOf as:Object.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
whyis_fediverse/__init__.py,sha256=7sTTb0R55ywo-a3UnNWtrudKGhznV_bOM9XFwzOhH6M,22
|
|
2
|
+
whyis_fediverse/plugin.py,sha256=IFepgUVTRhhKNEm4-uiTJqYrEZ5HCkJ1vkc74O2mM8s,545
|
|
3
|
+
whyis_fediverse/test_example.trig,sha256=kcTQ0hmnt8bjsTBrRN58yvzTEtNT5ryrDBWoeReaUKw,3486
|
|
4
|
+
whyis_fediverse/test_example.ttl,sha256=sD79vPJcFacKMyt9rvLSBZxSRGe5Q06qeoXdHzn3XOQ,3496
|
|
5
|
+
whyis_fediverse/vocab.ttl,sha256=_QVPdPfth7cpiog2ruQRcEsWKyftvi4jyUdGTGq2lDU,2427
|
|
6
|
+
whyis_fediverse/static/js/comment.js,sha256=-Eh0cl0_eVefMX3bSSWFB39flMlRm12V4GW1i_hzTcQ,2694
|
|
7
|
+
whyis_fediverse/static/js/discussion.js,sha256=xwRPsOlTBVSjbvNOQ_3D0Xh3axY61VLZgIC2czo4KMs,2332
|
|
8
|
+
whyis_fediverse/static/js/new_post.js,sha256=epEQZE5x3Ul4pLY4waUjZ8oyqoBhz6LQA2Ps_zO5hKE,4607
|
|
9
|
+
whyis_fediverse/static/js/post.js,sha256=vRy4iNhR0wwzx69zEcrZuP17W5F_fm75pE2YPhk7w94,2973
|
|
10
|
+
whyis_fediverse/static/js/post_view.js,sha256=J8j9mmuZnvBEc4VcL2W6Lzf18B43QAdkLsKycJmJ5L4,2674
|
|
11
|
+
whyis_fediverse/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
whyis_fediverse/templates/all_discussion.json,sha256=FxZyAvGN8Lgjuda0kszhy5q0Z9U-jqgiPgpfTTlIs3U,750
|
|
13
|
+
whyis_fediverse/templates/discussion.html,sha256=8aT47Z5a667JGees1TOOq5c2cCZqam5ZsDoop2Yo1VI,2912
|
|
14
|
+
whyis_fediverse/templates/discussion.json,sha256=6BE9ENbur_eiScePyk8_6Xs4RYIDQNenpMInMiry1ww,821
|
|
15
|
+
whyis_fediverse/templates/object_data.json,sha256=BF1LwtZ6CfYyfAwI9RTy7ZDrZnRmoMYp2qrhodD5njc,2746
|
|
16
|
+
whyis_fediverse/templates/object_replies.json,sha256=W2Ch-s6Lh-yjw3tBY9KtzCMGSlezTHSuJxCLxZcx1Q0,392
|
|
17
|
+
whyis_fediverse/templates/object_view.html,sha256=9hauvUiGFmId4Y7fJRiNk7M3PhPEQGaK_IxeP7qhOcs,636
|
|
18
|
+
whyis_fediverse/templates/resource_get.json,sha256=qgKrV5c2IQGWfnv6EIXL_B3xte4UC7PQ1uv1VOO5v38,131
|
|
19
|
+
whyis_fediverse/templates/resource_search.json,sha256=BXOsOdM7rJ2MV1_7tMthXLuc_aye6Ig9_3jYXXSxiP0,230
|
|
20
|
+
whyis_fediverse/templates/space_get.json,sha256=QYxOUQjW7Asyvla-C0-Dv9mj0Tww1MdecxqUMuOH1mg,132
|
|
21
|
+
whyis_fediverse/templates/space_search.json,sha256=PMzIraMldZrb7jrCsBhJRbQ_vB76nxz24cS9Bcgx-gk,193
|
|
22
|
+
whyis_fediverse-0.1.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
23
|
+
whyis_fediverse-0.1.3.dist-info/METADATA,sha256=DlnueSpEMez-Z6AUkXuB_1OBhX-ZCIvZgQpvHH7Axug,103
|
|
24
|
+
whyis_fediverse-0.1.3.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
25
|
+
whyis_fediverse-0.1.3.dist-info/entry_points.txt,sha256=e4XLi7wxdcBNLXdbeukTWuVWuprOpYUpFUkOJe4vPdY,58
|
|
26
|
+
whyis_fediverse-0.1.3.dist-info/top_level.txt,sha256=s0dGyAZlCNhS-O-Zoqlui3FKCkMAc8VqfK3o6DLsC10,16
|
|
27
|
+
whyis_fediverse-0.1.3.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
whyis_fediverse/__init__.py,sha256=7sTTb0R55ywo-a3UnNWtrudKGhznV_bOM9XFwzOhH6M,22
|
|
2
|
-
whyis_fediverse/plugin.py,sha256=IFepgUVTRhhKNEm4-uiTJqYrEZ5HCkJ1vkc74O2mM8s,545
|
|
3
|
-
whyis_fediverse-0.1.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
4
|
-
whyis_fediverse-0.1.1.dist-info/METADATA,sha256=EzqbIGY0Swq3qOnTP6H22s1YbkVX8_LVNOkUxmE0U6E,103
|
|
5
|
-
whyis_fediverse-0.1.1.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
|
6
|
-
whyis_fediverse-0.1.1.dist-info/entry_points.txt,sha256=e4XLi7wxdcBNLXdbeukTWuVWuprOpYUpFUkOJe4vPdY,58
|
|
7
|
-
whyis_fediverse-0.1.1.dist-info/top_level.txt,sha256=s0dGyAZlCNhS-O-Zoqlui3FKCkMAc8VqfK3o6DLsC10,16
|
|
8
|
-
whyis_fediverse-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|