dates2wiki turns a date written for humans into the template that links it on my web: select the date anywhere on the screen, press Ctrl+Alt+D, and the selection is replaced by its {{thisday}} or {{thesedays}} call. It keeps the company of bib2wiki and keys2wiki.
Written with Claude Opus 5 on 3 August (2026) for KDE Plasma 6 on X11. Version 1.1.
| You select | You get | which renders as |
|---|---|---|
| 5 September 2024 | {{thisday|5|September|2024}} |
5 September (2024) |
| September 5, 2024 | {{thisday|5|September|2024}} |
the same, and so does 2024-09-05
|
| October 16 to 18, 2026 | {{thesedays|16|18|October|2026}} |
16–18 October (2026) |
| 30 October to 2 November 2026 | {{thesedays|30|October|2|November|2026}} |
30 October–2 November (2026) |
| 23 November 1876, Cádiz, Spain – 14 November 1946, Alta Gracia | {{thisday|23|November|1876}}—{{thisday|14|November|1946}} |
23 November (1876)—14 November (1946) |
Two different years is not a span, so a lifespan comes out as two {{thisday}} joined by an em-dash, and the text in between is dropped. Months are also read in Spanish and French, so 16 al 18 de octubre de 2026 works too. Numeric dates such as 5/9/2024 are deliberately not parsed: day-month and month-day cannot be told apart.
dates2wiki '5 September 2024' # convert its arguments dates2wiki < file # ...or stdin dates2wiki --paste # convert the selection and paste it back (Ctrl+Alt+D) dates2wiki --copy # ...to the clipboard only dates2wiki --inplace # keep the sentence, rewrite only the dates
With --inplace, « We met on 5 September 2024 in Madrid » keeps its prose and only the date becomes a template.
xclip and xprop. The script is ~/bin/dates2wiki; the shortcut is ~/.local/share/applications/net.local.dates2wiki.desktop declared in ~/.config/kglobalshortcutsrc, the same way as TeX2unicode.xdotool, which rewrites the keymap and wrecks a multiple-layout keyboard. Which keystroke that is depends on the application (Ctrl+Y in Emacs, Ctrl+Shift+V in a terminal).