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? --
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.
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
"????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
ew. facebook
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 all abandon facebook. i know it's hard because everyone's using it but facebook isnt our friend.
Sysop: | Retros |
---|---|
Location: | Toronto, Canada |
Users: | 23 |
Nodes: | 8 (0 / 8) |
Uptime: | 255:58:22 |
Calls: | 1,087 |
Files: | 6 |
Messages: | 29,784 |