Subj : Top-5 User Bulletin Generator To : Codefenix From : Digital Man Date : Fri Jan 14 2022 05:47 pm 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 .