Add README and MIT license

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Alex 2026-07-27 18:22:42 +02:00
parent 1f4bce1e95
commit cccef9e985
3 changed files with 61 additions and 1 deletions

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Alex Sirac
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

38
README.md Normal file
View file

@ -0,0 +1,38 @@
# event-creator
A Violentmonkey userscript: select any text on any webpage, and turn it into a downloadable `.ics` calendar event.
Built for event listing sites (concert venues, theaters, local agendas) where the date, time, and location are just scattered in the page text — no need to type anything by hand.
## Install
1. Install [Violentmonkey](https://violentmonkey.github.io/) (Chrome, Firefox, Edge).
2. Install the script from the raw file: [event-creator.user.js](https://raw.githubusercontent.com/alexture/event-creator/main/event-creator.user.js) — Violentmonkey will prompt to install it.
The script auto-updates itself from this repo (via `@updateURL`), so you don't need to reinstall it when it changes.
## Usage
1. Select text containing the event info (title, date, time, location…) anywhere on any page.
2. Click the "Créer événement" bubble that appears above your selection.
3. Check/fix the fields in the popup — title, date, time(s), recurrence, location, description.
4. Click "Télécharger .ics" to download the file, then open it to add it to your calendar app.
## What it parses
- **Title**: first line of the selection that isn't a date/UI text ("Détails", "Réserver"…)
- **Date & time(s)**: French natural language ("15 mars 2026", "samedi 20 juin", "20h30", "20h30 - 22h30"), via [chrono-node](https://github.com/wanasit/chrono)
- **Multiple time ranges**: e.g. a listing with several showtimes — each becomes its own event in the `.ics` file
- **Recurrence**: "tous les mardis", "chaque semaine", "jusqu'au 20 juin" → weekly/daily/monthly/yearly `RRULE`, with an end date
- **Location**: a line with a venue keyword (salle, théâtre, cinéma, café…), a line starting with "à/au/chez", or a `Localisation` label followed by venue + address
- **All-day events**: when no time is found
- Everything is editable before download — the parsing is a best-effort starting point, not gospel
## Notes
- Single self-contained file — chrono-node is bundled in directly (built with esbuild from the npm package), so there's no runtime dependency on an external CDN.
- `@match *://*/*` — works on any site.
## License
MIT — see [LICENSE](LICENSE).

View file

@ -1,8 +1,9 @@
// ==UserScript==
// @name event-creator
// @namespace https://alexsirac.com
// @version 3.1
// @version 3.2
// @description Sélectionner du texte pour créer un événement ICS
// @license MIT
// @match *://*/*
// @updateURL https://raw.githubusercontent.com/alexture/event-creator/main/event-creator.user.js
// @downloadURL https://raw.githubusercontent.com/alexture/event-creator/main/event-creator.user.js