sbbs/tools/frames_tag.js

27 lines
767 B
JavaScript

load('ansitex/load/msgbases.js');
/**
* Go through our messages and tag a frame id for messages without one.
* @note: May need to run jsexec with -m 32MB to overcome memory issues
*/
const ma = new MsgAreas()
var areas = ma.managed;
for (var i=0;i<areas.length;i++) {
if (argv[0] && ((argv[0] !== areas[i].code) && (argv[0] !== areas[i].page_prefix)))
continue;
var total = areas[i].total_msgs;
var frames = areas[i].frames.length;
writeln('Area : '+areas[i].full_name);
writeln('- Total Messages : '+total);
writeln('- Page Prefix : '+areas[i].page_prefix);
writeln('- Tagged Messages : '+frames);
writeln('- Untagged Messages: '+(total-frames));
writeln('- Next Tag : '+areas[i].page_next);
areas[i].tag_msgs();
}