News­Mag 2k

Generate nice ansi themed BBS news from a simple textfile


  • Themeable
    Add your own ansi or use defaults.
  • Cropable
    Only display latest X news without losing older ones.
  • UTF8 + CP437
    Can output oldschool cp437 ansi and utf-8 encoded files.


  • Perl
  • Perl libs:
    • utf8
    • Text::Wrap
    • Encode
    • Getopt::Long
    • Data::Dumper


None required. Simply run or -h for help.


usage: [options] --filehdr=newshdr.ans Header template --fileftr=newsftr.ans Footer template --fileentry=entryhdr.ans Entries template --infile=news.txt Input text-file --outfile=news.ans Output ansi-file --encoding=CP437 Output file encoding --num=0 Only display <num> entries (0=all) -p | --print Print output to STDOUT -q | --quiet Be quiet (overrides -p) -h | --help Print this help --longhelp Print more detailed help

By default, newsmag searches for the input text-file and all templates at the directory, you're in while running the script, but you can provide alternative paths and filenames for everything. Check -h for a list of all available options and their default values.

Input file

./news.txt Parameter:

You write news in this file using this simple format:


Order doesn't matter, NewsMag always sorts the input by date, newest first.


NewsMag comes with some template examples, you are free to use. But you can also create your own using the examples and/or this description:


./newshdr.ans parameter:

This file holds your header template to be displayed above all the news. It has no special variables (yet)..


./newsftr.ans parameter:

This file holds your footer template to be displayed beneath all the news. It can hold one special variable: @COPYRIGHT@ - Will be replaced by a short copyright notice. If omitted the notice will be auto-appended below the footer.


./entryhdr.ans parameter:

This file holds your entry-template used to display each news entry. It must hold three special variables:

@DATE@ Will be replaced by the first line of your entries at news.txt

@SUBJECT@ Will be replaced by the second line of your entries at news.txt

@CONTENT@ Will be replaced by all the lines between the second and the next one containing the tag "@NEXT@" (See section "INPUT FILE") Also takes all characters to the left and repeats them on subsequent lines.

You can pad these variables to fit into your template files by appending <length><direction>@.

@DATE@16L@ This will pad the date to 16 characters by adding whitespace to the left.

@SUBJECT@32R@ This will pad the subject to 32 characters by adding whitespace to the right.

Content lines are wrapped to 75 characters by default. Also, all characters to the left of the @CONTENT@ tag in your template.ans are repeated on subsequent lines.
You can change the line width by adding <width>@ to the variable.

@SUBJECT@70@ This will wrap lines at 70 characters.

If any of these template files are omitted or not found, NewsMag will use very simple, hardcoded defaults.


./news.ans parameter:

Using all these different input files, NewsMag creates one huge ansi-file containing all news entries from your news.txt. You can limit the news to be displayed with the option --num=<num>


Some BBS systems automaticaly display files called "news.ans" at the login process if they have changed since the users last visit. some other systems have to be configured that way.


For MysticBBS, I've attached a small .mps script you can include into your "prelogin" menu with the name of your news.ans inside the text directory of your MysticBBS theme:

  • (E)dit -> (M)enu Editor -> default (or your template) -> prelogin
  • Press enter to edit the first entry called FIRSTCMD
  • Press tab to edit the commands
  • Navigate to a position in your login process, you'ld like the news to be displayed
  • Press /, then i to insert a new command
  • Select (C)ommand: (GX) Execute MPL program
  • Add (D)ata: newsmag news
  • Exit and save.

Now, users will see the news.ans inside the "text-directory" of your BBS (default: /mystic/text) everytime they log in and the file has changed since their last login.

At the moment, the attached .mps is simply the onlyonce.mps, which comes with MysticBBS, but with a "Pause Prompt" at the end. Probably, I'll enhance it later..


Copyright (C) 2018 Philipp Giebel stimpy <√ĄT>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see


Download v0.1.1

Download latest alpha

git clone