kiosko-plugin-news 0.2.4 → 0.3.0
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 +9 -1
- package/dist/index.js +86 -15
- package/kiosko-manifest.json +66 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,6 +40,7 @@ Uses: `news/deck`, `weather/current`.
|
|
|
40
40
|
|---|---|---|---|
|
|
41
41
|
| `rotateMs` | duration (ms) | `30000` | Each story for |
|
|
42
42
|
| `outlets` | list | `[]` | Outlets. 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. |
|
|
43
|
+
| `topics` | list | `[]` | Topics. Empty: every story. Words looked for in the headline and standfirst, comma-separated: a story stays if it mentions any; a leading ! leaves out the ones that mention it. Case and accents don't matter, and a word matches at the start of a word (ia finds «IA», not «familia»). |
|
|
43
44
|
| `showStandfirst` | boolean | `true` | Standfirst. The summary under the headline. Off: the headline alone, with room for longer ones. |
|
|
44
45
|
| `offset` | number | `0` | Skip stories. So two news widgets on one screen don't show the same story. |
|
|
45
46
|
| `showContrast` | boolean | `true` | Two versions side by side. On wide tiles, when two outlets tell the same fact differently. |
|
|
@@ -57,15 +58,22 @@ Uses: `news/deck`, `weather/current`.
|
|
|
57
58
|
|---|---|---|---|
|
|
58
59
|
| `rotateMs` | duration (ms) | `30000` | Each story for |
|
|
59
60
|
| `outlets` | list | `[]` | Outlets. 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. |
|
|
61
|
+
| `topics` | list | `[]` | Topics. Empty: every story. Words looked for in the headline and standfirst, comma-separated: a story stays if it mentions any; a leading ! leaves out the ones that mention it. Case and accents don't matter, and a word matches at the start of a word (ia finds «IA», not «familia»). |
|
|
60
62
|
| `showStandfirst` | boolean | `true` | Standfirst. The summary under the headline. Off: the headline alone, with room for longer ones. |
|
|
61
63
|
| `offset` | number | `1` | Skip stories. So it doesn't repeat the story of a headline widget on the same screen. |
|
|
62
64
|
| `showCorner` | boolean | `true` | Clock and temperature |
|
|
63
65
|
|
|
66
|
+
### Topics without profiles
|
|
67
|
+
|
|
68
|
+
`topics` keeps only the stories that mention some words, in the headline or the standfirst of any outlet's version: `fútbol, liga` for sports, `ia, !apple` for AI without Apple. With the general feeds this already gives a themed tile; profiles are for when the topic has feeds of its own.
|
|
69
|
+
|
|
64
70
|
## Data sources
|
|
65
71
|
|
|
66
72
|
### News deck — `news/deck`
|
|
67
73
|
|
|
68
|
-
Reads the RSS feeds, drops junk and stale items, groups the same story across outlets and orders what to show. Read every 10 min while a widget uses it. Options are set
|
|
74
|
+
Reads the RSS feeds, drops junk and stale items, groups the same story across outlets and orders what to show. Read every 10 min while a widget uses it. Options are set in Kiosko → Settings → Data sources.
|
|
75
|
+
|
|
76
|
+
**Profiles** (Kiosko 0.2.12 and later): the deck can have several named configurations, say «General», «Technology» and «Sports», each with its own feeds (the sections of each paper have their own RSS). Each profile is read on its own and groups its own stories, so «carried by 4 outlets» counts within the profile. A widget picks its profile in the inspector (**Source profile**), where **New profile…** makes one from the tile itself; Settings → Data sources shows them as tabs. A feed that two profiles list is downloaded once. With older Kiosko versions there is one deck, as before.
|
|
69
77
|
|
|
70
78
|
| Option | Type | Default | |
|
|
71
79
|
|---|---|---|---|
|
package/dist/index.js
CHANGED
|
@@ -209,9 +209,9 @@ function overlap(a, b) {
|
|
|
209
209
|
return sharedTerms(a, b) / min;
|
|
210
210
|
}
|
|
211
211
|
function sharedTerms(a, b) {
|
|
212
|
-
let
|
|
213
|
-
for (const w of a) if (b.has(w))
|
|
214
|
-
return
|
|
212
|
+
let shared3 = 0;
|
|
213
|
+
for (const w of a) if (b.has(w)) shared3 += 1;
|
|
214
|
+
return shared3;
|
|
215
215
|
}
|
|
216
216
|
var CJK_LABEL = /^\s*(?:[[【〔((][^\]】〕))]{1,6}[\]】〕))]|[^\s》//||]{1,4}[》//||])\s*/u;
|
|
217
217
|
function withoutLabels(title) {
|
|
@@ -969,6 +969,29 @@ function applyFilter(items, feed, log = () => {
|
|
|
969
969
|
}
|
|
970
970
|
return items.filter((it) => re.test(it.title));
|
|
971
971
|
}
|
|
972
|
+
var FEED_SHARE_MS = 9e4;
|
|
973
|
+
var shared = /* @__PURE__ */ new Map();
|
|
974
|
+
function fetchShared(url, timeoutMs, signal, now = Date.now()) {
|
|
975
|
+
for (const [k, v] of shared) if (now - v.at >= FEED_SHARE_MS) shared.delete(k);
|
|
976
|
+
let hit = shared.get(url);
|
|
977
|
+
if (!hit) {
|
|
978
|
+
const text = fetchText(url, timeoutMs);
|
|
979
|
+
hit = { at: now, text };
|
|
980
|
+
shared.set(url, hit);
|
|
981
|
+
text.catch(() => {
|
|
982
|
+
if (shared.get(url)?.text === text) shared.delete(url);
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
return signal ? untilAborted(hit.text, signal) : hit.text;
|
|
986
|
+
}
|
|
987
|
+
function untilAborted(p, signal) {
|
|
988
|
+
if (signal.aborted) return Promise.reject(signal.reason);
|
|
989
|
+
return new Promise((resolve, reject) => {
|
|
990
|
+
const stop = () => reject(signal.reason);
|
|
991
|
+
signal.addEventListener("abort", stop, { once: true });
|
|
992
|
+
p.then(resolve, reject).finally(() => signal.removeEventListener("abort", stop));
|
|
993
|
+
});
|
|
994
|
+
}
|
|
972
995
|
async function fetchText(url, timeoutMs, signal) {
|
|
973
996
|
const timeout = AbortSignal.timeout(timeoutMs);
|
|
974
997
|
const res = await fetch(url, {
|
|
@@ -993,7 +1016,7 @@ async function fetchAllFeeds(feeds, o) {
|
|
|
993
1016
|
}
|
|
994
1017
|
const results = await Promise.allSettled(
|
|
995
1018
|
feeds.map(async (f) => {
|
|
996
|
-
const parsed = parseFeed(await
|
|
1019
|
+
const parsed = parseFeed(await fetchShared(f.url, o.timeoutMs, o.signal), f.name);
|
|
997
1020
|
return { parsed, kept: applyFilter(parsed, f, log) };
|
|
998
1021
|
})
|
|
999
1022
|
);
|
|
@@ -1518,10 +1541,10 @@ function interleaveBySource(stories, limit) {
|
|
|
1518
1541
|
var LEAD_STORIES = 6;
|
|
1519
1542
|
function buildDeck(items, poolSize) {
|
|
1520
1543
|
const stories = clusterStories(items);
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1523
|
-
const lead =
|
|
1524
|
-
const rest = [...
|
|
1544
|
+
const shared3 = stories.filter((s) => s.consensus > 1);
|
|
1545
|
+
shared3.sort((a, b) => b.consensus - a.consensus || b.lead.published - a.lead.published);
|
|
1546
|
+
const lead = shared3.slice(0, LEAD_STORIES);
|
|
1547
|
+
const rest = [...shared3.slice(LEAD_STORIES), ...stories.filter((s) => s.consensus === 1)];
|
|
1525
1548
|
const deck2 = lead.slice(0, poolSize);
|
|
1526
1549
|
if (deck2.length < poolSize) deck2.push(...interleaveBySource(rest, poolSize - deck2.length));
|
|
1527
1550
|
return deck2;
|
|
@@ -1532,8 +1555,41 @@ function storyAt(deck2, now, rotateMs, ahead = 0) {
|
|
|
1532
1555
|
return deck2[(slot % deck2.length + deck2.length) % deck2.length];
|
|
1533
1556
|
}
|
|
1534
1557
|
|
|
1558
|
+
// src/topics.ts
|
|
1559
|
+
function foldText(text) {
|
|
1560
|
+
return foldHan(text.normalize("NFD").replace(new RegExp("\\p{M}", "gu"), "").normalize("NFC").toLowerCase()).replace(/\s+/g, " ").trim();
|
|
1561
|
+
}
|
|
1562
|
+
var HAN = new RegExp("\\p{Script=Han}", "u");
|
|
1563
|
+
var escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1564
|
+
function matcher(word) {
|
|
1565
|
+
const w = foldText(word);
|
|
1566
|
+
if (!w) return () => false;
|
|
1567
|
+
if (HAN.test(w)) return (text) => text.includes(w);
|
|
1568
|
+
const re = new RegExp(`(?:^|[^\\p{L}\\p{N}])${escape(w)}`, "u");
|
|
1569
|
+
return (text) => re.test(text);
|
|
1570
|
+
}
|
|
1571
|
+
function parseTopics(topics) {
|
|
1572
|
+
const list = (typeof topics === "string" ? topics.split(/[,\n]/) : topics ?? []).map((x) => x.trim()).filter((x) => x && x !== "!");
|
|
1573
|
+
return {
|
|
1574
|
+
include: list.filter((x) => !x.startsWith("!")).map(matcher),
|
|
1575
|
+
exclude: list.filter((x) => x.startsWith("!")).map((x) => matcher(x.slice(1).trim()))
|
|
1576
|
+
};
|
|
1577
|
+
}
|
|
1578
|
+
function storyMatches(story, t2) {
|
|
1579
|
+
if (!t2.include.length && !t2.exclude.length) return true;
|
|
1580
|
+
const text = foldText(story.items.map((it) => `${it.title}
|
|
1581
|
+
${it.summary}`).join(" \n "));
|
|
1582
|
+
if (t2.exclude.some((m) => m(text))) return false;
|
|
1583
|
+
return !t2.include.length || t2.include.some((m) => m(text));
|
|
1584
|
+
}
|
|
1585
|
+
function storiesAbout(stories, topics) {
|
|
1586
|
+
const t2 = parseTopics(topics);
|
|
1587
|
+
return t2.include.length || t2.exclude.length ? stories.filter((s) => storyMatches(s, t2)) : [...stories];
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1535
1590
|
// src/index.ts
|
|
1536
1591
|
var DECK_FILE = "deck.json";
|
|
1592
|
+
var deckFile = (profile) => profile ? `deck-${profile.replace(/[^a-z0-9_-]/gi, "_")}.json` : DECK_FILE;
|
|
1537
1593
|
var DECK_MAX_AGE_MS = 24 * 36e5;
|
|
1538
1594
|
var IMAGE_MAX_AGE_HOURS = 12;
|
|
1539
1595
|
var cacheOf = (ctx) => ctx.cacheDir || ctx.dataDir;
|
|
@@ -1574,6 +1630,8 @@ var deck = defineSource({
|
|
|
1574
1630
|
rejectFilter: t.string({ default: JUNK_TITLE_FILTER, advanced: true, multiline: true, label: { en: "Discard headlines (regex)", es: "Descartar titulares (regex)", "zh-Hant": "\u6392\u9664\u6A19\u984C\uFF08\u6B63\u898F\u8868\u793A\u5F0F\uFF09", "zh-Hans": "\u6392\u9664\u6807\u9898\uFF08\u6B63\u5219\uFF09", de: "Schlagzeilen verwerfen (Regex)" }, help: { en: "Case-insensitive. Empty: keep everything.", es: "Sin distinguir may\xFAsculas. Vac\xEDo: no se descarta nada.", "zh-Hant": "\u4E0D\u5206\u5927\u5C0F\u5BEB\u3002\u7559\u7A7A\uFF1A\u5168\u90E8\u4FDD\u7559\u3002", "zh-Hans": "\u4E0D\u533A\u5206\u5927\u5C0F\u5199\u3002\u7559\u7A7A\uFF1A\u5168\u90E8\u4FDD\u7559\u3002", de: "Gro\xDF-/Kleinschreibung egal. Leer: nichts wird verworfen." } }),
|
|
1575
1631
|
maxStories: t.integer({ min: 5, max: 200, default: 60, advanced: true, label: { en: "Stories in the deck", es: "Historias en el mazo", "zh-Hant": "\u724C\u7D44\u4E2D\u7684\u65B0\u805E\u6578", "zh-Hans": "\u5361\u7EC4\u4E2D\u7684\u65B0\u95FB\u6570", de: "Meldungen im Stapel" } })
|
|
1576
1632
|
}),
|
|
1633
|
+
// Several decks («General», «Technology»…), each with its feeds: Kiosko 0.2.12 and later; older ones ignore it.
|
|
1634
|
+
...{ profiles: true },
|
|
1577
1635
|
intervalMs: 10 * 6e4,
|
|
1578
1636
|
// A dozen outlets per read: more often than every two minutes is only noise for them.
|
|
1579
1637
|
minIntervalMs: 2 * 6e4,
|
|
@@ -1590,7 +1648,7 @@ var deck = defineSource({
|
|
|
1590
1648
|
titleFilter: (ai2 ? AI_TITLE_FILTER : f.titleFilter.trim()) || void 0,
|
|
1591
1649
|
maxAgeMs: f.maxAgeMs || (ai2 ? AI_MAX_AGE_MS : void 0)
|
|
1592
1650
|
}));
|
|
1593
|
-
const file = join2(cacheOf(ctx),
|
|
1651
|
+
const file = join2(cacheOf(ctx), deckFile(ctx.profile));
|
|
1594
1652
|
pruneImageCache(imageDir(ctx), IMAGE_MAX_AGE_HOURS, ctx.now);
|
|
1595
1653
|
const timeoutMs = Math.max(1e3, Math.round(ctx.timeoutMs * 0.6));
|
|
1596
1654
|
const harvest = await fetchAllFeeds(feeds, { timeoutMs, log: ctx.log, rejectFilter: o.rejectFilter.trim(), maxAgeMs: o.maxAgeMs, now: ctx.now, signal: ctx.signal });
|
|
@@ -1626,7 +1684,7 @@ function loadDeck(file, now) {
|
|
|
1626
1684
|
return null;
|
|
1627
1685
|
}
|
|
1628
1686
|
}
|
|
1629
|
-
var
|
|
1687
|
+
var shared2 = {
|
|
1630
1688
|
rotateMs: t.duration({ min: 1e4, max: 36e5, default: 3e4, label: { en: "Each story for", es: "Cada noticia durante", "zh-Hant": "\u6BCF\u5247\u65B0\u805E\u986F\u793A", "zh-Hans": "\u6BCF\u6761\u65B0\u95FB\u663E\u793A", de: "Jede Meldung f\xFCr" } }),
|
|
1631
1689
|
outlets: t.filter({
|
|
1632
1690
|
choices: { source: "news/deck", list: "outlets" },
|
|
@@ -1639,6 +1697,18 @@ var shared = {
|
|
|
1639
1697
|
de: "Leer: alle. Feed-Namen wie in der Nachrichten-Datenquelle (tagesschau, heise KI\u2026), durch Kommas getrennt; * steht f\xFCr beliebigen Text, ein vorangestelltes ! schlie\xDFt aus. Von einer Meldung mehrerer Medien wird die Fassung eines dieser Medien gezeigt."
|
|
1640
1698
|
}
|
|
1641
1699
|
}),
|
|
1700
|
+
// A filter (one line, comma-separated) of words, not of names: its own placeholder.
|
|
1701
|
+
topics: t.list(t.string({ placeholder: "NASA, Mars, !SpaceX" }), {
|
|
1702
|
+
filter: true,
|
|
1703
|
+
label: { en: "Topics", es: "Temas", "zh-Hant": "\u4E3B\u984C", "zh-Hans": "\u4E3B\u9898", de: "Themen" },
|
|
1704
|
+
help: {
|
|
1705
|
+
en: "Empty: every story. Words looked for in the headline and standfirst, comma-separated: a story stays if it mentions any; a leading ! leaves out the ones that mention it. Case and accents don't matter, and a word matches at the start of a word (ia finds \xABIA\xBB, not \xABfamilia\xBB).",
|
|
1706
|
+
es: "Vac\xEDo: todas las noticias. Palabras que se buscan en el titular y la entradilla, separadas por comas: queda la noticia que mencione alguna; un ! delante deja fuera las que la mencionan. Da igual may\xFAsculas y tildes, y la palabra casa al principio de palabra (ia encuentra \xABIA\xBB, no \xABfamilia\xBB).",
|
|
1707
|
+
"zh-Hant": "\u7559\u7A7A\uFF1A\u5168\u90E8\u65B0\u805E\u3002\u5728\u6A19\u984C\u8207\u5C0E\u8A00\u4E2D\u5C0B\u627E\u7684\u8A5E\uFF0C\u4EE5\u9017\u865F\u5206\u9694\uFF1A\u63D0\u5230\u5176\u4E2D\u4EFB\u4E00\u8A5E\u7684\u65B0\u805E\u6703\u4FDD\u7559\uFF1B\u958B\u982D\u52A0 ! \u5247\u6392\u9664\u63D0\u5230\u5B83\u7684\u65B0\u805E\u3002\u4E0D\u5206\u5927\u5C0F\u5BEB\u8207\u91CD\u97F3\uFF0C\u7E41\u9AD4\u8207\u7C21\u9AD4\u7686\u53EF\u3002",
|
|
1708
|
+
"zh-Hans": "\u7559\u7A7A\uFF1A\u5168\u90E8\u65B0\u95FB\u3002\u5728\u6807\u9898\u548C\u5BFC\u8BED\u4E2D\u67E5\u627E\u7684\u8BCD\uFF0C\u7528\u9017\u53F7\u5206\u9694\uFF1A\u63D0\u5230\u5176\u4E2D\u4EFB\u4E00\u8BCD\u7684\u65B0\u95FB\u4F1A\u4FDD\u7559\uFF1B\u5F00\u5934\u52A0 ! \u5219\u6392\u9664\u63D0\u5230\u5B83\u7684\u65B0\u95FB\u3002\u4E0D\u533A\u5206\u5927\u5C0F\u5199\u548C\u91CD\u97F3\uFF0C\u7E41\u4F53\u548C\u7B80\u4F53\u5747\u53EF\u3002",
|
|
1709
|
+
de: "Leer: alle Meldungen. W\xF6rter, die in Schlagzeile und Vorspann gesucht werden, durch Kommas getrennt: Eine Meldung bleibt, wenn sie eines davon erw\xE4hnt; ein vorangestelltes ! schlie\xDFt die aus, die es erw\xE4hnen. Gro\xDF-/Kleinschreibung und Akzente egal; ein Wort passt am Wortanfang (ki findet \u201EKI\u201C, nicht \u201EWiki\u201C)."
|
|
1710
|
+
}
|
|
1711
|
+
}),
|
|
1642
1712
|
showStandfirst: t.boolean({ default: true, label: { en: "Standfirst", es: "Entradilla", "zh-Hant": "\u5C0E\u8A00", "zh-Hans": "\u5BFC\u8BED", de: "Vorspann" }, help: { en: "The summary under the headline. Off: the headline alone, with room for longer ones.", es: "El resumen bajo el titular. Apagado: el titular solo, con sitio para los largos.", "zh-Hant": "\u6A19\u984C\u4E0B\u65B9\u7684\u6458\u8981\u3002\u95DC\u9589\uFF1A\u53EA\u986F\u793A\u6A19\u984C\uFF0C\u53EF\u5BB9\u7D0D\u8F03\u9577\u7684\u6A19\u984C\u3002", "zh-Hans": "\u6807\u9898\u4E0B\u65B9\u7684\u6458\u8981\u3002\u5173\u95ED\uFF1A\u53EA\u663E\u793A\u6807\u9898\uFF0C\u53EF\u5BB9\u7EB3\u8F83\u957F\u7684\u6807\u9898\u3002", de: "Die Zusammenfassung unter der Schlagzeile. Aus: nur die Schlagzeile, mit Platz f\xFCr l\xE4ngere." } })
|
|
1643
1713
|
};
|
|
1644
1714
|
var DEMO_PHOTO = "demo:";
|
|
@@ -1653,7 +1723,7 @@ function storiesFor(stories, outlets) {
|
|
|
1653
1723
|
}
|
|
1654
1724
|
return out;
|
|
1655
1725
|
}
|
|
1656
|
-
var storiesOf = (sources, o) => storiesFor(deckOf(sources)?.stories ?? [], o.outlets);
|
|
1726
|
+
var storiesOf = (sources, o) => storiesAbout(storiesFor(deckOf(sources)?.stories ?? [], o.outlets), o.topics);
|
|
1657
1727
|
async function pickShot(ctx) {
|
|
1658
1728
|
const stories = storiesOf(ctx.sources, ctx.options);
|
|
1659
1729
|
if (!stories.length) return void 0;
|
|
@@ -1687,7 +1757,7 @@ function painter(ctx, g) {
|
|
|
1687
1757
|
var demoOf = (url) => url?.startsWith(DEMO_PHOTO) ? url.slice(DEMO_PHOTO.length) : null;
|
|
1688
1758
|
function demoShot(o, now, locale = "en") {
|
|
1689
1759
|
const d = demoDeck(now, locale);
|
|
1690
|
-
const s = storyAt(storiesFor(d.stories, o.outlets ?? []), now, o.rotateMs, o.offset) ?? d.stories[0];
|
|
1760
|
+
const s = storyAt(storiesAbout(storiesFor(d.stories, o.outlets ?? []), o.topics), now, o.rotateMs, o.offset) ?? d.stories[0];
|
|
1691
1761
|
return { data: { link: s.lead.link, photo: s.lead.image }, sources: { "news/deck": d, "weather/current": demoCornerWeather(now, locale) } };
|
|
1692
1762
|
}
|
|
1693
1763
|
var headline = defineWidget({
|
|
@@ -1706,7 +1776,7 @@ var headline = defineWidget({
|
|
|
1706
1776
|
chrome: "bare",
|
|
1707
1777
|
size: { min: { w: 480, h: 200 }, preferred: { w: 1920, h: 462 } },
|
|
1708
1778
|
options: t.object({
|
|
1709
|
-
...
|
|
1779
|
+
...shared2,
|
|
1710
1780
|
offset: t.integer({ min: 0, max: 50, default: 0, advanced: true, label: { en: "Skip stories", es: "Saltar noticias", "zh-Hant": "\u7565\u904E\u65B0\u805E", "zh-Hans": "\u8DF3\u8FC7\u65B0\u95FB", de: "Meldungen \xFCberspringen" }, help: { en: "So two news widgets on one screen don't show the same story.", es: "Para que dos widgets de noticias en una pantalla no ense\xF1en la misma.", "zh-Hant": "\u8B93\u540C\u4E00\u87A2\u5E55\u4E0A\u7684\u5169\u500B\u65B0\u805E\u5C0F\u5DE5\u5177\u4E0D\u6703\u986F\u793A\u540C\u4E00\u5247\u65B0\u805E\u3002", "zh-Hans": "\u8BA9\u540C\u4E00\u5C4F\u5E55\u4E0A\u7684\u4E24\u4E2A\u65B0\u95FB\u5C0F\u7EC4\u4EF6\u4E0D\u4F1A\u663E\u793A\u540C\u4E00\u6761\u65B0\u95FB\u3002", de: "Damit zwei Nachrichten-Widgets auf einem Bildschirm nicht dieselbe Meldung zeigen." } }),
|
|
1711
1781
|
showContrast: t.boolean({ default: true, label: { en: "Two versions side by side", es: "Dos versiones lado a lado", "zh-Hant": "\u5169\u500B\u7248\u672C\u4E26\u6392", "zh-Hans": "\u4E24\u4E2A\u7248\u672C\u5E76\u6392", de: "Zwei Fassungen nebeneinander" }, help: { en: "On wide tiles, when two outlets tell the same fact differently.", es: "En teselas anchas, cuando dos cabeceras cuentan el mismo hecho de forma distinta.", "zh-Hant": "\u7528\u65BC\u5BEC\u65B9\u683C\uFF0C\u7576\u5169\u5BB6\u5A92\u9AD4\u5C0D\u540C\u4E00\u4EF6\u4E8B\u8AAA\u6CD5\u4E0D\u540C\u6642\u3002", "zh-Hans": "\u7528\u4E8E\u5BBD\u683C\u5B50\uFF0C\u5F53\u4E24\u5BB6\u5A92\u4F53\u5BF9\u540C\u4E00\u4EF6\u4E8B\u8BF4\u6CD5\u4E0D\u540C\u65F6\u3002", de: "Auf breiten Kacheln, wenn zwei Medien dasselbe unterschiedlich erz\xE4hlen." } }),
|
|
1712
1782
|
showCorner: t.boolean({ default: true, label: { en: "Clock and weather", es: "Reloj y tiempo", "zh-Hant": "\u6642\u9418\u8207\u5929\u6C23", "zh-Hans": "\u65F6\u949F\u548C\u5929\u6C14", de: "Uhr und Wetter" } })
|
|
@@ -1742,7 +1812,7 @@ var column = defineWidget({
|
|
|
1742
1812
|
chrome: "bare",
|
|
1743
1813
|
size: { min: { w: 240, h: 240 }, preferred: { w: 600, h: 462 } },
|
|
1744
1814
|
options: t.object({
|
|
1745
|
-
...
|
|
1815
|
+
...shared2,
|
|
1746
1816
|
offset: t.integer({ min: 0, max: 50, default: 1, advanced: true, label: { en: "Skip stories", es: "Saltar noticias", "zh-Hant": "\u7565\u904E\u65B0\u805E", "zh-Hans": "\u8DF3\u8FC7\u65B0\u95FB", de: "Meldungen \xFCberspringen" }, help: { en: "So it doesn't repeat the story of a headline widget on the same screen.", es: "Para no repetir la noticia de un titular en la misma pantalla.", "zh-Hant": "\u907F\u514D\u91CD\u8907\u540C\u4E00\u87A2\u5E55\u4E0A\u982D\u689D\u5C0F\u5DE5\u5177\u7684\u65B0\u805E\u3002", "zh-Hans": "\u907F\u514D\u91CD\u590D\u540C\u4E00\u5C4F\u5E55\u4E0A\u5934\u6761\u5C0F\u7EC4\u4EF6\u7684\u65B0\u95FB\u3002", de: "Damit es nicht die Meldung eines Schlagzeilen-Widgets auf demselben Bildschirm wiederholt." } }),
|
|
1747
1817
|
showCorner: t.boolean({ default: true, label: { en: "Clock and temperature", es: "Reloj y temperatura", "zh-Hant": "\u6642\u9418\u8207\u6EAB\u5EA6", "zh-Hans": "\u65F6\u949F\u548C\u6E29\u5EA6", de: "Uhr und Temperatur" } })
|
|
1748
1818
|
}),
|
|
@@ -1763,7 +1833,7 @@ var column = defineWidget({
|
|
|
1763
1833
|
var index_default = definePlugin({
|
|
1764
1834
|
id: "news",
|
|
1765
1835
|
name: { en: "News", es: "Noticias", "zh-Hant": "\u65B0\u805E", "zh-Hans": "\u65B0\u95FB", de: "Nachrichten" },
|
|
1766
|
-
version: "0.
|
|
1836
|
+
version: "0.3.0",
|
|
1767
1837
|
languages: ["en", "es", "zh-Hant", "zh-Hans", "de"],
|
|
1768
1838
|
sdk: "^0.2.0",
|
|
1769
1839
|
permissions: { network: ["user"] },
|
|
@@ -1807,6 +1877,7 @@ var index_default = definePlugin({
|
|
|
1807
1877
|
export {
|
|
1808
1878
|
column,
|
|
1809
1879
|
deck,
|
|
1880
|
+
deckFile,
|
|
1810
1881
|
index_default as default,
|
|
1811
1882
|
headline,
|
|
1812
1883
|
storiesFor
|
package/kiosko-manifest.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"zh-Hans": "新闻",
|
|
10
10
|
"de": "Nachrichten"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.3.0",
|
|
13
13
|
"description": {
|
|
14
14
|
"en": "Press headlines from RSS feeds with their photos. No keys and no AI: consensus across outlets measured with plain set overlap.",
|
|
15
15
|
"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.",
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
"default": {
|
|
116
116
|
"rotateMs": 30000,
|
|
117
117
|
"outlets": [],
|
|
118
|
+
"topics": [],
|
|
118
119
|
"showStandfirst": true,
|
|
119
120
|
"offset": 0,
|
|
120
121
|
"showContrast": true,
|
|
@@ -179,6 +180,37 @@
|
|
|
179
180
|
},
|
|
180
181
|
"x-filter": true
|
|
181
182
|
},
|
|
183
|
+
"topics": {
|
|
184
|
+
"title": "Topics",
|
|
185
|
+
"description": "Empty: every story. Words looked for in the headline and standfirst, comma-separated: a story stays if it mentions any; a leading ! leaves out the ones that mention it. Case and accents don't matter, and a word matches at the start of a word (ia finds «IA», not «familia»).",
|
|
186
|
+
"default": [],
|
|
187
|
+
"x-ui": {
|
|
188
|
+
"label": {
|
|
189
|
+
"en": "Topics",
|
|
190
|
+
"es": "Temas",
|
|
191
|
+
"zh-Hant": "主題",
|
|
192
|
+
"zh-Hans": "主题",
|
|
193
|
+
"de": "Themen"
|
|
194
|
+
},
|
|
195
|
+
"help": {
|
|
196
|
+
"en": "Empty: every story. Words looked for in the headline and standfirst, comma-separated: a story stays if it mentions any; a leading ! leaves out the ones that mention it. Case and accents don't matter, and a word matches at the start of a word (ia finds «IA», not «familia»).",
|
|
197
|
+
"es": "Vacío: todas las noticias. Palabras que se buscan en el titular y la entradilla, separadas por comas: queda la noticia que mencione alguna; un ! delante deja fuera las que la mencionan. Da igual mayúsculas y tildes, y la palabra casa al principio de palabra (ia encuentra «IA», no «familia»).",
|
|
198
|
+
"zh-Hant": "留空:全部新聞。在標題與導言中尋找的詞,以逗號分隔:提到其中任一詞的新聞會保留;開頭加 ! 則排除提到它的新聞。不分大小寫與重音,繁體與簡體皆可。",
|
|
199
|
+
"zh-Hans": "留空:全部新闻。在标题和导语中查找的词,用逗号分隔:提到其中任一词的新闻会保留;开头加 ! 则排除提到它的新闻。不区分大小写和重音,繁体和简体均可。",
|
|
200
|
+
"de": "Leer: alle Meldungen. Wörter, die in Schlagzeile und Vorspann gesucht werden, durch Kommas getrennt: Eine Meldung bleibt, wenn sie eines davon erwähnt; ein vorangestelltes ! schließt die aus, die es erwähnen. Groß-/Kleinschreibung und Akzente egal; ein Wort passt am Wortanfang (ki findet „KI“, nicht „Wiki“)."
|
|
201
|
+
},
|
|
202
|
+
"widget": "filter"
|
|
203
|
+
},
|
|
204
|
+
"type": "array",
|
|
205
|
+
"items": {
|
|
206
|
+
"default": "",
|
|
207
|
+
"x-ui": {
|
|
208
|
+
"placeholder": "NASA, Mars, !SpaceX"
|
|
209
|
+
},
|
|
210
|
+
"type": "string"
|
|
211
|
+
},
|
|
212
|
+
"x-filter": true
|
|
213
|
+
},
|
|
182
214
|
"showStandfirst": {
|
|
183
215
|
"title": "Standfirst",
|
|
184
216
|
"description": "The summary under the headline. Off: the headline alone, with room for longer ones.",
|
|
@@ -311,6 +343,7 @@
|
|
|
311
343
|
"default": {
|
|
312
344
|
"rotateMs": 30000,
|
|
313
345
|
"outlets": [],
|
|
346
|
+
"topics": [],
|
|
314
347
|
"showStandfirst": true,
|
|
315
348
|
"offset": 1,
|
|
316
349
|
"showCorner": true
|
|
@@ -374,6 +407,37 @@
|
|
|
374
407
|
},
|
|
375
408
|
"x-filter": true
|
|
376
409
|
},
|
|
410
|
+
"topics": {
|
|
411
|
+
"title": "Topics",
|
|
412
|
+
"description": "Empty: every story. Words looked for in the headline and standfirst, comma-separated: a story stays if it mentions any; a leading ! leaves out the ones that mention it. Case and accents don't matter, and a word matches at the start of a word (ia finds «IA», not «familia»).",
|
|
413
|
+
"default": [],
|
|
414
|
+
"x-ui": {
|
|
415
|
+
"label": {
|
|
416
|
+
"en": "Topics",
|
|
417
|
+
"es": "Temas",
|
|
418
|
+
"zh-Hant": "主題",
|
|
419
|
+
"zh-Hans": "主题",
|
|
420
|
+
"de": "Themen"
|
|
421
|
+
},
|
|
422
|
+
"help": {
|
|
423
|
+
"en": "Empty: every story. Words looked for in the headline and standfirst, comma-separated: a story stays if it mentions any; a leading ! leaves out the ones that mention it. Case and accents don't matter, and a word matches at the start of a word (ia finds «IA», not «familia»).",
|
|
424
|
+
"es": "Vacío: todas las noticias. Palabras que se buscan en el titular y la entradilla, separadas por comas: queda la noticia que mencione alguna; un ! delante deja fuera las que la mencionan. Da igual mayúsculas y tildes, y la palabra casa al principio de palabra (ia encuentra «IA», no «familia»).",
|
|
425
|
+
"zh-Hant": "留空:全部新聞。在標題與導言中尋找的詞,以逗號分隔:提到其中任一詞的新聞會保留;開頭加 ! 則排除提到它的新聞。不分大小寫與重音,繁體與簡體皆可。",
|
|
426
|
+
"zh-Hans": "留空:全部新闻。在标题和导语中查找的词,用逗号分隔:提到其中任一词的新闻会保留;开头加 ! 则排除提到它的新闻。不区分大小写和重音,繁体和简体均可。",
|
|
427
|
+
"de": "Leer: alle Meldungen. Wörter, die in Schlagzeile und Vorspann gesucht werden, durch Kommas getrennt: Eine Meldung bleibt, wenn sie eines davon erwähnt; ein vorangestelltes ! schließt die aus, die es erwähnen. Groß-/Kleinschreibung und Akzente egal; ein Wort passt am Wortanfang (ki findet „KI“, nicht „Wiki“)."
|
|
428
|
+
},
|
|
429
|
+
"widget": "filter"
|
|
430
|
+
},
|
|
431
|
+
"type": "array",
|
|
432
|
+
"items": {
|
|
433
|
+
"default": "",
|
|
434
|
+
"x-ui": {
|
|
435
|
+
"placeholder": "NASA, Mars, !SpaceX"
|
|
436
|
+
},
|
|
437
|
+
"type": "string"
|
|
438
|
+
},
|
|
439
|
+
"x-filter": true
|
|
440
|
+
},
|
|
377
441
|
"showStandfirst": {
|
|
378
442
|
"title": "Standfirst",
|
|
379
443
|
"description": "The summary under the headline. Off: the headline alone, with room for longer ones.",
|
|
@@ -461,6 +525,7 @@
|
|
|
461
525
|
},
|
|
462
526
|
"polled": true,
|
|
463
527
|
"intervalMs": 600000,
|
|
528
|
+
"profiles": true,
|
|
464
529
|
"options": {
|
|
465
530
|
"default": {
|
|
466
531
|
"feeds": [],
|
package/package.json
CHANGED