Sfoglia il codice sorgente

1.0a: fix lone wolf role, eggdrop help text, manual prompt

- Social roles: the lone wolf has fewer close contacts than most regulars
  and is never the connector (it used to name the busiest nick).
- eggdrop-pisg.tcl: !pisghelp pisgstats describes what the command does
  since 1.0a (gives the page address, open to everyone, channel only).
- Manual: shell prompt no longer says pisg-0.37; pisg-doc.html rebuilt.
- CHANGELOG.md and docs/Changelog record these and the Makefile changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Seb 4 giorni fa
parent
commit
b0e05f699a
6 ha cambiato i file con 24 aggiunte e 7 eliminazioni
  1. 6 1
      CHANGELOG.md
  2. 4 1
      docs/Changelog
  3. 1 1
      docs/pisg-doc.html
  4. 1 1
      docs/pisg-doc.xml
  5. 10 1
      modules/Pisg/Insights.pm
  6. 2 2
      scripts/eggdrop-pisg.tcl

+ 6 - 1
CHANGELOG.md

@@ -67,8 +67,11 @@ default — see *Upgrading* below if you want the old page exactly.
 - Pages are responsive from 360 px phones to wide screens and use full UTF-8 with
 - Pages are responsive from 360 px phones to wide screens and use full UTF-8 with
   `<set Charset="utf-8">`.
   `<set Charset="utf-8">`.
 - `eggdrop-pisg.tcl`: `!pisgstats` is open to everyone and no longer runs pisg inside the
 - `eggdrop-pisg.tcl`: `!pisgstats` is open to everyone and no longer runs pisg inside the
-  bot; the old timer is off by default.
+  bot (`!pisghelp pisgstats` says so); the old timer is off by default.
 - The version string is `1.0a` (pages say *Stats generated by pisg v1.0a*).
 - The version string is `1.0a` (pages say *Stats generated by pisg v1.0a*).
+- `docs/Makefile` builds the manual with `docs/xml2html.py`; `make release` packs
+  `setup.pl`, `CHANGELOG.md`, the release notes and the new scripts, and no longer the removed
+  `gfx/` images.
 
 
 ### Removed
 ### Removed
 
 
@@ -83,6 +86,8 @@ default — see *Upgrading* below if you want the old page exactly.
 - An error in one channel no longer leaks its nick aliases into the next.
 - An error in one channel no longer leaks its nick aliases into the next.
 - Long quotes are cut on a character boundary, so UTF-8 is no longer split in half.
 - Long quotes are cut on a character boundary, so UTF-8 is no longer split in half.
 - "Most used words" no longer lists punctuation or ASCII art.
 - "Most used words" no longer lists punctuation or ASCII art.
+- *Social roles*: the lone wolf is someone with fewer close contacts than most regulars, and never
+  the connector (it used to name the busiest nick, who is usually connected to everyone).
 - Tables share one left edge; column titles and "3 days ago" stay on one line.
 - Tables share one left edge; column titles and "3 days ago" stay on one line.
 
 
 ### Upgrading
 ### Upgrading

+ 4 - 1
docs/Changelog

@@ -60,7 +60,8 @@ pisg (1.0a) - Mon Sep, 21st 2026
       to include; your own <user> lines always win. It has its own tests.
       to include; your own <user> lines always win. It has its own tests.
     * eggdrop-pisg.tcl: !pisgstats is open to everybody, gives the right address
     * eggdrop-pisg.tcl: !pisgstats is open to everybody, gives the right address
       and no longer runs pisg inside the bot; the broken timer (it posted to a nick
       and no longer runs pisg inside the bot; the broken timer (it posted to a nick
-      called "gchan" and ran pisg a second time) is off by default.
+      called "gchan" and ran pisg a second time) is off by default. !pisghelp
+      pisgstats describes it that way.
     Fixes:
     Fixes:
     * A page is now written to a temporary file and moved into place only when
     * A page is now written to a temporary file and moved into place only when
       it is complete, so an error can no longer leave a half-written page. pisg
       it is complete, so an error can no longer leave a half-written page. pisg
@@ -70,6 +71,8 @@ pisg (1.0a) - Mon Sep, 21st 2026
     * A section that fails is skipped with a warning instead of stopping pisg.
     * A section that fails is skipped with a warning instead of stopping pisg.
     * An error in one channel no longer leaks its nick aliases into the next.
     * An error in one channel no longer leaks its nick aliases into the next.
     * "Most used words" no longer lists punctuation or ASCII art as words.
     * "Most used words" no longer lists punctuation or ASCII art as words.
+    * Social roles: the lone wolf has fewer close contacts than most regulars
+      and is never the connector (it used to name the busiest nick).
     * Tables share one left edge; column titles and "3 days ago" stay on one
     * Tables share one left edge; column titles and "3 days ago" stay on one
       line; the default user picture is shown as a small faded placeholder; no
       line; the default user picture is shown as a small faded placeholder; no
       useless sideways scrollbars in the sections (checked from 360 to 1280 px).
       useless sideways scrollbars in the sections (checked from 360 to 1280 px).

+ 1 - 1
docs/pisg-doc.html

@@ -230,7 +230,7 @@ nav .opts a { display:inline-block; margin:.1rem .6rem .1rem 0; font-size:.85rem
     then you simply run pisg on the command-line.</p>
     then you simply run pisg on the command-line.</p>
 <p>Using Linux, BSD or another UNIX-like system:
 <p>Using Linux, BSD or another UNIX-like system:
 
 
-    <pre>user@host:pisg-0.37$ ./pisg</pre></p>
+    <pre>user@host:~/pisg$ ./pisg</pre></p>
 <p>Using Windows:
 <p>Using Windows:
     <pre>c:\pisg&gt; perl pisg</pre></p>
     <pre>c:\pisg&gt; perl pisg</pre></p>
 <p>The program will run and parse the logfiles you specified in the
 <p>The program will run and parse the logfiles you specified in the

+ 1 - 1
docs/pisg-doc.xml

@@ -322,7 +322,7 @@
     Using Linux, BSD or another UNIX-like system:
     Using Linux, BSD or another UNIX-like system:
 
 
     <screen>
     <screen>
-    <prompt>user@host:pisg-0.37$</prompt> <userinput>./pisg</userinput>
+    <prompt>user@host:~/pisg$</prompt> <userinput>./pisg</userinput>
     </screen>
     </screen>
     </para>
     </para>
 
 

+ 10 - 1
modules/Pisg/Insights.pm

@@ -421,9 +421,18 @@ sub _insights_roles
     push @roles, [ 'role_outgoing', $n, $self->_template_text('role_outgoing_v', pct => sprintf('%.0f', $v)) ] if $n and $v;
     push @roles, [ 'role_outgoing', $n, $self->_template_text('role_outgoing_v', pct => sprintf('%.0f', $v)) ] if $n and $v;
     ($n, $v) = $best->(sub { $strong->($_[0]) });
     ($n, $v) = $best->(sub { $strong->($_[0]) });
     push @roles, [ 'role_connector', $n, $self->_template_text('role_connector_v', n => $v) ] if $n and $v;
     push @roles, [ 'role_connector', $n, $self->_template_text('role_connector_v', n => $v) ] if $n and $v;
+    my $connector = $n;
     ($n, $v) = $best->(sub { $r->{listen}{ $_[0] } || 0 });
     ($n, $v) = $best->(sub { $r->{listen}{ $_[0] } || 0 });
     push @roles, [ 'role_listener', $n, $self->_template_text('role_listener_v', n => $self->_ins_num($v)) ] if $n and $v;
     push @roles, [ 'role_listener', $n, $self->_template_text('role_listener_v', n => $self->_ins_num($v)) ] if $n and $v;
-    ($n, $v) = $best->(sub { $st->{lines}{ $_[0] } / (1 + $strong->($_[0])) });
+    # Lone wolf: someone with fewer close contacts than the typical regular, never the connector.
+    # (Lines per contact alone always picks the busiest nick, who usually knows everybody.)
+    my @contacts = sort { $a <=> $b } map { $strong->($_) } @pool;
+    my $median = $contacts[ int($#contacts / 2) ];
+    ($n, $v) = $best->(sub {
+        my $c = $strong->($_[0]);
+        return undef if defined $connector and $_[0] eq $connector or $c >= $median;
+        return $st->{lines}{ $_[0] } / (1 + $c);
+    });
     push @roles, [ 'role_lonewolf', $n, $self->_template_text('role_lonewolf_v', lines => $self->_ins_num($st->{lines}{$n}), n => $strong->($n)) ] if $n;
     push @roles, [ 'role_lonewolf', $n, $self->_template_text('role_lonewolf_v', lines => $self->_ins_num($st->{lines}{$n}), n => $strong->($n)) ] if $n;
     return unless @roles;
     return unless @roles;
 
 

+ 2 - 2
scripts/eggdrop-pisg.tcl

@@ -334,7 +334,7 @@ namespace eval pisg {
             pisgshow {"pisgshow [name]: shows a profile. Without a name, shows yours."}
             pisgshow {"pisgshow [name]: shows a profile. Without a name, shows yours."}
             pisgdel {"pisgdel: deletes your own profile, so your picture, link and merged nicks are removed from the stats."}
             pisgdel {"pisgdel: deletes your own profile, so your picture, link and merged nicks are removed from the stats."}
             pisgdeluser {"pisgdeluser <name>: bot masters only: deletes anybody's profile."}
             pisgdeluser {"pisgdeluser <name>: bot masters only: deletes anybody's profile."}
-            pisgstats {"pisgstats: regenerates the stats now and gives the address (friends of the bot only)."}
+            pisgstats {"pisgstats: gives the address of this channel's stats page. Channel only, open to everyone."}
         }
         }
     }
     }
     proc cmd_help {nick acct isadmin arg} {
     proc cmd_help {nick acct isadmin arg} {
@@ -387,7 +387,7 @@ namespace eval pisg {
         bind msg - "pisg$c"            ::pisg::msg_$c
         bind msg - "pisg$c"            ::pisg::msg_$c
     }
     }
 
 
-    # The original command, kept: regenerate the stats now and give the link.
+    # The original command, kept: give the link to this channel's stats page.
     # Open to everyone: it only points at the page the hourly cron job keeps fresh (it used to run
     # Open to everyone: it only points at the page the hourly cron job keeps fresh (it used to run
     # pisg inside the bot, which froze the bot for the length of the run and stayed silent
     # pisg inside the bot, which froze the bot for the length of the run and stayed silent
     # for anyone without the f flag).
     # for anyone without the f flag).