mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-17 01:19:31 +01:00
e7d3a543c4
Amazing factoids being created in #wordle by JAA and emanuele6. jaa-guesses2wordles: /call wordles &{jaasolve-state2pattern &{jaa-guesses2state '&{wordle guesses | {stripircformatting}}' $arg[-1]}} &{wordle info | {sed s/ \(.*$//} | {sed s/^.* //}} jaa-guesses2state: /code sh shopt -s extglob; declare -A _m=(\* G \? Y \ B);_w=" ${1//ẞ/ß}" _w=${_w,,} _o=; while [[ "${_w}" ]]; do _g= _r= _w=${_w:1}; while [[ "${_w}" == ' '?[\ ?*]* ]]; do _g+=${_w:1:1} _r+=${_m["${_w:2:1}"]} _w=${_w:3}; done; _o=$_o${_o:+.}$_g.$_r; done; _o=${_o%.+([^.]).+(G)}; for ((_i = ${2:-0}; _i > 0; --_i)); do _o=${_o%.+([^.]).+([GYB])}; done; printf %s\\n "$_o" wsg: /call call &{func grep wordle wordle &{wordle start &{clength $arg[0]} $arg[1]}} guess $arg[0] clength: /code sh printf %s "${#1}" rspray: /call func sed s/Le.*?:.*?@//g Le:&{wordle start}@&{wordle guess &{rw}}@&{wordle guess &{rw}}@&{wordle guess &{rw}}@&{wordle guess &{rw}} rw: /code sh _len="${1:-5}" ; _list="${2:-american}" ; grep -P ^.{$_len}$ /usr/share/dict/$_list | shuf -n 1 Also megaspray, megasolve, jaasolve, wsgl, and more!
43 lines
1.1 KiB
Perl
43 lines
1.1 KiB
Perl
# File: VERSION.pm
|
|
#
|
|
# Purpose: Sets the PBot version constants.
|
|
#
|
|
# Rather than each PBot::Core package having its own version identifier, all
|
|
# of PBot is considered a single package. The BUILD_REVISION constant is the
|
|
# count of git commits to the PBot repository.
|
|
#
|
|
# See also the version command in PBot::Core::Commands::Version. It can compare
|
|
# the local PBot version against latest version on GitHub (or the URL in
|
|
# the `version.check_url` registry entry) to notify users of the availability
|
|
# of a new version.
|
|
#
|
|
# TODO: The PBot::Plugin::* plugins probably should have their own version
|
|
# identifiers as a template for versioned $HOME/PBot/Plugin/ plugins.
|
|
|
|
# SPDX-FileCopyrightText: 2001-2023 Pragmatic Software <pragma78@gmail.com>
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
package PBot::VERSION;
|
|
use parent 'PBot::Core::Class';
|
|
|
|
use PBot::Imports;
|
|
|
|
# These are set by the /misc/update_version script
|
|
use constant {
|
|
BUILD_NAME => "PBot",
|
|
BUILD_REVISION => 4819,
|
|
BUILD_DATE => "2024-10-30",
|
|
};
|
|
|
|
sub initialize {}
|
|
|
|
sub version {
|
|
return BUILD_NAME . ' version ' . BUILD_REVISION . ' ' . BUILD_DATE;
|
|
}
|
|
|
|
sub revision {
|
|
return BUILD_REVISION;
|
|
}
|
|
|
|
1;
|