Wikipedia search command (!wp), version 0.43.0
- Add !wp <search terms> command: searches Wikipedia via MediaWiki API (action=query&list=search), displays article titles, snippets, and links. Single-result mode fetches the first chapter via Extracts API (exchars=800); multi-result mode shows a numbered list with short snippets and per-result Read full article links. - Add self-contained JSON parser helpers: wp_json_get_string(), wp_json_next_array_item(), wp_decode_json_string() with \uXXXX Unicode support. - Add wp_url_encode() (RFC 3986), wp_codepoint_to_utf8(), wp_strip_html(), wp_collapse_spaces(), wp_hex_digit(). - Add WITH_WP CMake feature toggle (ON by default, HAS_CMD_WP compile def). - Add !wp to the !help command listing. - Add doc comments to all 9 functions in cmd_wp.h. - Update CHANGELOG.md with 0.43.0 entry. - Update README.md: add Wikipedia to features list, feature toggles table, IRC commands utilities table, and minimal build command.
This commit is contained in:
parent
4dbdd9bdde
commit
19b07fa76f
7 changed files with 443 additions and 5 deletions
3
zynk.c
3
zynk.c
|
|
@ -780,6 +780,9 @@ const char *json_find(const char *haystack, const char *key) {
|
|||
#ifdef HAS_CMD_YT
|
||||
#include "cmd_yt.h"
|
||||
#endif
|
||||
#ifdef HAS_CMD_WP
|
||||
#include "cmd_wp.h"
|
||||
#endif
|
||||
#ifdef HAS_CMD_GREETING_OR_CHAT
|
||||
#include "cmd_greeting_or_chat.h"
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue