forked from sqlpage/SQLPage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path37_rss.sql
273 lines (269 loc) · 6.42 KB
/
37_rss.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
-- Documentation for the RSS component
INSERT INTO component (name, description, icon, introduced_in_version) VALUES (
'rss',
'Produces a data flow in the RSS format.
Can be used to generate a podcast feed.
To use this component, you must first return an HTTP header with the "application/rss+xml" content type (see http_header component). Next, you must use the shell-empty component to avoid that SQLPage generates HTML code.',
'rss',
'0.20.0'
);
INSERT INTO parameter (component,name,description,type,top_level,optional) VALUES (
'rss',
'title',
'Defines the title of the channel.',
'TEXT',
TRUE,
FALSE
),(
'rss',
'link',
'Defines the hyperlink to the channel.',
'URL',
TRUE,
FALSE
),(
'rss',
'description',
'Describes the channel.',
'TEXT',
TRUE,
FALSE
),(
'rss',
'language',
'Defines the language of the channel, specified in the ISO 639 format. For example, "en" for English, "fr" for French.',
'TEXT',
TRUE,
TRUE
),(
'rss',
'category',
'Defines the category of the channel. The value should be a string representing the category (e.g., "News", "Technology", etc.).',
'TEXT',
TRUE,
TRUE
),(
'rss',
'explicit',
'Indicates whether the channel contains explicit content. The value can be either TRUE or FALSE.',
'BOOLEAN',
TRUE,
TRUE
),(
'rss',
'image_url',
'Provides a URL linking to the artwork for the channel.',
'URL',
TRUE,
TRUE
),(
'rss',
'author',
'Defines the group, person, or people responsible for creating the channel.',
'TEXT',
TRUE,
TRUE
),(
'rss',
'copyright',
'Provides the copyright details for the channel.',
'TEXT',
TRUE,
TRUE
),(
'rss',
'self_link',
'URL of the RSS feed.',
'URL',
TRUE,
TRUE
),(
'rss',
'funding_url',
'Specifies the donation/funding links for the channel. The content of the tag is the recommended string to be used with the link.',
'URL',
TRUE,
TRUE
),(
'rss',
'type',
'Specifies the channel as either episodic or serial. The value can be either "episodic" or "serial".',
'TEXT',
TRUE,
TRUE
),(
'rss',
'complete',
'Specifies that a channel is complete and will not post any more items in the future.',
'BOOLEAN',
TRUE,
TRUE
),(
'rss',
'locked',
'Tells podcast hosting platforms whether they are allowed to import this feed.',
'BOOLEAN',
TRUE,
TRUE
),(
'rss',
'guid',
'The globally unique identifier (GUID) for a channel. The value is a UUIDv5.',
'TEXT',
TRUE,
TRUE
),(
'rss',
'title',
'Defines the title of the feed item (episode name, blog post title, etc.).',
'TEXT',
FALSE,
FALSE
),(
'rss',
'link',
'Defines the hyperlink to the item (blog post URL, etc.).',
'URL',
FALSE,
FALSE
),(
'rss',
'description',
'Describes the item',
'TEXT',
FALSE,
FALSE
),(
'rss',
'date',
'Indicates when the item was published (RFC-822 date-time).',
'TEXT',
FALSE,
TRUE
),(
'rss',
'enclosure_url',
'For podcast episodes, provides a URL linking to the audio/video episode content, in mp3, m4a, m4v, or mp4 format.',
'URL',
FALSE,
TRUE
),(
'rss',
'enclosure_length',
'The length in bytes of the audio/video episode content.',
'INTEGER',
FALSE,
TRUE
),(
'rss',
'enclosure_type',
'The MIME media type of the audio/video episode content (e.g., "audio/mpeg", "audio/m4a", "video/m4v", "video/mp4").',
'TEXT',
FALSE,
TRUE
),(
'rss',
'guid',
'The globally unique identifier (GUID) for an item.',
'TEXT',
FALSE,
TRUE
),(
'rss',
'episode',
'The chronological number that is associated with an item.',
'INTEGER',
FALSE,
TRUE
),(
'rss',
'season',
'The chronological number associated with an item''s season.',
'INTEGER',
FALSE,
TRUE
),(
'rss',
'episode_type',
'Defines the type of content for a specific item. The value can be either "full", "trailer", or "bonus".',
'TEXT',
FALSE,
TRUE
),(
'rss',
'block',
'Prevents a specific item from appearing in podcast listening applications.',
'BOOLEAN',
FALSE,
TRUE
),(
'rss',
'explicit',
'Indicates whether the item contains explicit content. The value can be either TRUE or FALSE.',
'BOOLEAN',
FALSE,
TRUE
),(
'rss',
'image_url',
'Provides a URL linking to the artwork for the item.',
'URL',
FALSE,
TRUE
),(
'rss',
'duration',
'The duration of an item in seconds.',
'INTEGER',
FALSE,
TRUE
),(
'rss',
'transcript_url',
'A link to a transcript or closed captions file for the item.',
'URL',
FALSE,
TRUE
),(
'rss',
'transcript_type',
'The type of the transcript or closed captions file for the item (e.g., "text/plain", "text/html", "text/vtt", "application/json", "application/x-subrip").',
'TEXT',
FALSE,
TRUE
);
-- Insert example(s) for the component
INSERT INTO example (component, description)
VALUES (
'rss',
'
### An RSS channel about SQLPage latest news.
```sql
select ''http_header'' as component, ''application/rss+xml'' as content_type;
select ''shell-empty'' as component;
select
''rss'' as component,
''SQLPage blog'' as title,
''https://sql-page.com/blog.sql'' as link,
''latest news about SQLpage'' as description,
''en'' as language,
''Technology'' as category,
FALSE as explicit,
''https://sql-page.com/favicon.ico'' as image_url,
''Ophir Lojkine'' as author,
''https://github.com/sponsors/lovasoa'' as funding_url,
''episodic'' as type;
select
''Hello everyone !'' as title,
''https://sql-page.com/blog.sql?post=Come%20see%20me%20build%20twitter%20live%20on%20stage%20in%20Prague'' as link,
''If some of you european SQLPagers are around Prague this december, I will be giving a talk about SQLPage at pgconf.eu on December 14th.'' as description,
''http://127.0.0.1:8080/sqlpage_introduction_video.webm'' as enclosure_url,
123456789 as enclosure_length,
''video/webm'' as enclosure_type,
''2023-12-04'' as date;
```
Once you have your rss feed ready, you can submit it to podcast directories like
[Apple Podcasts](https://podcastsconnect.apple.com/my-podcasts),
[Spotify](https://podcasters.spotify.com/),
[Google Podcasts](https://podcastsmanager.google.com/)...
');