Simple Guide to BomgaG 4.9.3-RELEASE
Copyright (C) 2000-2006 <wchunhao@csie.nctu.edu.tw>
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with the
Invariant Sections being list their titles, with the Front-Cover Texts
being list, and with the Back-Cover Texts being list.
A copy of the license is included in the section entitled
"GNU Free Documentation License."
This article describes the status of BomgaG 4.9.3-RELEASE,from the
standpoint of users who may be familiar to the 4.X series of releases
or to BomgaG in general. It presents some background information on
release engineering, some highlights of new features, and some possible
drawbacks that might be faced. It also contains some of the future
release engineering plans for the 4.X development branch.
1 Introduction
BomgaG is a BBS-connecting software developed to make the BBS world much
more wonderful for a normal user.The original purpose is to leave redudant
works,such as resending the same commands,to the computer,rather than to
your fingers.BomgaG provides a variety of functions to master BBS using,
and adding your own functions is very easy if you are already familiar
with perl.
For a quick start , please refer to README in the package now.
2 Requirements
Perl 5 is required.The following modules of perl are also needed:
BSD::Itimer
IO::Stty
IO::Tty
Expect
They can be downloaded from CPAN.If you installed it in non-standard
directories,remember to add
use lib 'path-to-your-module';
in the beginning of 'bomgaG'.
A sample file header may look like:
#!/usr/bin/perl
use lib "/u/cp/92/9217026/perl/module/BSD-Itimer-0.8/blib/lib";
use lib "/u/cp/92/9217026/perl/module/BSD-Itimer-0.8/blib/arch";
use BSD::Itimer;
use lib '/u/cp/92/9217026/perl/module/IO-Stty-.02/blib/lib';
use IO::Stty;
use lib '/u/cp/92/9217026/perl/module/IO-Tty-1.02/blib/lib';
use lib "/u/cp/92/9217026/perl/module/IO-Tty-1.02/blib/arch";
use IO::Tty;
use lib '/u/cp/92/9217026/perl/module/Expect-1.15/blib/lib';
use Expect;
3 Adding your new options
As typing CTRL-F, there is a list of options to choose,which calls
corresponding functions to do the reqest. In order to add your
new options,follow these steps to modify 'default/basic.conf'.
First,modify the
# MAIN OPTIONS
section in 'basic.conf' to specify a new key binding to your function.
There are two places you would have to change in most circumstance,the
$MAIN_OPTIONS_SCREEN and the @MAIN_OPTIONS variables.
Note that every entry in @MAIN_OPTIONS should be a single character,
which is called as $your_option later in this document.
Second, adding a file containing your perl codes in your
$MAIN_OPTIONS_FILE_DIR,which has the default value of "opt/" that is
relative to the directory where you executes the main
executable 'bomgaG'. The two variables $MAIN_OPTIONS_FILE_PREFIX and
$MAIN_OPTIONS_FILE_SUFFIX have default values of '' and '.opt' respectively.
Therefore,a complete location of this file should be
$MAIN_OPTIONS_FILE_DIR/$MAIN_OPTIONS_FILE_PREFIX$your_option$MAIN_OPTIONS_FILE_SUFFIX
And in default it is simple 'opt/a.opt' where 'a' is $your_option described
above.
Note that the $MAIN_OPTIONS_FILE_DIR can be altered from default/basic.conf.
Third,write your perl codes in the file added in the second step.
For instance,you can write a 'print "hello world";' inside to test if our
efforts would not be in vain.
Useful subroutines are listed in 'bomgaG',and you may only want to use
out("output-string");
in this file with some loops or ifs. subroutine out() simply sends the
"output-string" to the remote BBS server.
Finally, connect to a BBS server and activate your option after typing CTRL-F.
Then enjoy it!
The implementation of this option adding feature is mainly by a perl do call.
It assures the flexibility and is only available in 4.9 or above.
4 New Option: v
The 'v' option allows users to use their preferable editor other than what is
provided by the BBS server.The editor is specified in the environment variable
EDITOR.If EDITOR is not set, 'vim' is used by default.BomgaG uses a temporary
file in the local machine and after edited by EDITOR it is dumped to the
remote server.Performance is thus enhanced, and you will never have to write
your beautiful essay with your time wasted in waiting the delay of the
network again.
Of course,your files are saved locally,and you can take them for other uses,
such as a repost to news group.The only drawback may be losing the file when
your machine suddenly shuts down before you saved your work.To avoid it,you
can save your article repeatedly after an interval.By the way,this document
you are reading is written with the adventage of option 'v' and the wonderful
editor 'vim'.
Now let's continue with the configuration.In basic.conf,the $var{tempdir}
variable specifies a directory where the temporary file edited by EDITOR
should be placed, and the $var{arbitrary_tmpfile} is set to zero to
permanently use the same temporary file 'v_opt' in $var{tempdir} while
setting to a non-zero value causes bomgaG to use different files.
5 Furthur Plans
Since bomgaG is still BBS-system-dependent, the independency is taken into
consideration of the next version. Many modulization of source code will also
take action soon.
6 Summary
The new features of this version can briefly said to be 'modulization of
options' and 'option v'.While bomgaG contains enough number of useful options
for new users, old users many still desire more and more options. It could be
a hard work to add a new option before, but now you can do it without
modifying source codes. I hope this upgrading may help more people to
construct their own bomgaG.
SourceForge Project Page
This file and other release-related documents can be found in
http://www.csie.nctu.edu.tw/~wchunhao/bomgaG
Furthur questions about this project or this document, please contact
wchunhao@csie.nctu.edu.tw
< Back