Skip to content

Commit

Permalink
core: store microseconds in buffer lines (closes #649)
Browse files Browse the repository at this point in the history
  • Loading branch information
flashcode committed Dec 26, 2023
1 parent 57f80a4 commit 9fb3d3f
Show file tree
Hide file tree
Showing 97 changed files with 3,557 additions and 809 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.adoc
Expand Up @@ -15,6 +15,7 @@ For a list of important changes that require manual actions, please look at rele

New features::

* core: store microseconds in buffer lines (issue #649)
* core: evaluate expressions even when the suffix is missing ("}" by default) (issue #2042, issue #1714)
* core: add syntax highlighting in evaluation of expressions with `raw_hl:string` and `hl:string`, add option weechat.color.eval_syntax_colors (issue #2042)
* core: add option `search_history` in command `/input`, add key kbd:[Ctrl+r] to search in commands history, add key context "histsearch" (issue #2040)
Expand All @@ -26,6 +27,8 @@ New features::
* core: display only version with command `/version`, add options `-o` and `-ol` in command `/upgrade`
* core: add number of processes in command `/sys waitpid`
* core, alias, trigger: allow wildcard in commands `/bar`, `/item`, `/proxy`, `/alias` and `/trigger` (issue #1956)
* api: add functions util_strftimeval, printf_datetime_tags, printf_y_datetime_tags (issue #649)
* api: add argument "date_usec" in hook_print callback (issue #649)
* api: add property "type" in function buffer_get_string
* api: add info "mouse"
* buflist: jump to previous/next buffer displayed in buflist item with ctrl+wheel up/down on a buflist item (issue #1473)
Expand All @@ -37,6 +40,7 @@ New features::
* irc: add tags "nick_xxx" and "host_xxx" in all messages, including self and server messages
* irc: add option irc.look.ignore_tag_messages (issue #989)
* relay: change default value of option relay.network.tls_priorities to `NORMAL`
* trigger: change format of variables `${tg_date}` from "%Y-%m-%d %H:%M:%S" to "%FT%T.%f" (issue #649)
* trigger: rename local variable "trigger_filter" to "filter" on monitor buffer (issue #2037)

Bug fixes::
Expand Down
14 changes: 14 additions & 0 deletions ReleaseNotes.adoc
Expand Up @@ -14,6 +14,20 @@ For a complete list of changes, please look at ChangeLog.
[[v4.2.0]]
== Version 4.2.0 (under dev)

[[v4.2.0_lines_microseconds]]
=== Microseconds in buffer lines

Microseconds have been added in buffer lines (for both date and printed date).

Here are the changes that could affect plugins and scripts:

* hook_print: the C callback receives a new argument "date_usec" (microseconds
of date), after the argument "date" (scripting API is unchanged: the
microseconds are not available)
* trigger of types "print" and "timer": the format of variable `${tg_date}` is
changed from `%Y-%m-%d %H:%M:%S` to `%FT%T.%f` (where `%f` is the number of
microseconds on 6 digits)

[[v4.2.0_irc_anti_flood]]
=== IRC anti-flood

Expand Down
2 changes: 2 additions & 0 deletions doc/de/weechat_scripting.de.adoc
Expand Up @@ -664,8 +664,10 @@ Liste der Skript API Funktionen:
color +
print (für Python: prnt) +
print_date_tags (für Python: prnt_date_tags) +
print_datetime_tags (für Python: prnt_datetime_tags) +
print_y (für Python: prnt_y) +
print_y_date_tags (für Python: prnt_y_date_tags) +
print_y_datetime_tags (für Python: prnt_y_datetime_tags) +
log_print

| Hooks
Expand Down
12 changes: 9 additions & 3 deletions doc/de/weechat_user.de.adoc
Expand Up @@ -5284,7 +5284,7 @@ Wenn _var_ nicht angegeben ist, wird die Standardvariable verwendet, sie hängt
| signal | tg_signal_data |
| hsignal | |
| modifier | tg_string | tg_string
| line | message | buffer, buffer_name, y, date, date_printed, str_time, tags, notify_level, highlight, prefix, message
| line | message | buffer, buffer_name, y, date, date_usec, date_printed, date_usec_printed, str_time, tags, notify_level, highlight, prefix, message
| print | tg_message |
| command | tg_argv_eol1 |
| command_run | tg_command |
Expand Down Expand Up @@ -5447,7 +5447,11 @@ Der Callback von "line" legt folgende Variablen in der Hashtable an:
| buffer_type | string | Buffertyp ("formatted" oder "free").
| y | string | Zeilennummer bei einem Buffer mit freier Einteilung (≥ 0), -1 für einen Buffer mit formatiertem Inhalt.
| date | string | Datum der Zeile (Zeitstempel).
// TRANSLATION MISSING
| date_usec | string | Microseconds of line date.
| date_printed | string | Datum wann die Zeile dargestellt wurde (Zeitstempel).
// TRANSLATION MISSING
| date_usec_printed | string | Microseconds of date when line was displayed.
| str_time | string | Datum für Darstellung. Kann Farbkodierungen erhalten.
| tags | string | Tags einer Nachricht (Komma wird automatisch zu Beginn und Ende den Tags hinzugefügt).
| displayed | string | "1" wenn Zeile dargestellt wird, "0" wenn Zeile gefiltert wird.
Expand Down Expand Up @@ -5486,7 +5490,8 @@ Der Callback von "print" legt folgende Variablen in der Hashtable an:
|===
| Variable | Typ | Beschreibung
| buffer | pointer | Buffer.
| tg_date | string | Datum/Uhrzeit der Nachricht (Format: `YYYY-MM-DD hh:mm:ss`).
// TRANSLATION MISSING
| tg_date | string | Datum/Uhrzeit der Nachricht (Format: `%FT%T.%f`, see link:weechat_plugin_api.en.html#_util_strftimeval[WeeChat plugin API reference / util_strftimeval ^↗^^]).
| tg_displayed | string | "1" wenn Nachricht dargestellt wird, "0" falls Nachricht gefiltert wird.
| tg_highlight | string | "1" falls es sich um eine Highlight-Nachricht handelt, andernfalls "0".
| tg_prefix | string | Präfix.
Expand Down Expand Up @@ -5551,7 +5556,8 @@ Der Callback von "timer" legt folgende Variablen in der Hashtable an:
|===
| Variable | Typ | Beschreibung
| tg_remaining_calls | string | Anzahl der noch ausstehenden Aufrufe.
| tg_date | string | aktuelles Datum und Uhrzeit (Format: `YYYY-MM-DD hh:mm:ss`).
// TRANSLATION MISSING
| tg_date | string | aktuelles Datum und Uhrzeit (Format: `%FT%T.%f`, see link:weechat_plugin_api.en.html#_util_strftimeval[WeeChat plugin API reference / util_strftimeval ^↗^^]).
|===

[[trigger_data_config]]
Expand Down

0 comments on commit 9fb3d3f

Please sign in to comment.