Newsformat

[ return to Myrddin's MUSH Code Page ]

This Perl script does 95% of the grunt work involved in formatting a raw text file to be used in a MUSH .txt file (news.txt, help.txt, etc), and it does it FAST.


As you know, formatting a raw text file for use as a MUSH .txt file involves several steps: If the text file is long, this is a lengthy process -- with newsformat, it takes only seconds. It creates a new file, leaving the old one untouched.
Following are some 'before and after' examples, as well as the source code for the script.


BEFORE [ after ]
   This is a test document showing the results of running 'newsformat'
on a regular text file.  This actual document is meaningless other than
to give you a visual idea of what this script will do... it's up to you
to decide if it will benefit you. Personally, I know it's saved me hours
of work. About this point is where I start repeating lines because I don't
feel like sitting here typing all day. :-) So, take a peek, grab the code,
and thank yourself later. ;-)

   This is a test document showing the results of running 'newsformat'
on a regular text file.  This actual document is meaningless other than
to give you a visual idea of what this script will do... it's up to you
to decide if it will benefit you. Personally, I know it's saved me hours
of work. About this point is where I start repeating lines because I don't
feel like sitting here typing all day. :-) So, take a peek, grab the code,
and thank yourself later. ;-)

   This is a test document showing the results of running 'newsformat'
on a regular text file.  This actual document is meaningless other than
to give you a visual idea of what this script will do... it's up to you
to decide if it will benefit you. Personally, I know it's saved me hours
of work. About this point is where I start repeating lines because I don't
feel like sitting here typing all day. :-) So, take a peek, grab the code,
and thank yourself later. ;-)

   This is a test document showing the results of running 'newsformat'
on a regular text file.  This actual document is meaningless other than
to give you a visual idea of what this script will do... it's up to you
to decide if it will benefit you. Personally, I know it's saved me hours
of work. About this point is where I start repeating lines because I don't
feel like sitting here typing all day. :-) So, take a peek, grab the code,
and thank yourself later. ;-)

   This is a test document showing the results of running 'newsformat'
on a regular text file.  This actual document is meaningless other than
to give you a visual idea of what this script will do... it's up to you
to decide if it will benefit you. Personally, I know it's saved me hours
of work. About this point is where I start repeating lines because I don't
feel like sitting here typing all day. :-) So, take a peek, grab the code,
and thank yourself later. ;-)

Ta-da!

AFTER [ top ]
& example
=============================================================================
                    TinkertoyMUSH: Examples (part 1 of 3)
-----------------------------------------------------------------------------
   This is a test document showing the results of running 'newsformat'
on a regular text file.  This actual document is meaningless other than
to give you a visual idea of what this script will do... it's up to you
to decide if it will benefit you. Personally, I know it's saved me hours
of work. About this point is where I start repeating lines because I don't
feel like sitting here typing all day. :-) So, take a peek, grab the code,
and thank yourself later. ;-)
  
   This is a test document showing the results of running 'newsformat'
on a regular text file.  This actual document is meaningless other than
to give you a visual idea of what this script will do... it's up to you
to decide if it will benefit you. Personally, I know it's saved me hours
of work. About this point is where I start repeating lines because I don't
feel like sitting here typing all day. :-) So, take a peek, grab the code,
and thank yourself later. ;-)
  
   This is a test document showing the results of running 'newsformat'
on a regular text file.  This actual document is meaningless other than
-----------------------------------------------------------------------------
Type 'news example2' for more
=============================================================================

& example2
=============================================================================
                    TinkertoyMUSH: Examples (part 2 of 3)
-----------------------------------------------------------------------------
to give you a visual idea of what this script will do... it's up to you
to decide if it will benefit you. Personally, I know it's saved me hours
of work. About this point is where I start repeating lines because I don't
feel like sitting here typing all day. :-) So, take a peek, grab the code,
and thank yourself later. ;-)
  
   This is a test document showing the results of running 'newsformat'
on a regular text file.  This actual document is meaningless other than
to give you a visual idea of what this script will do... it's up to you
to decide if it will benefit you. Personally, I know it's saved me hours
of work. About this point is where I start repeating lines because I don't
feel like sitting here typing all day. :-) So, take a peek, grab the code,
and thank yourself later. ;-)
  
   This is a test document showing the results of running 'newsformat'
on a regular text file.  This actual document is meaningless other than
to give you a visual idea of what this script will do... it's up to you
to decide if it will benefit you. Personally, I know it's saved me hours
-----------------------------------------------------------------------------
Concluded in 'news example3'
=============================================================================

& example3
=============================================================================
                    TinkertoyMUSH: Examples (part 3 of 3)
-----------------------------------------------------------------------------
of work. About this point is where I start repeating lines because I don't
feel like sitting here typing all day. :-) So, take a peek, grab the code,
and thank yourself later. ;-)
  
Ta-da!
=============================================================================

[ Top ]