Link to USGS home page Link to InfoBank home page Link to InfoBank home page
 USGS Coastal and Marine Geology banner.    Search InfoBank.
USGS InfoBank program -- activitycontainers2html Skip navigational links
Home tab Atlas tab Activities tab FACS tab Geology School tab More tab Activities tabs
   
InfoBank Programs: by Name   by Data Type   General Tools   GIS   Plotting   Web   USGS Disclaimer   InfoBank Programs   Boothill  
   
Expanded description
Topic Description
Name
activitycontainers2html
Synopsis
/infobank/programs/html/activitycontainers2html/activitycontainers2html.for
Description
  Program to convert .container files for field activities
  into .html web pages.
    
Author
  Clint Steele     1/4/2005


    
Opens
 open (unit = 83,
*      access = 'sequential',
*      form = 'formatted',
*      status = 'unknown',
*      name = '/infobank/programs/keep/items.keep')

 open (unit = 89,
*      access = 'sequential',
*      form = 'formatted',
*      status = 'unknown',
*      name = '/tmp/activitycontainers2html.ids.temp')

     open (unit = 90,
*          access = 'sequential',
*          form = 'formatted',
*          status = 'unknown',
*          file = '/tmp/activitycontainers2html.temp')

     open (unit = 86,
*          access = 'sequential',
*          form = 'formatted',
*          status = 'unknown',
*          name = '/tmp/activitycontainers2html.locations.temp')

     open (unit = 85,
*          access = 'sequential',
*          form = 'formatted',
*          status = 'unknown',
*          name = '/tmp/activitycontainers2html.sorted.temp')

     open (unit = 91,
*          access = 'sequential',
*          form = 'formatted',
*          status = 'unknown',
*          file = InFile(1:InFileLength)//'.html')


    
Reads
     read (83, '(q,a)', end = 983)
*        ALineLength, ALine(1:ALineLength)
     read (89, '(q,a)', end = 999)
*        InFileLength, InFile(1:InFileLength)

     read (90, '(q,a)', end = 99)
*            HeaderLength, Header(1:HeaderLength)

         read (90, '(q,a)', end = 96)
*                ALineLength, ALine(1:ALineLength)

         read (85, '(q,a)', end = 995)
*            LocationsLength(LocationsCount),
*            Locations(LocationsCount)
*                (1:LocationsLength(LocationsCount))
     read (90, '(q,a)', end = 98)
*        ALineLength, ALine(1:ALineLength)

         read (90, '(q,a)', end = 98)
*                ALineLength, ALine(1:ALineLength)

     read (90, '(q,a)')
*            ALineLength, ALine(1:ALineLength)

         read (90, '(q,a)', end = 99)
*                ALineLength, ALine(1:ALineLength)

                     read (ALine(Tab(Loop)+1:Tab(Loop+1)-1), '(i)')
*                        ContainerNumber
    
Writes
     write (Header, '(2048x)')
         write (ALine, '(2048x)')
             write (86, '(a)')
*                ALine(Tab(LocationTab)+1:Tab(LocationTab+1)-1)
             write (86, '(a)') 
*             ALine(Tab(LocationTab)+1:Tab(LocationTab)+ColumnRow)
         write (ALine, '(2048x)')
     write (ID, '(80x)')
     write (ID, '(80x)')
     write (Title, '(255x)')
     write (Title, '(a)')
*            'Activity Physical Data: '//
*            LongCapID(1:IDLength+3)
     write (91, '(4x,a)') '</td>'
     write (91, '(2x,a)') '</tr>'
     write (91, '(a)')    '</table>'
     write (91, '(a)') '<p>'
     write (91, '(a)') '<table border="3" bgcolor="ccffff">'
     write (91, '(a)') '<tr>'
     write (91, '(a)') '<th bgcolor="00ffff">'
     write (91, '(4x,a)') 
*           '<b>Activity ID</b>'
     write (91, '(a)') '</th>'
     write (91, '(a)') '<th bgcolor="00ffff">'
         write (91, '(a)') '<b>Location</b>'
         write (91, '(a)') '<b>Locations</b>'
     write (91, '(a)') '</th>'
     write (91, '(a)') '</tr>'
     write (91, '(a)') '<tr>'
     write (91, '(4x,a)') '<td>'//
*                  '<a href="http://walrus.wr.usgs.gov/infobank/'//
*                  SmallID(1:1)//'/'//
*                  SmallID(1:IDLength)//'/html/'//
*                  LongSmallID(1:IDLength+3)//'.meta.html">'//
*                  LongCapID(1:IDLength+3)//'</a>'
     write (91, '(a)') '</td>'
     write (91, '(a)') '<td>'
             write (91, '(a)') '<br>'
             write (91, '(a)')
*               LocHtml(LocLoop)(1:DirLoc)//'analogids'//
*               LocHtml(LocLoop)(DirLoc+12:ItemsLoc)//'ids'//
*               LocHtml(LocLoop)(ItemsLoc+6:LocHtmlLength(LocLoop))
             write (91, '(a,i2.2)') '#',LocationsLoop,
*                ' = '//
*               LocHtml(LocLoop)(1:DirLoc)//'analogids'//
*               LocHtml(LocLoop)(DirLoc+12:ItemsLoc)//'ids'//
*               LocHtml(LocLoop)(ItemsLoc+6:LocHtmlLength(LocLoop))
     write (91, '(a)') '</td>'
     write (91, '(a)') '</tr>'
     write (91, '(a)') '</table>'
     write (91, '(a)') '<p>'
     write (91, '(a)') '<table border="1" bgcolor="ccffff">'
     write (91, '(2x,a)') 
*            '<tr bgcolor="00ffff" align="center">'

             write (91, '(4x,a)') 
*                  '<th>'//
*                  Header(HeaderTab(Loop)+1:HeaderTab(Loop+1)-1)//
*                  '</th>'
     write (91, '(2x,a)') '</tr>'
         write (ALine, '(2048x)')
         write (91, '(2x,a)') '<tr>'
                     write (91, '(4x,a,i3.3,a,i5.5,a)')
*                        '<td align="center">'//
*                        '<a href="http://walrus.wr.usgs.gov'//
*                        '/infobank/items/',
*                        ContainerNumber/100,
*                        '00s/',
*                        ContainerNumber,
*                        '.container.html">'// 
*                        ALine(Tab(Loop)+1:Tab(Loop+1)-1)//
*                        '</a></td>'
                         write (91, '(4x,a)')
*                            '<td>'//
*                            ALine(Tab(Loop)+1:Tab(Loop+1)-1)//
*                            '</td>'
                         write (91, '(4x,a)')
*                            '<td>'//
*                            ALine(Tab(Loop)+1:Comma)//
*                            '<br>'//
*                            ALine(Comma+1:Tab(Loop+1)-1)//
*                            '</td>'
                     write (91, '(4x,a)') '<td>'
                         write (91, '(4x,a)') 
*                            ALine(OutStart:OutEnd)
                             write (91, '(4x,a)')
*                              ALine(OutStart:OutMiddle-1)//'<br>'
                         write (91, '(4x,a)')
*                            ALine(OutStart:OutEnd)
                     write (91, '(4x,a)') '</td>'
                         write (91, '(a)')
*                            '<td>'//
*                            ALine(Tab(Loop)+1+ColumnRow+2:
*                            Tab(Loop+1)-1)
                                 write (91, '(4x,a,i2.2,a)')
*                                    '<td>#',LocationsLoop,
*                                    ', col'//
*                                    ALine(Tab(Loop)+ColumnRow+8:
*                                    Tab(Loop+1)-1)//'</td>'
         write (91, '(2x,a)') '</tr>'
     write (91, '(2x,a)')
*            '<tr bgcolor="00ffff" align="center">'

             write (91, '(4x,a)')
*                  '<th>'//
*                  Header(HeaderTab(Loop)+1:HeaderTab(Loop+1)-1)//
*                  '</th>'
     write (91, '(2x,a)') '</tr>'
     write (91, '(a)') '</table>'
     write (91, '(a)') '</td>'
     write (91, '(a)') '</tr>'
     write (91, '(a)') '</table>'
     write (91, '(a)') '<table border="0" width="90%" '//
*              'align="center" bgcolor="#f3f3f3" '//
*              'cellpadding="0" cellspacing="0">'
     write (91, '(2x,a)') '<tr>'
     write (91, '(4x,a)') '<td>'
    
Calls
                call stringlen 
*                    (Loc(LocCount), LocLength(LocCount)) 

                call stringlen
*                    (LocHtml(LocCount), LocHtmlLength(LocCount))
 call system ('/bin/ls -1 /infobank/a/*/meta/*.container > '//
*             '/tmp/activitycontainers2html.ids.temp')

     call system ('/bin/ls -1 /infobank/'//
*        Alphabet(Loop:Loop)//
*        '/*/meta/*.container >> '//
*        '/tmp/activitycontainers2html.ids.temp')
     call system ('/bin/sed -e ''s/\"//g'' '//
*                 InFile(1:InFileLength)//' > '//
*                 '/tmp/activitycontainers2html.temp')

     call system ('/bin/sort -u '//
*        '/tmp/activitycontainers2html.locations.temp > '//
*        '/tmp/activitycontainers2html.sorted.temp')
     call system ('/bin/rm '//
*        '/tmp/activitycontainers2html.locations.temp')

     call stringlen (ID, IDLength)
     call changecase ('SMALLS', SmallID)
     call changecase ('CAPITALS', LongCapID)
     call changecase ('SMALLS', LongSmallID)
     call stringlen (Title, TitleLength)
     call htmlhead (91, Title(1:TitleLength))
     call includeit (91,
*            '/infobank/programs/html/tools/home.tabs')

     call includeit (91,
*            '/infobank/programs/html/tools/home.uses.tabs')

     call includeit (91,
*            '/infobank/programs/html/tools/home.cmgstaff.tabs')

     call includeit (91,
*          '/infobank/programs/html/tools/home.cmgfacilities.tabs')

     call includeit (91,
*          '/infobank/programs/html/tools/home.cmgdirections.tabs')

     call includeit (91,
*            '/infobank/programs/keep/contents.keep')

     call htmlfoot (91, InFile(1:InFileLength)//'.html')
    

Skip footer navigational links

InfoBank   Menlo Park Center   Santa Cruz Center   St. Petersburg Center   Woods Hole Center   Coastal and Marine Geology Program  
U. S. Department of the Interior   U. S. Geological Survey   Geologic Information   Ask-A-Geologist   USGS privacy statement   USGS Disclaimer  

URL: http://walrus.wr.usgs.gov/infobank/programs/html/activitycontainers2html/activitycontainers2html.doc.html
Maintainer: Clint Steele
Comments: e-mail
Last modified: Sat Feb 5 03:17:50 PST 2005  (wcs)