• Top-5 User Bulletin Generator

    From Codefenix@VERT/CONCHAOS to All on Fri Jan 14 17:10:54 2022
    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 ]=-
  • From Digital Man@VERT to Codefenix on Fri Jan 14 14:53:12 2022
    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
  • From Codefenix@VERT/CONCHAOS to Digital Man on Fri Jan 14 20:29:33 2022
    Re: Top-5 User Bulletin Generator
    By: Digital Man to Codefenix on Fri Jan 14 2022 02:53 pm

    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.

    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.

    Also, did you consider the .lol files (same directory) - maybe they 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 ]=-
  • From Digital Man@VERT to Codefenix on Fri Jan 14 17:47:05 2022
    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

    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.

    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


    Also, did you consider the .lol files (same directory) - maybe they 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
  • From MRO@VERT/BBSESINF to Codefenix on Fri Jan 14 19:30:32 2022
    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 :::
  • From Codefenix@VERT/CONCHAOS to Digital Man on Sat Jan 15 10:35:46 2022
    Re: Top-5 User Bulletin Generator
    By: Digital Man to Codefenix on Fri Jan 14 2022 05:47 pm

    "????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

    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 ]=-
  • From Codefenix@VERT/CONCHAOS to MRO on Sat Jan 15 10:42:07 2022
    Re: Top-5 User Bulletin Generator
    By: MRO to Codefenix on Fri Jan 14 2022 07:30 pm

    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 ]=-
  • From MRO@VERT/BBSESINF to Codefenix on Sat Jan 15 16:24:14 2022
    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

    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 :::
  • From Fr333n3rgy@VERT/ORACLE to MRO on Tue Jan 18 22:20:41 2022
    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