kiosko-plugin-news 0.2.1 → 0.2.2

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.
package/README.md CHANGED
@@ -20,6 +20,12 @@ npm install --prefix ~/.config/kiosko/plugins kiosko-plugin-news
20
20
 
21
21
  - Internet access to the RSS feeds (Spanish outlets by default; any RSS/Atom feed with images works).
22
22
 
23
+ ## What it does on your machine
24
+
25
+ - **Internet**: contacts the ones you set in its options.
26
+
27
+ - Uses `weather/current` from [kiosko-plugin-weather](../kiosko-plugin-weather) when it is there.
28
+
23
29
  ## Widgets
24
30
 
25
31
  ### Headline — `news/headline`
package/dist/index.js CHANGED
@@ -934,6 +934,7 @@ import { mkdirSync, readdirSync, readFileSync, renameSync, statSync, unlinkSync,
934
934
  import { join } from "node:path";
935
935
  var MAX_IMAGE_BYTES = 12 * 1024 * 1024;
936
936
  var MIN_PHOTO = { w: 240, h: 135 };
937
+ var PHOTO_SIZE = { width: 1920, height: 1080, fit: "cover" };
937
938
  function cacheName(url) {
938
939
  return createHash("sha1").update(url).digest("hex").slice(0, 24);
939
940
  }
@@ -974,7 +975,8 @@ async function loadPhoto(dir, url, o) {
974
975
  let img = null;
975
976
  try {
976
977
  const path = await cacheImage(dir, url, o.timeoutMs, o.signal);
977
- img = await o.canvas.loadImage(readFileSync(path));
978
+ const scaled = o.canvas.loadImageScaled;
979
+ img = scaled ? await scaled(path, PHOTO_SIZE) : await o.canvas.loadImage(readFileSync(path));
978
980
  if (img.width < MIN_PHOTO.w || img.height < MIN_PHOTO.h) throw new Error(`${img.width}\xD7${img.height}, too small for a background`);
979
981
  } catch (err) {
980
982
  img = null;
@@ -1102,7 +1104,11 @@ var deck = defineSource({
1102
1104
  if (last) return { ...last, failed: harvest.failed };
1103
1105
  throw new Error(`no usable news from ${feeds.length} feeds (${harvest.failed.join(", ") || "none configured"})`);
1104
1106
  },
1105
- demo: ({ now, locale }) => demoDeck(now, locale)
1107
+ demo: ({ now, locale }) => demoDeck(now, locale),
1108
+ // The feeds that gave stories, for the widgets' outlets filter.
1109
+ choices: {
1110
+ outlets: (d) => [...new Set(d.stories.flatMap((s) => s.items.map((it) => it.source)))].sort((a, b) => a.localeCompare(b)).map((value) => ({ value }))
1111
+ }
1106
1112
  });
1107
1113
  function saveDeck(file, d, log) {
1108
1114
  try {
@@ -1124,6 +1130,7 @@ function loadDeck(file, now) {
1124
1130
  var shared = {
1125
1131
  rotateMs: t.duration({ min: 1e4, max: 36e5, default: 3e4, label: { en: "Each story for", es: "Cada noticia durante" } }),
1126
1132
  outlets: t.filter({
1133
+ choices: { source: "news/deck", list: "outlets" },
1127
1134
  label: { en: "Outlets", es: "Cabeceras" },
1128
1135
  help: {
1129
1136
  en: "Empty: all. Feed names as in the news source (El Pa\xEDs, Xataka IA\u2026), comma-separated; * matches anything, a leading ! leaves out. A story carried by several shows the version of one of these.",
@@ -1248,7 +1255,10 @@ var column = defineWidget({
1248
1255
  var index_default = definePlugin({
1249
1256
  id: "news",
1250
1257
  name: { en: "News", es: "Noticias" },
1251
- version: "0.2.1",
1258
+ version: "0.2.2",
1259
+ sdk: "^0.2.0",
1260
+ permissions: { network: ["user"] },
1261
+ optional: ["weather/current"],
1252
1262
  description: {
1253
1263
  en: "Press headlines from RSS feeds with their photos. No keys and no AI: consensus across outlets measured with plain set overlap.",
1254
1264
  es: "Titulares de prensa de los RSS con su foto. Sin claves ni IA: el consenso entre cabeceras se mide con solapamiento de t\xE9rminos."
@@ -1257,7 +1267,30 @@ var index_default = definePlugin({
1257
1267
  license: "MIT",
1258
1268
  icon: "newspaper",
1259
1269
  sources: [deck],
1260
- widgets: [headline, column]
1270
+ widgets: [headline, column],
1271
+ templates: [
1272
+ {
1273
+ id: "news",
1274
+ name: { en: "News and weather", es: "Noticias y tiempo" },
1275
+ icon: "newspaper",
1276
+ wide: [
1277
+ { x: 0, y: 0, w: 3 / 5, h: 1, widgets: ["headline"], chrome: "bare" },
1278
+ { x: 3 / 5, y: 0, w: 2 / 5, h: 1 / 2, widgets: ["weather/forecast"] },
1279
+ { x: 3 / 5, y: 1 / 2, w: 1 / 5, h: 1 / 2, widgets: [["core/clock", { showDate: true }]], chrome: "bare" },
1280
+ { x: 4 / 5, y: 1 / 2, w: 1 / 5, h: 1 / 2, widgets: ["mirror/rainmap", "mirror/earthquakes"] }
1281
+ ],
1282
+ square: [
1283
+ { x: 0, y: 0, w: 1, h: 0.65, widgets: ["column"], chrome: "bare" },
1284
+ { x: 0, y: 0.65, w: 1, h: 0.35, widgets: ["weather/forecast"] }
1285
+ ],
1286
+ tall: [
1287
+ { x: 0, y: 0, w: 1, h: 11 / 24, widgets: ["headline"], chrome: "bare" },
1288
+ { x: 0, y: 11 / 24, w: 1, h: 5 / 24, widgets: ["weather/forecast"] },
1289
+ { x: 0, y: 2 / 3, w: 1, h: 1 / 8, widgets: [["core/clock", { showDate: true }]], chrome: "bare" },
1290
+ { x: 0, y: 19 / 24, w: 1, h: 5 / 24, widgets: ["mirror/rainmap", "mirror/earthquakes"] }
1291
+ ]
1292
+ }
1293
+ ]
1261
1294
  });
1262
1295
  export {
1263
1296
  column,
Binary file
Binary file
@@ -0,0 +1,705 @@
1
+ {
2
+ "manifest": 1,
3
+ "id": "news",
4
+ "package": "kiosko-plugin-news",
5
+ "name": {
6
+ "en": "News",
7
+ "es": "Noticias"
8
+ },
9
+ "version": "0.2.2",
10
+ "description": {
11
+ "en": "Press headlines from RSS feeds with their photos. No keys and no AI: consensus across outlets measured with plain set overlap.",
12
+ "es": "Titulares de prensa de los RSS con su foto. Sin claves ni IA: el consenso entre cabeceras se mide con solapamiento de términos."
13
+ },
14
+ "author": "Kiosko",
15
+ "license": "MIT",
16
+ "homepage": "https://github.com/kiosko-lcd/kiosko-plugin-news#readme",
17
+ "repository": "https://github.com/kiosko-lcd/kiosko-plugin-news.git",
18
+ "icon": "newspaper",
19
+ "sdk": "^0.2.0",
20
+ "platforms": [
21
+ "linux",
22
+ "darwin",
23
+ "win32"
24
+ ],
25
+ "languages": [
26
+ "en",
27
+ "es"
28
+ ],
29
+ "categories": [
30
+ "info"
31
+ ],
32
+ "tags": [
33
+ "news",
34
+ "noticias",
35
+ "rss",
36
+ "press",
37
+ "prensa"
38
+ ],
39
+ "permissions": {
40
+ "network": [
41
+ "user"
42
+ ]
43
+ },
44
+ "riskyOptions": [
45
+ {
46
+ "path": "news/deck: feeds[].url",
47
+ "risk": [
48
+ "network"
49
+ ],
50
+ "secret": false
51
+ }
52
+ ],
53
+ "requires": [],
54
+ "optional": [
55
+ {
56
+ "type": "weather/current",
57
+ "plugin": "weather"
58
+ }
59
+ ],
60
+ "widgets": [
61
+ {
62
+ "type": "news/headline",
63
+ "name": {
64
+ "en": "Headline",
65
+ "es": "Titular"
66
+ },
67
+ "description": {
68
+ "en": "One story at a time over its photo, full-bleed: outlet, age, how many outlets carry it, headline and standfirst. With two versions of the same fact side by side when outlets tell it differently.",
69
+ "es": "Una noticia cada vez sobre su foto a sangre: cabecera, antigüedad, cuántas cabeceras la llevan, titular y entradilla. Con dos versiones del mismo hecho lado a lado cuando las cabeceras lo cuentan distinto."
70
+ },
71
+ "icon": "newspaper",
72
+ "category": "info",
73
+ "tags": [
74
+ "news",
75
+ "noticias",
76
+ "rss",
77
+ "press",
78
+ "prensa"
79
+ ],
80
+ "size": {
81
+ "min": {
82
+ "w": 480,
83
+ "h": 200
84
+ },
85
+ "preferred": {
86
+ "w": 1920,
87
+ "h": 462
88
+ }
89
+ },
90
+ "chrome": "bare",
91
+ "sources": [
92
+ "news/deck",
93
+ "weather/current"
94
+ ],
95
+ "options": {
96
+ "default": {
97
+ "rotateMs": 30000,
98
+ "outlets": [],
99
+ "showStandfirst": true,
100
+ "offset": 0,
101
+ "showContrast": true,
102
+ "showCorner": true
103
+ },
104
+ "x-ui": {},
105
+ "type": "object",
106
+ "properties": {
107
+ "rotateMs": {
108
+ "title": "Each story for",
109
+ "default": 30000,
110
+ "x-ui": {
111
+ "label": {
112
+ "en": "Each story for",
113
+ "es": "Cada noticia durante"
114
+ },
115
+ "unit": "ms"
116
+ },
117
+ "type": "integer",
118
+ "minimum": 10000,
119
+ "maximum": 3600000
120
+ },
121
+ "outlets": {
122
+ "title": "Outlets",
123
+ "description": "Empty: all. Feed names as in the news source (El País, Xataka IA…), comma-separated; * matches anything, a leading ! leaves out. A story carried by several shows the version of one of these.",
124
+ "default": [],
125
+ "x-ui": {
126
+ "label": {
127
+ "en": "Outlets",
128
+ "es": "Cabeceras"
129
+ },
130
+ "help": {
131
+ "en": "Empty: all. Feed names as in the news source (El País, Xataka IA…), comma-separated; * matches anything, a leading ! leaves out. A story carried by several shows the version of one of these.",
132
+ "es": "Vacío: todas. Nombres de fuente como en el mazo de noticias (El País, Xataka IA…), separados por comas; * vale por cualquier cosa y un ! delante excluye. De una historia de varias se ve la versión de una de estas."
133
+ },
134
+ "widget": "filter",
135
+ "choices": {
136
+ "source": "news/deck",
137
+ "list": "outlets"
138
+ }
139
+ },
140
+ "type": "array",
141
+ "items": {
142
+ "default": "",
143
+ "x-ui": {
144
+ "placeholder": "name, group/*, !old-*",
145
+ "choices": {
146
+ "source": "news/deck",
147
+ "list": "outlets"
148
+ }
149
+ },
150
+ "type": "string"
151
+ },
152
+ "x-filter": true
153
+ },
154
+ "showStandfirst": {
155
+ "title": "Standfirst",
156
+ "description": "The summary under the headline. Off: the headline alone, with room for longer ones.",
157
+ "default": true,
158
+ "x-ui": {
159
+ "label": {
160
+ "en": "Standfirst",
161
+ "es": "Entradilla"
162
+ },
163
+ "help": {
164
+ "en": "The summary under the headline. Off: the headline alone, with room for longer ones.",
165
+ "es": "El resumen bajo el titular. Apagado: el titular solo, con sitio para los largos."
166
+ }
167
+ },
168
+ "type": "boolean"
169
+ },
170
+ "offset": {
171
+ "title": "Skip stories",
172
+ "description": "So two news widgets on one screen don't show the same story.",
173
+ "default": 0,
174
+ "x-ui": {
175
+ "label": {
176
+ "en": "Skip stories",
177
+ "es": "Saltar noticias"
178
+ },
179
+ "help": {
180
+ "en": "So two news widgets on one screen don't show the same story.",
181
+ "es": "Para que dos widgets de noticias en una pantalla no enseñen la misma."
182
+ },
183
+ "advanced": true
184
+ },
185
+ "type": "integer",
186
+ "minimum": 0,
187
+ "maximum": 50
188
+ },
189
+ "showContrast": {
190
+ "title": "Two versions side by side",
191
+ "description": "On wide tiles, when two outlets tell the same fact differently.",
192
+ "default": true,
193
+ "x-ui": {
194
+ "label": {
195
+ "en": "Two versions side by side",
196
+ "es": "Dos versiones lado a lado"
197
+ },
198
+ "help": {
199
+ "en": "On wide tiles, when two outlets tell the same fact differently.",
200
+ "es": "En teselas anchas, cuando dos cabeceras cuentan el mismo hecho de forma distinta."
201
+ }
202
+ },
203
+ "type": "boolean"
204
+ },
205
+ "showCorner": {
206
+ "title": "Clock and weather",
207
+ "default": true,
208
+ "x-ui": {
209
+ "label": {
210
+ "en": "Clock and weather",
211
+ "es": "Reloj y tiempo"
212
+ }
213
+ },
214
+ "type": "boolean"
215
+ }
216
+ }
217
+ },
218
+ "screenshot": "docs/headline.png",
219
+ "animated": false,
220
+ "urgent": false
221
+ },
222
+ {
223
+ "type": "news/column",
224
+ "name": {
225
+ "en": "News column",
226
+ "es": "Columna de noticias"
227
+ },
228
+ "description": {
229
+ "en": "The current story in a column for a shared screen: photo with rounded corners, clock and temperature on top, headline and standfirst below.",
230
+ "es": "La noticia del momento en una columna para una pantalla compartida: foto con esquinas redondeadas, reloj y temperatura arriba, titular y entradilla abajo."
231
+ },
232
+ "icon": "newspaper",
233
+ "category": "info",
234
+ "tags": [
235
+ "news",
236
+ "noticias",
237
+ "rss"
238
+ ],
239
+ "size": {
240
+ "min": {
241
+ "w": 240,
242
+ "h": 240
243
+ },
244
+ "preferred": {
245
+ "w": 600,
246
+ "h": 462
247
+ }
248
+ },
249
+ "chrome": "bare",
250
+ "sources": [
251
+ "news/deck",
252
+ "weather/current"
253
+ ],
254
+ "options": {
255
+ "default": {
256
+ "rotateMs": 30000,
257
+ "outlets": [],
258
+ "showStandfirst": true,
259
+ "offset": 1,
260
+ "showCorner": true
261
+ },
262
+ "x-ui": {},
263
+ "type": "object",
264
+ "properties": {
265
+ "rotateMs": {
266
+ "title": "Each story for",
267
+ "default": 30000,
268
+ "x-ui": {
269
+ "label": {
270
+ "en": "Each story for",
271
+ "es": "Cada noticia durante"
272
+ },
273
+ "unit": "ms"
274
+ },
275
+ "type": "integer",
276
+ "minimum": 10000,
277
+ "maximum": 3600000
278
+ },
279
+ "outlets": {
280
+ "title": "Outlets",
281
+ "description": "Empty: all. Feed names as in the news source (El País, Xataka IA…), comma-separated; * matches anything, a leading ! leaves out. A story carried by several shows the version of one of these.",
282
+ "default": [],
283
+ "x-ui": {
284
+ "label": {
285
+ "en": "Outlets",
286
+ "es": "Cabeceras"
287
+ },
288
+ "help": {
289
+ "en": "Empty: all. Feed names as in the news source (El País, Xataka IA…), comma-separated; * matches anything, a leading ! leaves out. A story carried by several shows the version of one of these.",
290
+ "es": "Vacío: todas. Nombres de fuente como en el mazo de noticias (El País, Xataka IA…), separados por comas; * vale por cualquier cosa y un ! delante excluye. De una historia de varias se ve la versión de una de estas."
291
+ },
292
+ "widget": "filter",
293
+ "choices": {
294
+ "source": "news/deck",
295
+ "list": "outlets"
296
+ }
297
+ },
298
+ "type": "array",
299
+ "items": {
300
+ "default": "",
301
+ "x-ui": {
302
+ "placeholder": "name, group/*, !old-*",
303
+ "choices": {
304
+ "source": "news/deck",
305
+ "list": "outlets"
306
+ }
307
+ },
308
+ "type": "string"
309
+ },
310
+ "x-filter": true
311
+ },
312
+ "showStandfirst": {
313
+ "title": "Standfirst",
314
+ "description": "The summary under the headline. Off: the headline alone, with room for longer ones.",
315
+ "default": true,
316
+ "x-ui": {
317
+ "label": {
318
+ "en": "Standfirst",
319
+ "es": "Entradilla"
320
+ },
321
+ "help": {
322
+ "en": "The summary under the headline. Off: the headline alone, with room for longer ones.",
323
+ "es": "El resumen bajo el titular. Apagado: el titular solo, con sitio para los largos."
324
+ }
325
+ },
326
+ "type": "boolean"
327
+ },
328
+ "offset": {
329
+ "title": "Skip stories",
330
+ "description": "So it doesn't repeat the story of a headline widget on the same screen.",
331
+ "default": 1,
332
+ "x-ui": {
333
+ "label": {
334
+ "en": "Skip stories",
335
+ "es": "Saltar noticias"
336
+ },
337
+ "help": {
338
+ "en": "So it doesn't repeat the story of a headline widget on the same screen.",
339
+ "es": "Para no repetir la noticia de un titular en la misma pantalla."
340
+ },
341
+ "advanced": true
342
+ },
343
+ "type": "integer",
344
+ "minimum": 0,
345
+ "maximum": 50
346
+ },
347
+ "showCorner": {
348
+ "title": "Clock and temperature",
349
+ "default": true,
350
+ "x-ui": {
351
+ "label": {
352
+ "en": "Clock and temperature",
353
+ "es": "Reloj y temperatura"
354
+ }
355
+ },
356
+ "type": "boolean"
357
+ }
358
+ }
359
+ },
360
+ "screenshot": "docs/column.png",
361
+ "animated": false,
362
+ "urgent": false
363
+ }
364
+ ],
365
+ "sources": [
366
+ {
367
+ "type": "news/deck",
368
+ "name": {
369
+ "en": "News deck",
370
+ "es": "Mazo de noticias"
371
+ },
372
+ "description": {
373
+ "en": "Reads the RSS feeds, drops junk and stale items, groups the same story across outlets and orders what to show.",
374
+ "es": "Lee los RSS, quita relleno y noticias viejas, agrupa la misma historia de varias cabeceras y ordena qué enseñar."
375
+ },
376
+ "polled": true,
377
+ "intervalMs": 600000,
378
+ "options": {
379
+ "default": {
380
+ "feeds": [
381
+ {
382
+ "name": "Xataka IA",
383
+ "url": "https://feeds.weblogssl.com/xataka2",
384
+ "titleFilter": "\\b(?:[Aa]nthropic|[Cc]laude|[Cc]hat[Gg]PT|[Oo]pen[Aa][Ii]|[Gg]emini|[Dd]eep[Mm]ind|[Cc]opilot|[Mm]idjourney|[Dd]eep[Ss]eek|[Mm]istral [Aa][Ii]|[Pp]erplexity|[Ll]lama \\d|[Gg]rok|inteligencia artificial|IA|IAs|AI|LLMs?|chatbots?|modelo de lenguaje|language model|red neuronal|neural network|superinteligencia)\\b",
385
+ "maxAgeMs": 129600000
386
+ },
387
+ {
388
+ "name": "Hipertextual IA",
389
+ "url": "https://hipertextual.com/feed",
390
+ "titleFilter": "\\b(?:[Aa]nthropic|[Cc]laude|[Cc]hat[Gg]PT|[Oo]pen[Aa][Ii]|[Gg]emini|[Dd]eep[Mm]ind|[Cc]opilot|[Mm]idjourney|[Dd]eep[Ss]eek|[Mm]istral [Aa][Ii]|[Pp]erplexity|[Ll]lama \\d|[Gg]rok|inteligencia artificial|IA|IAs|AI|LLMs?|chatbots?|modelo de lenguaje|language model|red neuronal|neural network|superinteligencia)\\b",
391
+ "maxAgeMs": 129600000
392
+ },
393
+ {
394
+ "name": "20minutos IA",
395
+ "url": "https://www.20minutos.es/rss/tecnologia/",
396
+ "titleFilter": "\\b(?:[Aa]nthropic|[Cc]laude|[Cc]hat[Gg]PT|[Oo]pen[Aa][Ii]|[Gg]emini|[Dd]eep[Mm]ind|[Cc]opilot|[Mm]idjourney|[Dd]eep[Ss]eek|[Mm]istral [Aa][Ii]|[Pp]erplexity|[Ll]lama \\d|[Gg]rok|inteligencia artificial|IA|IAs|AI|LLMs?|chatbots?|modelo de lenguaje|language model|red neuronal|neural network|superinteligencia)\\b",
397
+ "maxAgeMs": 129600000
398
+ },
399
+ {
400
+ "name": "Omicrono IA",
401
+ "url": "https://www.elespanol.com/rss/omicrono/",
402
+ "titleFilter": "\\b(?:[Aa]nthropic|[Cc]laude|[Cc]hat[Gg]PT|[Oo]pen[Aa][Ii]|[Gg]emini|[Dd]eep[Mm]ind|[Cc]opilot|[Mm]idjourney|[Dd]eep[Ss]eek|[Mm]istral [Aa][Ii]|[Pp]erplexity|[Ll]lama \\d|[Gg]rok|inteligencia artificial|IA|IAs|AI|LLMs?|chatbots?|modelo de lenguaje|language model|red neuronal|neural network|superinteligencia)\\b",
403
+ "maxAgeMs": 129600000
404
+ },
405
+ {
406
+ "name": "elDiario.es",
407
+ "url": "https://www.eldiario.es/rss/",
408
+ "titleFilter": "",
409
+ "maxAgeMs": 0
410
+ },
411
+ {
412
+ "name": "20minutos",
413
+ "url": "https://www.20minutos.es/rss/",
414
+ "titleFilter": "",
415
+ "maxAgeMs": 0
416
+ },
417
+ {
418
+ "name": "El País",
419
+ "url": "https://feeds.elpais.com/mrss-s/pages/ep/site/elpais.com/portada",
420
+ "titleFilter": "",
421
+ "maxAgeMs": 0
422
+ },
423
+ {
424
+ "name": "La Vanguardia",
425
+ "url": "https://www.lavanguardia.com/rss/home.xml",
426
+ "titleFilter": "",
427
+ "maxAgeMs": 0
428
+ },
429
+ {
430
+ "name": "El Mundo",
431
+ "url": "https://e00-elmundo.uecdn.es/elmundo/rss/portada.xml",
432
+ "titleFilter": "",
433
+ "maxAgeMs": 0
434
+ },
435
+ {
436
+ "name": "ABC",
437
+ "url": "https://www.abc.es/rss/2.0/portada/",
438
+ "titleFilter": "",
439
+ "maxAgeMs": 0
440
+ }
441
+ ],
442
+ "topic": "all",
443
+ "maxAgeMs": 259200000,
444
+ "rejectFilter": "\\b(?:amazon|aliexpress|chollo|descuentazo|superventas|el corte ingl[eé]s|black friday|c[óo]digo promocional|por menos de \\d+ ?(?:euros|€)|merece la pena comprar|he probado (?:el|la|los|las)|comprar[íi]as)\\b|\\b(?:euromillones|primitiva|bonoloto|loter[íi]a|sorteo|hor[óo]scopo|quiniela|cup[óo]n diario|comprobar (?:el|tu)|n[úu]meros premiados)\\b|\\b(?:la joya oculta|joya escondida|lo que nadie|nadie te (?:cuenta|dice)|no te lo vas a creer|te sorprender|vas a alucinar|el truco|este truco|los trucos|la raz[óo]n por la que|el motivo por el que|as[íi] es como|esto es lo que (?:pasa|hace|ocurre)|y no es lo que|el secreto (?:de|que)|dile adi[óo]s|te cambiar[áa] la vida|estas son las claves|las claves para)\\b|\\b(?:en im[áa]genes|en fotos|las mejores fotos|foto a foto|el v[íi]deo viral|se hace viral|arrasa en (?:tiktok|redes)|revoluciona las redes)\\b|\\b(?:en directo|minuto a minuto|s[íi]guelo en vivo|[úu]ltima hora de)\\b|\\b(?:series recomendadas|pel[íi]culas recomendadas|las mejores series|recomendadas para)\\b|^[a-záéíóúñ]+, [a-záéíóúñ ]{3,28}: [\"“']|^(?:las?|los?) \\d+ (?:claves|cosas|razones|trucos|mejores|secretos|motivos)\\b",
445
+ "maxStories": 60
446
+ },
447
+ "x-ui": {},
448
+ "type": "object",
449
+ "properties": {
450
+ "feeds": {
451
+ "title": "Feeds",
452
+ "description": "Order matters: a repeated story keeps the label of the first feed.",
453
+ "default": [
454
+ {
455
+ "name": "Xataka IA",
456
+ "url": "https://feeds.weblogssl.com/xataka2",
457
+ "titleFilter": "\\b(?:[Aa]nthropic|[Cc]laude|[Cc]hat[Gg]PT|[Oo]pen[Aa][Ii]|[Gg]emini|[Dd]eep[Mm]ind|[Cc]opilot|[Mm]idjourney|[Dd]eep[Ss]eek|[Mm]istral [Aa][Ii]|[Pp]erplexity|[Ll]lama \\d|[Gg]rok|inteligencia artificial|IA|IAs|AI|LLMs?|chatbots?|modelo de lenguaje|language model|red neuronal|neural network|superinteligencia)\\b",
458
+ "maxAgeMs": 129600000
459
+ },
460
+ {
461
+ "name": "Hipertextual IA",
462
+ "url": "https://hipertextual.com/feed",
463
+ "titleFilter": "\\b(?:[Aa]nthropic|[Cc]laude|[Cc]hat[Gg]PT|[Oo]pen[Aa][Ii]|[Gg]emini|[Dd]eep[Mm]ind|[Cc]opilot|[Mm]idjourney|[Dd]eep[Ss]eek|[Mm]istral [Aa][Ii]|[Pp]erplexity|[Ll]lama \\d|[Gg]rok|inteligencia artificial|IA|IAs|AI|LLMs?|chatbots?|modelo de lenguaje|language model|red neuronal|neural network|superinteligencia)\\b",
464
+ "maxAgeMs": 129600000
465
+ },
466
+ {
467
+ "name": "20minutos IA",
468
+ "url": "https://www.20minutos.es/rss/tecnologia/",
469
+ "titleFilter": "\\b(?:[Aa]nthropic|[Cc]laude|[Cc]hat[Gg]PT|[Oo]pen[Aa][Ii]|[Gg]emini|[Dd]eep[Mm]ind|[Cc]opilot|[Mm]idjourney|[Dd]eep[Ss]eek|[Mm]istral [Aa][Ii]|[Pp]erplexity|[Ll]lama \\d|[Gg]rok|inteligencia artificial|IA|IAs|AI|LLMs?|chatbots?|modelo de lenguaje|language model|red neuronal|neural network|superinteligencia)\\b",
470
+ "maxAgeMs": 129600000
471
+ },
472
+ {
473
+ "name": "Omicrono IA",
474
+ "url": "https://www.elespanol.com/rss/omicrono/",
475
+ "titleFilter": "\\b(?:[Aa]nthropic|[Cc]laude|[Cc]hat[Gg]PT|[Oo]pen[Aa][Ii]|[Gg]emini|[Dd]eep[Mm]ind|[Cc]opilot|[Mm]idjourney|[Dd]eep[Ss]eek|[Mm]istral [Aa][Ii]|[Pp]erplexity|[Ll]lama \\d|[Gg]rok|inteligencia artificial|IA|IAs|AI|LLMs?|chatbots?|modelo de lenguaje|language model|red neuronal|neural network|superinteligencia)\\b",
476
+ "maxAgeMs": 129600000
477
+ },
478
+ {
479
+ "name": "elDiario.es",
480
+ "url": "https://www.eldiario.es/rss/",
481
+ "titleFilter": "",
482
+ "maxAgeMs": 0
483
+ },
484
+ {
485
+ "name": "20minutos",
486
+ "url": "https://www.20minutos.es/rss/",
487
+ "titleFilter": "",
488
+ "maxAgeMs": 0
489
+ },
490
+ {
491
+ "name": "El País",
492
+ "url": "https://feeds.elpais.com/mrss-s/pages/ep/site/elpais.com/portada",
493
+ "titleFilter": "",
494
+ "maxAgeMs": 0
495
+ },
496
+ {
497
+ "name": "La Vanguardia",
498
+ "url": "https://www.lavanguardia.com/rss/home.xml",
499
+ "titleFilter": "",
500
+ "maxAgeMs": 0
501
+ },
502
+ {
503
+ "name": "El Mundo",
504
+ "url": "https://e00-elmundo.uecdn.es/elmundo/rss/portada.xml",
505
+ "titleFilter": "",
506
+ "maxAgeMs": 0
507
+ },
508
+ {
509
+ "name": "ABC",
510
+ "url": "https://www.abc.es/rss/2.0/portada/",
511
+ "titleFilter": "",
512
+ "maxAgeMs": 0
513
+ }
514
+ ],
515
+ "x-ui": {
516
+ "label": {
517
+ "en": "Feeds",
518
+ "es": "Fuentes"
519
+ },
520
+ "help": {
521
+ "en": "Order matters: a repeated story keeps the label of the first feed.",
522
+ "es": "El orden importa: una noticia repetida se queda con la etiqueta de la primera fuente."
523
+ }
524
+ },
525
+ "type": "array",
526
+ "items": {
527
+ "default": {
528
+ "name": "",
529
+ "url": "",
530
+ "titleFilter": "",
531
+ "maxAgeMs": 0
532
+ },
533
+ "x-ui": {},
534
+ "type": "object",
535
+ "properties": {
536
+ "name": {
537
+ "title": "Name",
538
+ "description": "Shown on screen. Ending in \" IA\" marks a topic feed of the same outlet.",
539
+ "default": "",
540
+ "x-ui": {
541
+ "label": {
542
+ "en": "Name",
543
+ "es": "Nombre"
544
+ },
545
+ "help": {
546
+ "en": "Shown on screen. Ending in \" IA\" marks a topic feed of the same outlet.",
547
+ "es": "Sale en pantalla. Acabar en « IA» marca un feed temático de la misma cabecera."
548
+ },
549
+ "placeholder": "El País"
550
+ },
551
+ "type": "string"
552
+ },
553
+ "url": {
554
+ "title": "RSS URL",
555
+ "default": "",
556
+ "x-ui": {
557
+ "label": {
558
+ "en": "RSS URL",
559
+ "es": "URL del RSS"
560
+ },
561
+ "format": "url"
562
+ },
563
+ "x-risk": "network",
564
+ "type": "string"
565
+ },
566
+ "titleFilter": {
567
+ "title": "Headline filter (regex)",
568
+ "description": "Only headlines matching it stay.",
569
+ "default": "",
570
+ "x-ui": {
571
+ "label": {
572
+ "en": "Headline filter (regex)",
573
+ "es": "Filtro de titular (regex)"
574
+ },
575
+ "help": {
576
+ "en": "Only headlines matching it stay.",
577
+ "es": "Sólo quedan los titulares que casan."
578
+ },
579
+ "advanced": true
580
+ },
581
+ "type": "string"
582
+ },
583
+ "maxAgeMs": {
584
+ "title": "Maximum age",
585
+ "description": "0: the general one.",
586
+ "default": 0,
587
+ "x-ui": {
588
+ "label": {
589
+ "en": "Maximum age",
590
+ "es": "Antigüedad máxima"
591
+ },
592
+ "help": {
593
+ "en": "0: the general one.",
594
+ "es": "0: la general."
595
+ },
596
+ "advanced": true,
597
+ "unit": "ms"
598
+ },
599
+ "type": "integer",
600
+ "minimum": 0,
601
+ "maximum": 2592000000
602
+ }
603
+ }
604
+ }
605
+ },
606
+ "topic": {
607
+ "title": "Topic",
608
+ "default": "all",
609
+ "x-ui": {
610
+ "label": {
611
+ "en": "Topic",
612
+ "es": "Tema"
613
+ },
614
+ "labels": {
615
+ "all": {
616
+ "en": "Everything",
617
+ "es": "Todo"
618
+ },
619
+ "ai": {
620
+ "en": "Only AI",
621
+ "es": "Sólo IA"
622
+ }
623
+ }
624
+ },
625
+ "type": "string",
626
+ "enum": [
627
+ "all",
628
+ "ai"
629
+ ]
630
+ },
631
+ "maxAgeMs": {
632
+ "title": "Maximum age",
633
+ "description": "0: no limit (undated items then pass too).",
634
+ "default": 259200000,
635
+ "x-ui": {
636
+ "label": {
637
+ "en": "Maximum age",
638
+ "es": "Antigüedad máxima"
639
+ },
640
+ "help": {
641
+ "en": "0: no limit (undated items then pass too).",
642
+ "es": "0: sin límite (pasan también las que no traen fecha)."
643
+ },
644
+ "unit": "ms"
645
+ },
646
+ "type": "integer",
647
+ "minimum": 0,
648
+ "maximum": 2592000000
649
+ },
650
+ "rejectFilter": {
651
+ "title": "Discard headlines (regex)",
652
+ "description": "Case-insensitive. Empty: keep everything.",
653
+ "default": "\\b(?:amazon|aliexpress|chollo|descuentazo|superventas|el corte ingl[eé]s|black friday|c[óo]digo promocional|por menos de \\d+ ?(?:euros|€)|merece la pena comprar|he probado (?:el|la|los|las)|comprar[íi]as)\\b|\\b(?:euromillones|primitiva|bonoloto|loter[íi]a|sorteo|hor[óo]scopo|quiniela|cup[óo]n diario|comprobar (?:el|tu)|n[úu]meros premiados)\\b|\\b(?:la joya oculta|joya escondida|lo que nadie|nadie te (?:cuenta|dice)|no te lo vas a creer|te sorprender|vas a alucinar|el truco|este truco|los trucos|la raz[óo]n por la que|el motivo por el que|as[íi] es como|esto es lo que (?:pasa|hace|ocurre)|y no es lo que|el secreto (?:de|que)|dile adi[óo]s|te cambiar[áa] la vida|estas son las claves|las claves para)\\b|\\b(?:en im[áa]genes|en fotos|las mejores fotos|foto a foto|el v[íi]deo viral|se hace viral|arrasa en (?:tiktok|redes)|revoluciona las redes)\\b|\\b(?:en directo|minuto a minuto|s[íi]guelo en vivo|[úu]ltima hora de)\\b|\\b(?:series recomendadas|pel[íi]culas recomendadas|las mejores series|recomendadas para)\\b|^[a-záéíóúñ]+, [a-záéíóúñ ]{3,28}: [\"“']|^(?:las?|los?) \\d+ (?:claves|cosas|razones|trucos|mejores|secretos|motivos)\\b",
654
+ "x-ui": {
655
+ "label": {
656
+ "en": "Discard headlines (regex)",
657
+ "es": "Descartar titulares (regex)"
658
+ },
659
+ "help": {
660
+ "en": "Case-insensitive. Empty: keep everything.",
661
+ "es": "Sin distinguir mayúsculas. Vacío: no se descarta nada."
662
+ },
663
+ "advanced": true,
664
+ "multiline": true
665
+ },
666
+ "type": "string"
667
+ },
668
+ "maxStories": {
669
+ "title": "Stories in the deck",
670
+ "default": 60,
671
+ "x-ui": {
672
+ "label": {
673
+ "en": "Stories in the deck",
674
+ "es": "Historias en el mazo"
675
+ },
676
+ "advanced": true
677
+ },
678
+ "type": "integer",
679
+ "minimum": 5,
680
+ "maximum": 200
681
+ }
682
+ }
683
+ }
684
+ }
685
+ ],
686
+ "interludes": [],
687
+ "templates": [
688
+ {
689
+ "id": "news",
690
+ "name": {
691
+ "en": "News and weather",
692
+ "es": "Noticias y tiempo"
693
+ },
694
+ "icon": "newspaper",
695
+ "widgets": [
696
+ "news/headline",
697
+ "weather/forecast",
698
+ "core/clock",
699
+ "mirror/rainmap",
700
+ "mirror/earthquakes",
701
+ "news/column"
702
+ ]
703
+ }
704
+ ]
705
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kiosko-plugin-news",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Press headlines from RSS feeds, no keys and no AI: stories grouped across outlets, a full-bleed photo frame and a news column.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -28,10 +28,14 @@
28
28
  },
29
29
  "kiosko": {
30
30
  "plugin": "./dist/index.js",
31
- "id": "news"
31
+ "id": "news",
32
+ "sdk": "^0.2.0",
33
+ "manifest": "./kiosko-manifest.json"
32
34
  },
33
35
  "files": [
34
36
  "dist",
37
+ "docs",
38
+ "kiosko-manifest.json",
35
39
  "README.md",
36
40
  "LICENSE"
37
41
  ],
@@ -44,9 +48,14 @@
44
48
  "check": "tsc -p tsconfig.json",
45
49
  "prepublishOnly": "npm run build"
46
50
  },
51
+ "peerDependencies": {
52
+ "@kiosko/sdk": "^0.2.0"
53
+ },
47
54
  "devDependencies": {
48
- "@kiosko/sdk": "^0.2.0",
55
+ "@kiosko/sdk": "^0.2.1",
56
+ "@loksly/lcd-canvas-kit": "^0.2.0",
49
57
  "@loksly/weather-astro": "^0.2.0",
58
+ "@napi-rs/canvas": "^1.0.10",
50
59
  "@types/node": "^24.0.0",
51
60
  "esbuild": "^0.25.0",
52
61
  "typescript": "^5.9.3"