  This chapter contains a few examples of the uses of the MCONV package.

Message:

Subject: 11.1 Session Log Example

  To record a telnet session for later viewing:

   telnet some.where.com | tee sesslog.tmp
mconv -a < sesslog.tmp > session.log
rm sesslog.tmp

  Or, without using any intermediary files:

   telnet some.where.com | tee /dev/tty | mconv -a > session.log

  ...and to view that log:  mview session.log

  The session log obtained will be free of all special characters like cursor
  positioning and screen clearance; it will be a simple linear file of text
  plus CCmbbsCA attributes to keep the colour and highlighting relatively intact.

  Note that because of the linear nature of the output, you will get
  unexpected results if you view any animations or other applications which
  mess around with cursor positioning a lot. There isn't really any way around
  this, as there isn't really any way of making a linear log of such things.

Message:

Subject: 11.2 HTMLification Example

  To use the "quick and dirty" experimental Perl script supplied with this
  distribution to convert your Monochrome BBS section, whose top-level menu
  file is `~/u1/foo.mn', to a set of web pages in directory `bar', using
  `template.html' as an HTML template:

   m2ht.pl ~/u1/foo.mn "FOO menu title" template.html bar

  Note that this is an Bexperimentalb script. You should at least read the
  comments at the top of it before trying it out.

Message:

Subject: 11.3 Offline Diary Example

  If you are a member of staff on Monochrome BBS and have direct access to
  your public diary file, then you can keep it offline. Download a copy to
  your local machine, and whenever you want to make changes, do:

   mview diary.cm

  Here, the diary file is assumed to be `diary.cm'. When you've added an
  entry, you may upload it to Monochrome BBS at your leisure (instead of
  having to either type it all online, or type it offline and guess how it
  will be formatted - CCmviewCA shows you how it will look).

  For instance, uploading could be done something like this:

   scp diary.cm whoever@el.mono.org:u1/diary.cm

  Scripts can also be written to do such things as converting mailed-to-self
  Monochrome BBS files to CCmviewCA-able files, datestamps intact, and so on.

Message:

Subject: 11.4 General Example

  It be useful to set up a series of menus containing various utilities,
  system logs, and so on, to be accessed by a convenient alias in the shell.
  For instance, my "private" menu once looked like this at the top level:

                    Private Area (ivarch) <P>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ivarch ~~

( 1 Hour  7 Min)        [R] + Latest Reminder

                 Menu   [S] = GPLed Source
                 Menu   [D] = Private Diaries
                 Menu   [P] = Public Diaries
                 Menu   [W] = Work Area

                 Menu   [O] = Online Utilities
                 Menu   [T] = Other Utilities

                 Menu   [C] = Configuration files
                 Menu   [L] = System Logs

                  Run   [>] * Regenerate Reminder

  The source code for that menu looks something like this:

   .NOW STATUS EDIT
.SUB STATUS EDIT

.LINE

.STATUS READONLY
Latest ^]BR^]beminder
R C reminder.cm

.LINE

.STATUS NOSCAN NOLAST
^]CGGPLed ^]BS^]bource
S M ../src/gpl/.index.mn

^]CGPrivate ^]BD^]biaries
D M ../diary/private.mn

^]CG^]BP^]bublic Diaries
P M ../diary/public.mn

^]CG^]BW^]bork Area
W M ../var/work/index.mn

.LINE

.STATUS NOSCAN NOLAST
^]CG^]BO^]bnline Utilities
O M online.mn

.STATUS NOSCAN NOLAST
^]CGOther U^]Bt^]bilities
T M utils.mn

.LINE

.STATUS NOSCAN NOLAST
^]CG^]BC^]bonfiguration files
C M config.mn

^]CGSystem ^]BL^]bogs
L M /var/log/.index.mn

.LINE

Regenerate Reminder
> X reminder|sed '/^          /d'>~/tmp/rem.$$;[... snipped]

  As a generalised menu system, the applications are obviously as numerous as
  you care to make them. [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][
  ? ]

