kiosko-plugin-events 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/NOTICE +52 -0
- package/README.md +117 -2
- package/dist/index.js +2520 -0
- package/docs/agenda.png +0 -0
- package/docs/artists-small.png +0 -0
- package/docs/artists.png +0 -0
- package/docs/spotlight.png +0 -0
- package/docs/upcoming-bar.png +0 -0
- package/docs/upcoming-small.png +0 -0
- package/docs/upcoming-weekend.png +0 -0
- package/docs/upcoming.png +0 -0
- package/kiosko-manifest.json +1561 -0
- package/package.json +80 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Loksly
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
kiosko-plugin-events
|
|
2
|
+
Copyright (c) 2026 Loksly. MIT licence (see LICENSE).
|
|
3
|
+
|
|
4
|
+
Data
|
|
5
|
+
----
|
|
6
|
+
The events this plugin shows come from:
|
|
7
|
+
|
|
8
|
+
- Kulturklik, the cultural agenda of the Basque Government, through its
|
|
9
|
+
public API (https://api.euskadi.eus/culture/events/v1.0), and Euskadi's
|
|
10
|
+
tourism agenda (https://opendata.euskadi.eus/catalogo/-/agenda-turistica-de-euskadi/),
|
|
11
|
+
both published on Open Data Euskadi (https://opendata.euskadi.eus) under the
|
|
12
|
+
Creative Commons Attribution 4.0 licence
|
|
13
|
+
(https://creativecommons.org/licenses/by/4.0/). The widgets credit them as
|
|
14
|
+
"Kulturklik · Turismo Euskadi · Open Data Euskadi". The pictures of
|
|
15
|
+
Kulturklik's events are served from opendata.euskadi.eus with the events.
|
|
16
|
+
|
|
17
|
+
- The agenda of the Ayuntamiento de Murcia (https://eventos.murcia.es), through
|
|
18
|
+
the iCalendar feeds it publishes for use from other applications
|
|
19
|
+
(https://eventos.murcia.es/kml.html), and the description its events' pages
|
|
20
|
+
give search engines (schema.org JSON-LD), for their pictures and prices.
|
|
21
|
+
Its licence could not be checked (the site's legal page needs JavaScript);
|
|
22
|
+
the widgets credit it as "Ayuntamiento de Murcia (eventos.murcia.es)". The
|
|
23
|
+
pictures are served from eventos.murcia.es with the events.
|
|
24
|
+
|
|
25
|
+
- Ticketmaster's Discovery API (https://developer.ticketmaster.com), only
|
|
26
|
+
with a key of the user's own, under its terms of use
|
|
27
|
+
(https://developer.ticketmaster.com/support/terms-of-use/). Event content
|
|
28
|
+
belongs to its organisers and Ticketmaster; the plugin keeps it only for the
|
|
29
|
+
hours it is shown and credits it as "Ticketmaster".
|
|
30
|
+
|
|
31
|
+
Test data
|
|
32
|
+
---------
|
|
33
|
+
The files in src/fixtures are kept as test data and remain their publishers'
|
|
34
|
+
data:
|
|
35
|
+
|
|
36
|
+
- kulturklik-upcoming-bizkaia.json, kulturklik-search-bos.json and
|
|
37
|
+
euskadi-tourism-agenda.json: answers of the Kulturklik API and the tourism
|
|
38
|
+
agenda recorded on 4 December 2026 (scripts/capture.ts), trimmed to their
|
|
39
|
+
first 30 events. CC BY 4.0, Basque Government / Open Data Euskadi.
|
|
40
|
+
- murcia-upcoming.ics, murcia-musica.ics, murcia-teatro.ics and
|
|
41
|
+
murcia-exposiciones.ics: feeds of the Ayuntamiento de Murcia's agenda
|
|
42
|
+
(eventos.murcia.es) saved on 5 December 2026, trimmed to a few events each.
|
|
43
|
+
murcia-event-162370.html: one event's page, trimmed to its head and its
|
|
44
|
+
JSON-LD; its inline data, which carries the organiser's contact, is
|
|
45
|
+
replaced by made-up values. The Ayuntamiento de Murcia's data.
|
|
46
|
+
- ticketmaster-docs-events.json and ticketmaster-docs-event.json: the example
|
|
47
|
+
answers of Ticketmaster's Discovery API v2 documentation
|
|
48
|
+
(https://developer.ticketmaster.com/products-and-docs/apis/discovery-api/v2/),
|
|
49
|
+
as published there. Not answers of the live API.
|
|
50
|
+
|
|
51
|
+
The sample data the widgets show in the gallery and in docs/ (an evening and a
|
|
52
|
+
weekend in Bilbao) is made up: real venues, invented performers.
|
package/README.md
CHANGED
|
@@ -1,3 +1,118 @@
|
|
|
1
|
-
#
|
|
1
|
+
# kiosko-plugin-events
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
What's on around you, on the panel: concerts, theatre, dance and plans for the coming days and this weekend, filtered by kind, venue, price and words; and the next dates of the artists you follow, with a countdown and an alert when one announces a date near you or its tickets go on sale. From the Basque Country's open agendas ([Kulturklik](https://www.kulturklik.euskadi.eus) and Euskadi's tourism agenda, through [Open Data Euskadi](https://opendata.euskadi.eus)) and the [Ayuntamiento de Murcia's agenda](https://eventos.murcia.es), with no key, and, anywhere, from [Ticketmaster](https://developer.ticketmaster.com) with a free key of your own.
|
|
4
|
+
|
|
5
|
+
A plugin for [Kiosko](https://github.com/kiosko-lcd/kiosko), the widget mosaic for small USB LCD panels.
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
In Kiosko, **Plugins → Install from npm** → `kiosko-plugin-events`, then restart Kiosko. Or from a terminal:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm install --prefix ~/.config/kiosko/plugins kiosko-plugin-events
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
(macOS: `~/Library/Application Support/Kiosko/plugins`, Windows: `%APPDATA%\Kiosko\plugins`.)
|
|
18
|
+
|
|
19
|
+
Then **New page → Agenda** puts the three widgets together.
|
|
20
|
+
|
|
21
|
+
## Requirements
|
|
22
|
+
|
|
23
|
+
Your place in **Settings**. Around it, in **Settings → Data sources → Events**: how far (25 km by default), how many days ahead (14), what kinds of events, and the artists and shows you follow.
|
|
24
|
+
|
|
25
|
+
- **Basque Country and Navarre** (and the French Basque Country): nothing to sign up for. Kulturklik has the concerts, theatre, dance, exhibitions, films and children's shows of the whole region, in Spanish and Basque; the tourism agenda adds the fiestas, fairs and big festivals.
|
|
26
|
+
- **Murcia** (the municipality, its pedanías, and around it: Molina de Segura is 10 km from the centre): nothing to sign up for either. The city council's agenda has the concerts, plays, exhibitions, children's shows, talks and fiestas of the municipality, in Spanish. Its events come without a place of their own, so they are all placed at the city centre: the distance shown is to it, and "how far" counts from it.
|
|
27
|
+
- **Anywhere else**, or for more concerts and **ticket sale dates** here too: a free key from [developer.ticketmaster.com](https://developer.ticketmaster.com) (sign up, create an app, copy its *Consumer Key*) in the source's **Ticketmaster key** field. Without it, outside the Basque Country and Murcia the widgets say so.
|
|
28
|
+
|
|
29
|
+
## What it does on your machine
|
|
30
|
+
|
|
31
|
+
- **Internet**: `api.euskadi.eus` (Kulturklik), `opendata.euskadi.eus` (the tourism agenda and Kulturklik's pictures), `eventos.murcia.es` (Murcia's agenda: its calendar feeds, a few events' pages for their pictures, and the pictures), `app.ticketmaster.com` (only with your key) and `s1.ticketm.net` (Ticketmaster's pictures). Each is only asked where it has events. Nothing else; never your place's name, only its coordinates to Ticketmaster (rounded to about 150 m) and the province to Kulturklik; Murcia's agenda is asked the same whoever asks.
|
|
32
|
+
- **Files**: what it got, in its cache folder (RAM), so a restart asks nothing that isn't due; and which dates of your artists it has already seen (`seen.json` in its data folder), so it tells you only about new ones.
|
|
33
|
+
- **Your Ticketmaster key** is a secret field: masked in the editor, never logged, never in an error.
|
|
34
|
+
|
|
35
|
+
## Widgets
|
|
36
|
+
|
|
37
|
+
### What's on — `events/upcoming`
|
|
38
|
+
|
|
39
|
+
Soonest first, under each day's heading: the kind of event (an icon), the time, the title, the price and, on a wide tile, the venue; two lines on a tall tile, with the town and how far it is. **Coming up**, **today** or **this weekend** (Friday to Sunday; from Monday to Thursday, the coming one). A play or a concert on a few days in a row shows at its next performance. Your artists' dates are marked in the accent colour; a cancelled one is struck through. On a long bar it spreads over columns, so the rows stay readable across the room.
|
|
40
|
+
|
|
41
|
+
Filters, each tile its own: only some **kinds** (concerts, theatre, dance, exhibitions, children, festivals, films, talks, fairs, sport), **only free**, **at most this price**, **venues or towns** (`Kafe Antzokia, Getxo` or `!Bilborock`, with the venues it has seen offered as you type) and **words in the title** (`jazz, flamenco` or `!taller`).
|
|
42
|
+
|
|
43
|
+
 
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
### Your artists — `events/artists`
|
|
48
|
+
|
|
49
|
+
The next dates of the artists and shows you follow, with how long until each ("1 h 18", "12 days"; "today" for one with no time), where, and **when their tickets go on sale** (Ticketmaster says; the agendas don't). As far as you'd travel for them (400 km by default, an option of the source). As a sale opens it takes its tile over for an hour. A season or an exhibition of theirs that opened before today stays out, unless the source's **Also what is already on** is on: their dates are what you want to know.
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
### Spotlight — `events/spotlight`
|
|
54
|
+
|
|
55
|
+
One event at a time with its picture filling the tile: what, when and where, moving on every 15 seconds; on a touch screen, **a tap brings the next one**. Your artists first, then the soonest with a picture; one without a picture gets a poster of its kind. The same filters as *What's on*.
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+
## Alerts
|
|
60
|
+
|
|
61
|
+
From the source, about the artists and shows you follow only, never the rest of the agenda:
|
|
62
|
+
|
|
63
|
+
- **New date**: one of your artists announces a date within your distance (info, for three days). Adding a name doesn't announce every date it already had: only dates that appear after the first search.
|
|
64
|
+
- **Tickets on sale tomorrow at 10:00**: from a day before the sale opens (info), when the source says when (Ticketmaster).
|
|
65
|
+
- **Tickets on sale now**: at the moment it opens, with a chime (warn, for three hours).
|
|
66
|
+
|
|
67
|
+
They come while a widget of the plugin is on an enabled screen. To have them **with no widget shown**, turn on **Watch for alerts without a widget** for the Events source in **Settings → Data sources**: it is off until you do, and then asks as little as when shown.
|
|
68
|
+
|
|
69
|
+
## Data source
|
|
70
|
+
|
|
71
|
+
`events/agenda`, read every half hour, but each question is only asked again when it is due: **Kulturklik every 12 hours** (the provinces your circle reaches, up to six pages of 100 events each), **the tourism agenda once a day** (and only downloaded if it changed: `If-Modified-Since`), **Murcia's agenda every 6 hours** (see below), **Ticketmaster every 6 hours**; **each artist** you follow every 12 hours at each source that searches by name, a dozen names at most per read. After a failure, half an hour, or what the service says (`Retry-After`), showing the last good events meanwhile. A change of place, distance, days or kinds is asked at once.
|
|
72
|
+
|
|
73
|
+
| Option | |
|
|
74
|
+
|---|---|
|
|
75
|
+
| Artists and shows you follow | Up to 30, as they are billed ("Rosalía", "Bilbao BBK Live"). |
|
|
76
|
+
| What to look for | Kinds of events; empty for everything. |
|
|
77
|
+
| How far, days ahead | 25 km, 14 days. |
|
|
78
|
+
| Also what is already on | Exhibitions and seasons that opened before today. |
|
|
79
|
+
| Your artists: how far you would travel | 400 km; 0 for anywhere. |
|
|
80
|
+
| Ticketmaster key | Optional, secret. |
|
|
81
|
+
| Event texts in | Spanish or Basque, by Kiosko's language by default (advanced). |
|
|
82
|
+
| Sources | Kulturklik, the tourism agenda, Murcia's agenda, Ticketmaster (advanced). |
|
|
83
|
+
|
|
84
|
+
The same event in two sources (a concert on Kulturklik and Ticketmaster) is shown once, with the facts of both: the same day, a start within an hour and a half, titles that share most of their words, and the same venue or town.
|
|
85
|
+
|
|
86
|
+
### Murcia's agenda
|
|
87
|
+
|
|
88
|
+
[eventos.murcia.es](https://eventos.murcia.es) publishes iCalendar feeds "para que puedas utilizarlos desde aplicaciones externas" (its [`/kml.html`](https://eventos.murcia.es/kml.html) page), one per category, and its `robots.txt` allows them. The plugin asks a dozen of them, those of the kinds you look for (Música; Teatro and Humor; Danza; Exposiciones; Infantil; Festivales and Festejos; Cine; Conferencia; Mercadillo; Deportes), **one after another**, and, when you look for everything, the next fifty events of every kind as well (visits, workshops…, as *Other*). Each feed lists its category's coming events padded up to fifty with recent past ones: only what hasn't ended is kept, an exhibition still open included. An event in two feeds is shown once, of the most telling kind (for children before theatre, a concert before the fiesta it is part of, *Exhibitions* last). Its times come in UTC and are shown at Murcia's.
|
|
89
|
+
|
|
90
|
+
The feeds have no pictures: the plugin reads them from the events' own pages, from the description they carry for search engines (schema.org's `Event`, in JSON-LD) and **nothing else of the page** (whose scripts also carry the organiser's contact). Up to five pages a read, the soonest events first, each asked once (remembered across restarts with the rest of the agenda): **15 requests a read at most**, every 6 hours, so the spotlight gets its pictures over the first reads. A price is taken only when a line of that description says it plainly ("Precio: 25/35/45 €", "Entrada libre hasta completar aforo"); the Christmas programme's descriptions list the other activities of the day with their own prices, so a price in the middle of a line is left alone, and many events show none.
|
|
91
|
+
|
|
92
|
+
A feed that fails doesn't take the others: the plugin shows what that feed gave last time (while it runs) and logs it; only when every feed fails does the widget say the agenda can't be reached. Not used: Molina de Segura's agenda (its legal notice doesn't allow reuse without permission) and Cartagena's.
|
|
93
|
+
|
|
94
|
+
## Tested against
|
|
95
|
+
|
|
96
|
+
- **The real Kulturklik API and tourism agenda** on 4 December 2026: Bizkaia's upcoming events, a search by name and the whole tourism agenda. Their answers are recorded in `src/fixtures` (`scripts/capture.ts`, six requests) and the tests read them.
|
|
97
|
+
- **Ticketmaster: not against the real API.** Without a key, its tests read the examples of its documentation (`src/fixtures/ticketmaster-docs-*.json`) and the fields it documents (sale dates, presales, cancellations). The first time it runs with a real key, check that **Your artists** shows the sale dates.
|
|
98
|
+
- **Murcia's real agenda** on 5 December 2026: one read as the plugin does it, everything asked (twelve feeds, the next fifty and two events' pages: 15 requests, one after another, with the plugin's User-Agent). 123 events not over yet, through May 2027; 63 in the next 14 days: concerts, plays, children's shows, dance, exhibitions, talks, sport, and the next fifty's visits and workshops. The two pages gave their pictures (JPEG, 460 × 200, decoded by the canvas) and one a price ("Actividad gratuita"); another's "Acceso libre" was the description's list of the day's other activities, which is why prices are only read from the start of a line. Recorded feeds and a page, trimmed, are in `src/fixtures` (`murcia-*`), saved by hand; the page's own inline data, which carries the organiser's contact, is replaced there by made-up values. **Not tried in a Kiosko sandbox**: What's on and the spotlight were painted from that read in the tests' renderer, not on a panel.
|
|
99
|
+
- **A Kiosko 0.2.28 sandbox** with Bilbao as the place: the three widgets painted from Kulturklik's and the tourism agenda's live answers, two artists followed (their searches answered 23 and 8 dates), the spotlight's pictures downloaded, and a *New date* alert raised for a date the plugin hadn't seen.
|
|
100
|
+
|
|
101
|
+
## Credits and licences
|
|
102
|
+
|
|
103
|
+
- **Kulturklik** and **Euskadi's tourism agenda** are open data of the Basque Government, published on [Open Data Euskadi](https://opendata.euskadi.eus) under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). The widgets credit them ("Kulturklik · Turismo Euskadi · Open Data Euskadi") under the rows when there is room.
|
|
104
|
+
- **Murcia's agenda** belongs to the Ayuntamiento de Murcia, which publishes its calendar feeds for use from other applications ([eventos.murcia.es/kml.html](https://eventos.murcia.es/kml.html)). **Its licence could not be checked**: the site's legal page needs JavaScript to show anything, and no open-data licence is stated next to the feeds. The plugin credits it as "Ayuntamiento de Murcia (eventos.murcia.es)" ("Ayto. de Murcia" on a narrow tile), asks it a few times a day and keeps nothing longer than the agenda needs (its cache, in RAM). If the Ayuntamiento asks for something else, it will be done.
|
|
105
|
+
- **Ticketmaster**: event content is its organisers' and Ticketmaster's, used through the [Discovery API](https://developer.ticketmaster.com/products-and-docs/apis/discovery-api/v2/) under its [terms of use](https://developer.ticketmaster.com/support/terms-of-use/), with your own key; credited as "Ticketmaster" on what comes from it, and kept only as long as it is shown (hours).
|
|
106
|
+
|
|
107
|
+
## Development
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
npm test # the tests, on the recorded answers
|
|
111
|
+
npm run check # types
|
|
112
|
+
node --conditions=source scripts/screenshots.ts # docs/*.png from the sample data
|
|
113
|
+
node --conditions=source scripts/capture.ts # record the Basque answers again (six requests; don't loop it)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
MIT. The recorded answers in `src/fixtures` are their publishers' data (see NOTICE).
|