Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

The trouble with the rat-race is that even if you win, you're still a rat. -- Lily Tomlin


dovenet / Synchronet Javascript / Top-5 User Bulletin Generator

SubjectAuthor
* Top-5 User Bulletin GeneratorCodefenix
+* Top-5 User Bulletin GeneratorDigital Man
|`* Top-5 User Bulletin GeneratorCodefenix
| `* Top-5 User Bulletin GeneratorDigital Man
|  `- Top-5 User Bulletin GeneratorCodefenix
`* Top-5 User Bulletin GeneratorMRO
 `* Top-5 User Bulletin GeneratorCodefenix
  `* Top-5 User Bulletin GeneratorMRO
   `- Top-5 User Bulletin GeneratorFr333n3rgy

1
Top-5 User Bulletin Generator

<61E1F4EE.544.dove-net2012@conchaos.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=693&group=DOVE-Net.Synchronet_Javascript#693

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: All
Subject: Top-5 User Bulletin Generator
Message-ID: <61E1F4EE.544.dove-net2012@conchaos.synchro.net>
Date: Fri, 14 Jan 2022 10:10:54 -0500
X-Comment-To: All
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20220114141521-0800 41e0
WhenExported: 20220114165748-0800 41e0
ExportedFrom: VERT sync-js 3593
WhenImported: 20220114171054-0500 412c
WhenExported: 20220114171516-0500 412c
ExportedFrom: CONCHAOS dove-net2012 544
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Fri, 14 Jan 2022 15:10 UTC

As seen in the Facebook group this week, this is a javascript I came up with which parses Synchronet's log files and generates a MSG bulletin of the top 5 users in different categories (top five callers, top five posters, top five message readers, top five uploaders/downloaders, etc.).

https://github.com/CraigEMP/topfives.js

You can call it on the command line or as a timed event, specifiy "month" or "year" bulletins, and display the output to your users during login.

By default it outputs an animated bulletin containing AT codes to control the cursor movements and delays, but it can optionally write to a "simple" bulletin instead.

It works by doing a wildcard search of all the *.log files for the specified month/year in the /data/logs directory, keeps a tally of the stats within each. It ignores MS*.log files in an attempt to speed up the search, but as Rob/digital man pointed out, there are other log types which also should be skipped (FS*.log and http*.log), so I'll make an edit to the script very soon to ignore these as well. (thanks dm!)

I got the for it idea from seeing various top 5 and top 10 lists on other boards. I used to see them all the time on WWIV boards back in my hometown during the 90s, and they're fairly common today on a lot of Mystic boards. There are a few tools already available that generate similar lists for Synchronet (syncdoor, syncstat, and top10usr to name a few), but frankly the output from those is fairly lackluster in my opinion, so I decided to try my hand at making my own.

I hope people find it useful.

---
■ Synchronet ■ -=[ conchaos.synchro.net | ConstructiveChaos BBS ]=-

Top-5 User Bulletin Generator

<61E1FED8.3594.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=694&group=DOVE-Net.Synchronet_Javascript#694

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Codefenix
Subject: Top-5 User Bulletin Generator
Message-ID: <61E1FED8.3594.sync-js@vert.synchro.net>
Date: Fri, 14 Jan 2022 07:53:12 -0800
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61E1F4EE.544.dove-net2012@conchaos.synchro.net>
References: <61E1F4EE.544.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/635c258d2 Jan 13 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220114145312-0800 41e0
WhenExported: 20220114165748-0800 41e0
ExportedFrom: VERT sync-js 3594
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Fri, 14 Jan 2022 15:53 UTC

Re: Top-5 User Bulletin Generator
By: Codefenix to All on Fri Jan 14 2022 05:10 pm

> It works by doing a wildcard search of all the *.log files for the specified
> month/year in the /data/logs directory, keeps a tally of the stats within
> each. It ignores MS*.log files in an attempt to speed up the search, but as
> Rob/digital man pointed out, there are other log types which also should be
> skipped (FS*.log and http*.log), so I'll make an edit to the script very
> soon to ignore these as well. (thanks dm!)

As I mentioned on FB too, you probably should do an *inclusive* search (i.e. only files matching the pattern MMDDYY.log) rather than *excluding* files of other specific naming patterns. You never know when new *.log files may appear in the data/logs dir with other naming formats.

Also, did you consider the .lol files (same directory) - maybe they contain all the stats you need?
--
digital man (rob)

Sling Blade quote #16:
Karl Childers (to Doyle, re: lawn mower blade): I aim to kill you with it. Mmm.
Norco, CA WX: 76.3°F, 17.0% humidity, 5 mph WNW wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Top-5 User Bulletin Generator

<61E2237D.546.dove-net2012@conchaos.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=695&group=DOVE-Net.Synchronet_Javascript#695

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: Digital Man
Subject: Top-5 User Bulletin Generator
Message-ID: <61E2237D.546.dove-net2012@conchaos.synchro.net>
Date: Fri, 14 Jan 2022 13:29:33 -0500
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61E1FED8.3594.sync-js@vert.synchro.net>
References: <61E1FED8.3594.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20220114173037-0800 41e0
WhenExported: 20220114225755-0800 41e0
ExportedFrom: VERT sync-js 3595
WhenImported: 20220114202933-0500 412c
WhenExported: 20220114203034-0500 412c
ExportedFrom: CONCHAOS dove-net2012 546
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Fri, 14 Jan 2022 18:29 UTC

Re: Top-5 User Bulletin Generator
By: Digital Man to Codefenix on Fri Jan 14 2022 02:53 pm

DM> As I mentioned on FB too, you probably should do an *inclusive* search
DM> (i.e. only files matching the pattern MMDDYY.log) rather than *excluding*
DM> files of other specific naming patterns. You never know when new *.log
DM> files may appear in the data/logs dir with other naming formats.

That was my first thought as well, but I couldn't think of how the wildcard search pattern would look if only a year was specified for a yearly bulletin.
It would look like /sbbs/data/logs/*22.log, unless I'm overlooking something obvious.

DM> Also, did you consider the .lol files (same directory) - maybe they
DM> contain all the stats you need? --

I decided against the .lol files, since their status is "discouraged" on the http://wiki.synchro.net/ref:files page. Also, they don't track door usage.

---
■ Synchronet ■ -=[ conchaos.synchro.net | ConstructiveChaos BBS ]=-

Top-5 User Bulletin Generator

<61E22799.3596.sync-js@vert.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=696&group=DOVE-Net.Synchronet_Javascript#696

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: digital.man@VERT (Digital Man)
To: Codefenix
Subject: Top-5 User Bulletin Generator
Message-ID: <61E22799.3596.sync-js@vert.synchro.net>
Date: Fri, 14 Jan 2022 10:47:05 -0800
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: Vertrauen
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61E2237D.546.dove-net2012@conchaos.synchro.net>
References: <61E2237D.546.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/635c258d2 Jan 13 2022 MSC 1928
X-FTN-CHRS: CP437 2
WhenImported: 20220114174705-0800 41e0
WhenExported: 20220114225755-0800 41e0
ExportedFrom: VERT sync-js 3596
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Digital Man - Fri, 14 Jan 2022 18:47 UTC

Re: Top-5 User Bulletin Generator
By: Codefenix to Digital Man on Fri Jan 14 2022 08:29 pm

> Re: Top-5 User Bulletin Generator
> By: Digital Man to Codefenix on Fri Jan 14 2022 02:53 pm
>
> DM> As I mentioned on FB too, you probably should do an *inclusive* search
> DM> (i.e. only files matching the pattern MMDDYY.log) rather than
> DM> *excluding* files of other specific naming patterns. You never know
> DM> when new *.log files may appear in the data/logs dir with other naming
> DM> formats.
>
> That was my first thought as well, but I couldn't think of how the wildcard
> search pattern would look if only a year was specified for a yearly
> bulletin. It would look like /sbbs/data/logs/*22.log, unless I'm overlooking
> something obvious.

"????22.log" would be a valid glob/directory pattern to only match files with exactly 8 characters in the base filename and the last part matching "22.log". Even better would be to use a regular expression that matched against 8 decimal digits (e.g. /\d\d\d\d\d\d\d\d\.log/). There are lot of methods of comparing/matching against regexp's in JS, here's one:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test

> DM> Also, did you consider the .lol files (same directory) - maybe they
> DM> contain all the stats you need? --
>
> I decided against the .lol files, since their status is "discouraged" on the
> http://wiki.synchro.net/ref:files page. Also, they don't track door usage.

Ah. Cool. Just wanted to make sure you were aware of their existence. I suppose it could be extended to include door usage if there was any other issue with the .log files (e.g. performance).
--
digital man (rob)

Synchronet/BBS Terminology Definition #16:
CR = Carriage Return (ASCII 13, Ctrl-M)
Norco, CA WX: 69.7°F, 20.0% humidity, 14 mph ENE wind, 0.00 inches rain/24hrs
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net

Top-5 User Bulletin Generator

<61E223B8.3146.sync_js@bbses.info>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=697&group=DOVE-Net.Synchronet_Javascript#697

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: mro@VERT/BBSESINF (MRO)
To: Codefenix
Subject: Top-5 User Bulletin Generator
Message-ID: <61E223B8.3146.sync_js@bbses.info>
Date: Fri, 14 Jan 2022 12:30:32 -0600
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: bbses.info
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61E1F4EE.544.dove-net2012@conchaos.synchro.net>
References: <61E1F4EE.544.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20220114175447-0800 41e0
WhenExported: 20220114225755-0800 41e0
ExportedFrom: VERT sync-js 3597
WhenImported: 20220114193032-0600 4168
WhenExported: 20220114195444-0600 4168
ExportedFrom: BBSESINF sync_js 3146
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: MRO - Fri, 14 Jan 2022 18:30 UTC

Re: Top-5 User Bulletin Generator
By: Codefenix to All on Fri Jan 14 2022 05:10 pm

> As seen in the Facebook group this week, this is a javascript I came up with
> which parses Synchronet's log files and generates a MSG bulletin of the top
> 5 users in different categories (top five callers, top five posters, top

ew. facebook
---
■ Synchronet ■ ::: BBSES.info - free BBS services :::

Top-5 User Bulletin Generator

<61E2E9D2.550.dove-net2012@conchaos.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=698&group=DOVE-Net.Synchronet_Javascript#698

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: Digital Man
Subject: Top-5 User Bulletin Generator
Message-ID: <61E2E9D2.550.dove-net2012@conchaos.synchro.net>
Date: Sat, 15 Jan 2022 03:35:46 -0500
X-Comment-To: Digital Man
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61E22799.3596.sync-js@vert.synchro.net>
References: <61E22799.3596.sync-js@vert.synchro.net>
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20220115074322-0800 41e0
WhenExported: 20220115105753-0800 41e0
ExportedFrom: VERT sync-js 3599
WhenImported: 20220115103546-0500 412c
WhenExported: 20220115104317-0500 412c
ExportedFrom: CONCHAOS dove-net2012 550
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Sat, 15 Jan 2022 08:35 UTC

Re: Top-5 User Bulletin Generator
By: Digital Man to Codefenix on Fri Jan 14 2022 05:47 pm

DM> "????22.log" would be a valid glob/directory pattern to only match files
DM> with exactly 8 characters in the base filename and the last part matching
DM> "22.log". Even better would be to use a regular expression

Awesome. The question mark notation of "????22.log" works great and is what I ended up going with. I updated the code on git.

I may revisit with a regex approach at some point, but this certainly does the job for now. :)

Thanks again!

---
■ Synchronet ■ -=[ conchaos.synchro.net | ConstructiveChaos BBS ]=-

Top-5 User Bulletin Generator

<61E2EB4F.551.dove-net2012@conchaos.synchro.net>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=699&group=DOVE-Net.Synchronet_Javascript#699

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: codefenix@VERT/CONCHAOS (Codefenix)
To: MRO
Subject: Top-5 User Bulletin Generator
Message-ID: <61E2EB4F.551.dove-net2012@conchaos.synchro.net>
Date: Sat, 15 Jan 2022 03:42:07 -0500
X-Comment-To: MRO
Path: rocksolidbbs.com!not-for-mail
Organization: ConstructiveChaos BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61E223B8.3146.sync_js@bbses.info>
References: <61E223B8.3146.sync_js@bbses.info>
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20220115074322-0800 41e0
WhenExported: 20220115105753-0800 41e0
ExportedFrom: VERT sync-js 3600
WhenImported: 20220115104207-0500 412c
WhenExported: 20220115104317-0500 412c
ExportedFrom: CONCHAOS dove-net2012 551
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Codefenix - Sat, 15 Jan 2022 08:42 UTC

Re: Top-5 User Bulletin Generator
By: MRO to Codefenix on Fri Jan 14 2022 07:30 pm

MR> ew. facebook

I know. I have no excuse.

I initially posted a quick demo of the script's output to my board's FB page, and then shared that post to the Synchronet FB group. When people asked if I would share the script, I made a second post on the FB group after I felt the script was ready to be shared.

Now I realize it was all better off originating here in this DOVE-Net sub.

Oh well.

---
■ Synchronet ■ -=[ conchaos.synchro.net | ConstructiveChaos BBS ]=-

Top-5 User Bulletin Generator

<61E3498E.3152.sync_js@bbses.info>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=700&group=DOVE-Net.Synchronet_Javascript#700

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: mro@VERT/BBSESINF (MRO)
To: Codefenix
Subject: Top-5 User Bulletin Generator
Message-ID: <61E3498E.3152.sync_js@bbses.info>
Date: Sat, 15 Jan 2022 09:24:14 -0600
X-Comment-To: Codefenix
Path: rocksolidbbs.com!not-for-mail
Organization: bbses.info
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61E2EB4F.551.dove-net2012@conchaos.synchro.net>
References: <61E2EB4F.551.dove-net2012@conchaos.synchro.net>
X-FTN-PID: Synchronet 3.18b-Win32 Sep 20 2020 MSC 1927
X-FTN-CHRS: CP437 2
WhenImported: 20220115142450-0800 41e0
WhenExported: 20220115225752-0800 41e0
ExportedFrom: VERT sync-js 3601
WhenImported: 20220115162414-0600 4168
WhenExported: 20220115162448-0600 4168
ExportedFrom: BBSESINF sync_js 3152
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: MRO - Sat, 15 Jan 2022 15:24 UTC

Re: Top-5 User Bulletin Generator
By: Codefenix to MRO on Sat Jan 15 2022 10:42 am

> Re: Top-5 User Bulletin Generator
> By: MRO to Codefenix on Fri Jan 14 2022 07:30 pm
>
> MR> ew. facebook
>
> I know. I have no excuse.
>
> I initially posted a quick demo of the script's output to my board's FB
> page, and then shared that post to the Synchronet FB group. When people
> asked if I would share the script, I made a second post on the FB group
> after I felt the script was ready to be shared.
>
> Now I realize it was all better off originating here in this DOVE-Net
>
> sub.
>
> Oh well.

i think we should just make a telegram group for synchronet.
today i setup a telegram to irc gateway and they could do that with irc.synchro.net and a telgram group.
it's pretty cool. pasted pics and videos work.

i think we should all abandon facebook. i know it's hard because everyone's using it but facebook isnt our friend.

---
■ Synchronet ■ ::: BBSES.info - free BBS services :::

Top-5 User Bulletin Generator

<61E78389.11.dove-syncjs@theoraclebbs.com>

  copy mid

https://www.rocksolidbbs.com/dovenet/article-flat.php?id=701&group=DOVE-Net.Synchronet_Javascript#701

  copy link   Newsgroups: DOVE-Net.Synchronet_Javascript
From: fr333n3rgy@VERT/ORACLE (Fr333n3rgy)
To: MRO
Subject: Top-5 User Bulletin Generator
Message-ID: <61E78389.11.dove-syncjs@theoraclebbs.com>
Date: Tue, 18 Jan 2022 15:20:41 -0500
X-Comment-To: MRO
Path: rocksolidbbs.com!not-for-mail
Organization: The Oracle BBS
Newsgroups: DOVE-Net.Synchronet_Javascript
In-Reply-To: <61E3498E.3152.sync_js@bbses.info>
References: <61E3498E.3152.sync_js@bbses.info>
X-FTN-PID: Synchronet 3.19c-Linux master/063d47003 Jan 13 2022 GCC 7.5.0
X-FTN-CHRS: CP437 2
WhenImported: 20220118221426-0800 41e0
WhenExported: 20220118225753-0800 41e0
ExportedFrom: VERT sync-js 3603
WhenImported: 20220118222041-0500 412c
WhenExported: 20220119011420-0500 412c
ExportedFrom: ORACLE dove-syncjs 11
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
 by: Fr333n3rgy - Tue, 18 Jan 2022 20:20 UTC

Re: Top-5 User Bulletin Generator
By: MRO to Codefenix on Sat Jan 15 2022 04:24 pm

> i think we should all abandon facebook. i know it's hard because everyone's
> using it but facebook isnt our friend.

100% agree - in my household facebook.com is blacklisted lol.

Time to move on :-)

---
■ Synchronet ■ The Oracle BBS

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor