


GETMAP(8)                                               GETMAP(8)


NNAAMMEE
       getmap - unshar USENET map articles into a map directory

SSYYNNOOPPSSIISS
       //uussrr//lliibb//mmaaiill//ggeettmmaapp [ --mm _m_a_p_d_i_r ] [ --ww _w_o_r_k_d_i_r ]
                 [ --bb _b_a_t_c_h ] [ --uu _a_d_d_r_e_s_s ] [ --nn _n_e_w_s_g_r_o_u_p_s ]
                 [ --ss _n_e_w_s_s_p_o_o_l_d_i_r ]
       //uussrr//lliibb//mmaaiill//uunnsshhaarrmmaapp [ --dd _d_i_r ] [ --nn _n_e_w_s_g_r_o_u_p_s ]
                 [ --ss _n_e_w_s_s_p_o_o_l_d_i_r ]

DDEESSCCRRIIPPTTIIOONN
       The  _g_e_t_m_a_p  command reads the file _b_a_t_c_h to obtain a list
       of  article  files  formatted  in  the  style  of   USENET
       ccoommpp..mmaaiill..mmaappss.   It  then  uses _u_n_s_h_a_r_m_a_p to extract maps
       from these articles into the directory _m_a_p_d_i_r_.  These maps
       are  intended  to  be  used as input data to _p_a_t_h_a_l_i_a_s(8).
       The program _u_u_w_h_o(1) prints individual  map  entries  from
       the extracted map files.

OOPPTTIIOONNSS
       The following options are recognized by _g_e_t_m_a_p:

       --mm _m_a_p_d_i_r
              Extracted map files will be placed in the directory
              _m_a_p_d_i_r,   rather   than   the   default   directory
              _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s.

       --ww _w_o_r_k_d_i_r
              The  directory  _w_o_r_k_d_i_r  will  be  used for working
              storage for _g_e_t_m_a_p _.  The log and error  log  files
              _g_e_t_m_a_p_._l_o_g  and  _g_e_t_m_a_p_._e_r_r  will also be placed in
              this directory.

       --bb _b_a_t_c_h
              Use          _b_a_t_c_h,           rather           than
              _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_b_a_t_c_h,  as  the  name of the
              file containing the list of new mail message files.
              A _b_a_t_c_h file of -- implies that the list of articles
              is to be read from standard input.  If _b_a_t_c_h is not
              -- then _b_a_t_c_h_._w_o_r_k is used as both the lock file and
              the work file.

       --uu _a_d_d_r_e_s_s
              If _g_e_t_m_a_p encounters an error, then the contents of
              the error log file will be mailed to _a_d_d_r_e_s_s rather
              than the default address of PPoossttmmaasstteerr.  If _a_d_d_r_e_s_s
              is  --  then  the  error  log is written to standard
              error rather than mailed to some user.

       --nn _n_e_w_s_g_r_o_u_p_s
              Specifiy the list of allowed newsgroups  for  arti-
              cles.   Multiple newsgroups can be specified, sepa-
              rated  by  single  colons.   The  default  list  is
              ``comp.mail.maps.''



Local                    31 January 1988                        1





GETMAP(8)                                               GETMAP(8)


       --ss _n_e_w_s_s_p_o_o_l_d_i_r
              Specify the top-level directory of the news article
              hierarchy.  Batch files created by C  News  contain
              pathnames that are relative to this directory.  The
              default news spool directory is /usr/spool/news.

       Even though the default values for _m_a_p_d_i_r  _,  _w_o_r_k_d_i_r  _a_n_d
       _b_a_t_c_h  are  found  in the same directory tree, the options
       --mm, --ww and --bb set locations  independent  of  each  other.
       E.g., --mm does not change _w_o_r_k_d_i_r _.

       The following options are recognized by uunnsshhaarrmmaapp:

       --dd _d_i_r Map  files  are  extracted into _d_i_r rather than the
              current directory.

       --nn _n_e_w_s_g_r_o_u_p_s
              Specifiy the list of allowed newsgroups  for  arti-
              cles.   Multiple newsgroups can be specified, sepa-
              rated  by  single  colons.   The  default  list  is
              ``comp.mail.maps.''

       --ss _n_e_w_s_s_p_o_o_l_d_i_r
              Specify the top-level directory of the news article
              hierarchy.  Batch files created by C  News  contain
              pathnames  that are relative to this directory.  If
              this option is not specified, the batch  file  must
              contain  pathnames  that begin with //.  However, if
              invoked   from    _g_e_t_m_a_p,    this    defaults    to
              /usr/spool/news.

GGEETTMMAAPP OOPPEERRAATTIIOONN
       The  _b_a_t_c_h  file contains a list of article filenames, one
       per line.  Article files are files formatted in the  style
       of  articles  received  by  the USENET news service in the
       newsgroup  ccoommpp..mmaaiill..mmaappss.   The   _g_e_t_m_a_p   program   uses
       _u_n_s_h_a_r_m_a_p  to extact a map file from each artcile named in
       the _b_a_t_c_h file.  All extacted map articles are  placed  in
       the  directory  _m_a_p_d_i_r.   A  log  of  each article file is
       obtained  from  the  standard  output  of  _u_n_s_h_a_r_m_a_p   and
       appended  to  the  file  _g_e_t_m_a_p_._l_o_g located in the _w_o_r_k_d_i_r
       directory.

       At invocation, _g_e_t_m_a_p attemps to move _b_a_t_c_h to a file with
       a  _._w_o_r_k  suffix.   (i.e., _b_a_t_c_h is moved to _b_a_t_c_h_._w_o_r_k _._)
       If _b_a_t_c_h_._w_o_r_k already exists, _g_e_t_m_a_p will abort.  In  this
       way,  the _b_a_t_c_h_._w_o_r_k serves as a lock file.  If _b_a_t_c_h is --
       then article file names are obtained form standard  input.
       In this case, the _b_a_t_c_h_._w_o_r_k file is not formed.

       The  file  _g_e_t_m_a_p_._l_o_g  in the directory _w_o_r_k_d_i_r contains a
       history of _g_e_t_m_a_p processing and errors.  At the start  of
       a  given  _g_e_t_m_a_p run, the error log file _g_e_t_m_a_p_._e_r_r in the
       directory _w_o_r_k_d_i_r is cleared.   During  _g_e_t_m_a_p  execution,



Local                    31 January 1988                        2





GETMAP(8)                                               GETMAP(8)


       each  line  written to the log file is also written to the
       error log file.  If any error conditions are  encountered,
       the  error log is mailed to _a_d_d_r_e_s_s_.  If _a_d_d_r_e_s_s is -- then
       the error log is written to standard error.  If no  errors
       are encountered, the error log is removed, otherwise it is
       left behind until a future _g_e_t_m_a_p run clears it.

UUNNSSHHAARRMMAAPP OOPPEERRAATTIIOONN
       The _u_n_s_h_a_r_m_a_p program is used by _g_e_t_m_a_p  to  extract  maps
       out of article files.

       Article  file names are read from standard input, one file
       per line.  The map file name is obtained form the  article
       file  and the map contents are written into the _d_i_r direc-
       tory.  Old map files are overwritten.

       For each map file, _u_n_s_h_a_r_m_a_p writes the following informa-
       tion to standard output:

              name of the article file
              name of the extracted map file
              Subject line
              Message-ID line
              article Date
              Approved line

       Each  article  file  contains a news header, a blank line,
       and an article body.  The  header,  which  starts  on  the
       first  line  and  continues  until a blank line is encoun-
       tered, which separates the  header  from  the  body.   The
       header  is  expected  to  contain  at  least the following
       header fields:
              Newsgroups: comp.mail.maps
              Subject: UUCP ...
              Message-ID: ...
              Date: ...
              Approved: ...
       For any line above, containing `...', the `...' string can
       match  any  sequence  of  characters within a field, where
       other characters in the field must match exactly, indepen-
       dently of case.

       The  body  for each article file is expected to begin with
       zero or more lines beginning with the character `:',  fol-
       lowed by the two lines:

              echo shar: extracting _m_a_p_-_n_a_m_e
              cat << 'SHAR_EOF' > _m_a_p_-_n_a_m_e

       where  _m_a_p_-_n_a_m_e  is the map to be extracted.  What follows
       are the file contents to be placed in the map  file,  fol-
       lowed by the three lines:

              SHAR_EOF



Local                    31 January 1988                        3





GETMAP(8)                                               GETMAP(8)


              :    End of shell archive
              exit 0

IINNTTEERRFFAACCIINNGG GGEETTMMAAPP WWIITTHH NNEETTNNEEWWSS
       To  interface  _g_e_t_m_a_p  with  the netnews software, version
       2.10 or 2.11, add a line to your _s_y_s  file  (see  _n_e_w_s(5))
       containing:

              maps:comp.mailmaps,world:F:_b_a_t_c_h

       where  _b_a_t_c_h  is the full pathname to _g_e_t_m_a_p's _b_a_t_c_h file.
       Normally _b_a_t_c_h is _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_b_a_t_c_h.

       The _g_e_t_m_a_p program should be run on a periodic basis under
       a  user  and group ID that can write to the map directory.
       See _s_m_a_i_l_c_r_o_n(8) for details.

FFIILLEESS
       _/_u_s_r_/_s_p_o_o_l_/_n_e_w_s
                      The default top-level  directory  used  for
                      obtaining news articles.

       _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s
                      The  default directory for maps extraction.
                      Map files broadcast in ccoommpp..mmaaiill..mmaappss begin
                      with  either  ``u.''  or  ``d.'' and have a
                      name indicating which region of  the  world
                      they represent.

       _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_b_a_t_c_h
                      The  default work file used containing art-
                      cile filenames.

       _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_b_a_t_c_h_._w_o_r_k
                      The default work file  copy  created  while
                      processing  the input pathnames.  This file
                      also serves as  a  lock  file  for  similar
                      _g_e_t_m_a_p executions.

       _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_g_e_t_m_a_p_._l_o_g
                      The  default history log of _g_e_t_m_a_p activity
                      and errors.

       _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_g_e_t_m_a_p_._e_r_r
                      The  default  error  log  of  the  previous
                      _g_e_t_m_a_p  execution.  This is mailed to PPoosstt--
                      mmaasstteerr if an error occured, otherwise it is
                      removed.

       _/_u_s_r_/_l_i_b_/_m_a_i_l_/_u_n_s_h_a_r_m_a_p
                      The  program  that  does  the  real work of
                      extracting map files from netnews articles.

       _/_b_i_n_/_s_m_a_i_l     The  program used in mailing the _g_e_t_m_a_p_._e_r_r



Local                    31 January 1988                        4





GETMAP(8)                                               GETMAP(8)


                      error log.

SSEEEE AALLSSOO
       _n_e_w_s(5), _i_n_e_w_s(1), _s_m_a_i_l(5), _a_r_t_i_c_l_e(5), _s_m_a_i_l(8),  _s_m_a_i_l_-
       _c_r_o_n(8), _u_u_w_h_o(1), _m_k_p_a_t_h(8) and _p_a_t_h_a_l_i_a_s(8).

BBUUGGSS
       The  format of USENET articles is subject to change at the
       whim of a few USENET map people.

       some articles may not be processed.  Most netnews software
       does an open, write and close for each filename written to
       the _b_a_t_c_h file.  In rare cases, the _b_a_t_c_h file may be left
       opened  when _g_e_t_m_a_p moved it to _b_a_t_c_h_._w_o_r_k.  In this case,
       the last article may be ignored.

CCOOPPYYRRIIGGHHTT
       Copyright(C)1987, 1988 Ronald S. Karr and Landon Curt Noll
       Copyright(C)1992 Ronald S. Karr
       See  a  file COPYING, distributed with the source code, or
       type _s_m_a_i_l _-_b_c for distribution  rights  and  restrictions
       associated with this software.



































Local                    31 January 1988                        5


