Link to USGS home page
USGS Home
Contact USGS
Search USGS
Coastal & Marine Geology InfoBank

USGS InfoBank program -- ids2idshtml

Skip navigational links
Search InfoBank
Home tab FACS tab Activities tab Atlas tab Geology School tab More tab More tab Activities tabs
   
InfoBank Programs: by Name   by Topic  
   
Expanded description
Topic Description
Name
ids2idshtml
Synopsis
/infobank/programs/html/ids2idshtml/ids2idshtml.for
Description
  Program to generate <letter>_ids.html files for 
  each ID letter or number.
    
Author
  Clint Steele    11/15/2000   based on platforms2idshtml.for


    
Opens
     open (unit   = ControlFile,
*          access = 'sequential',
*          form   = 'formatted',
*          status = 'old',
*          name   = '/tmp/ids2idshtml.year.'//
*                   Alphabet(Letter:Letter)//
*                   '.ids.temp')

     open (unit = IDHtml,
*      access = 'sequential',
*      file   =  HtmlName(1:HtmlNameLength),
*      form   = 'formatted',
*      status = 'unknown')

                 open (unit = IDFile,
*                      access = 'sequential',
*                      form = 'formatted',
*                      status = 'old',
*                      name =  '/infobank/'//
*                          ALine(30:30)//'/'//
*                          ALine(30:35)//'/meta/'//
*                          ALine(30:30)//'-'//
*                          ALine(31:31)//'-'//
*                          ALine(32:33)//'-'//
*                          ALine(34:35)//'.ids')

            open (unit = 96,
*                 access = 'sequential',
*                 form = 'formatted',
*                 status = 'old',
*                 name = '/infobank/'//ALine(30:30)//'/'//
*                          ALine(30:35)//'/meta/'//
*                          ALine(30:30)//'-'//
*                          ALine(31:31)//'-'//
*                          ALine(32:33)//'-'//
*                          ALine(34:35)//'.dates')
                 open (unit = IDFile,
*                      access = 'sequential',
*                      form = 'formatted',
*                      status = 'old',
*                      name =  '/infobank/'//
*                          ALine(30:30)//'/'//
*                          ALine(30:36)//'/meta/'//
*                          ALine(30:30)//'-'//
*                          ALine(31:32)//'-'//
*                          ALine(33:34)//'-'//
*                          ALine(35:36)//'.ids') 

            open (unit = 96,
*                 access = 'sequential',
*                 form = 'formatted',
*                 status = 'old',
*                 name = '/infobank/'//ALine(30:30)//'/'//
*                          ALine(30:36)//'/meta/'//
*                          ALine(30:30)//'-'//
*                          ALine(31:32)//'-'//
*                          ALine(33:34)//'-'//
*                          ALine(35:36)//'.dates')
 open (unit = 94, 
*      access = 'sequential',
*      form   = 'formatted',
*      status = 'old',
*      name   = '/tmp/ids2idshtml.sortedtempids.temp')
 open (unit = 95,
*      access = 'sequential',
*      form   = 'formatted',
*      status = 'unknown',
*      name   = '/tmp/ids2idshtml.alltemp.ids.temp')

 open (unit = 92, 
*      access = 'sequential',
*      form   = 'formatted',
*      status = 'old',
*      name   = '/tmp/ids2idshtml.alltemp.ids.temp')
 open (unit = 93,
*      access = 'sequential',
*      form   = 'formatted',
*      status = 'unknown',
*      name   = '/tmp/ids2idshtml.all.ids.temp')

     open (unit   = 90,
*          access = 'sequential',
*          form   = 'formatted',
*          status = 'old',
*          name   = '/tmp/ids2idshtml.all.ids.temp')

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

     open (unit   = 90,
*          access = 'sequential',
*          form   = 'formatted',
*          status = 'old',
*          name   = '/tmp/ids2idshtml.letter.'//
*                   Alphabet(Letter:Letter)//
*                   '.ids.temp')

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

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

         read (ControlFile, '(q,a)', end = 999)
*            ALineLength, ALine(1:ALineLength)

            read (96, '(a)') DateLine
            read (96, '(a)') DateLine
                 read (IDFile, '(q,a)', end = 7001)
*                   IDLineLength, IDLine(1:IDLineLength)

                 read (IDLine(1:9), '(a)') InfoBankID
            read (IDLine(1:IDLineLength), '(t10,a19)')
*               DisplayID
                 read (IDLine(1:IDLineLength), '(t30,q,a)')
*                   BLineLength, BLine(1:BLineLength)

 read (94, '(q,a)', end = 86)
*     ALineLength, ALine(1:ALineLength)
 read (92, '(q,a)', end = 88)
*     ALineLength, ALine(1:ALineLength)
         read (90, '(q,a)', end = 99)
*            ALineLength, ALine(1:ALineLength)
         read (90, '(q,a)', end = 99)
*            IDLength, ID(1:IDLength)

                 read (ID(3:4), '(i)') Year
                 read (ID(4:5), '(i)') Year
                 read (ID(3:4), '(i)') Year
                 read (ID(4:5), '(i)') Year
    
Writes
     write (HtmlName, 5) Alphabet(Letter:Letter)
     write (Title, 6) BigAlphabet(Letter:Letter)
     write (IDHtml, '(2x,a)') '<tr>'
     write (IDHtml, '(4x,a)') 
*        '<td valign="top" align="right" width="10%">'
     write (IDHtml, '(6x,a)') 
*        '<b>"'//BigAlphabet(Letter:Letter)//'" Years:</b>'
     write (IDHtml, '(4x,a,/)') '</td>'
     write (IDHtml, '(4x,a)') '<td valign="middle">'
             write (IDHtml, 4002) Alphabet(Letter:Letter), 
*                    CurrentYear(1:4), CurrentYear(3:4)
     write (IDHtml, '(4x,a)') '</td>'
     write (IDHtml, '(2x,a,/)') '</tr>'
     write (IDHtml, '(4x,a)') '</td>'
     write (IDHtml, '(2x,a)') '</tr>'
     write (IDHtml, '(a)') '</table>'
     write (LastID, '(7x)')
         write (ALine, '(255x)')
                 write (IDHtml, 4005)
           write (JpgName, '(255x)')
             write (IDHtml, 4004) CurrentYear(1:4),
*                CurrentYear(1:4), CurrentYear(1:4), '#ccffff'
             write (IDHtml, 4004) CurrentYear(1:4),
*                CurrentYear(1:4), CurrentYear(1:4), '#ffffff'
           write (JpgName, '(255x)')
                 write (IDHtml, 6004) '#ccffff'
                 write (IDHtml, 6004) '#ffffff'
                 write (IDHtml, 6005) '#ccffff'
                 write (IDHtml, 6005) '#ffffff'
                 write (IDHtml, '(a)')
*                    '<img src="http://walrus.wr.usgs.gov'//
*                    JpgName(1:JpgNameLength)//'" '//
*                    'alt = "thumbnail map"><br>'
                 write (IDHtml, '(a)')
*                    '<img src="http://walrus.wr.usgs.gov'//
*                    MetaName(1:MetaNameLength)//'" '//
*                    'alt = "thumbnail map"><br>'

             write (IDHtml, '(18x,a)')
*                '<b>'//BLine(1:BLineLength)//'</b>'

        write (IDHtml, '(2x,a)')
*           '<a href="http://maps.google.com/maps?q='//
*           'http://walrus.wr.usgs.gov'//
*           JpgName(1:JpgNameLength-14)//
*           '.nav.kmz&t=h" target="new">'//
*           '<img src="http://walrus.wr.usgs.gov'//
*           '/infobank/programs/html/tools/'//
*           'googlemaps.jpg" alt="Google Maps icon" '//
*           'width="12" border="0"></a>'

        write (IDHtml, '(2x,a)')
*           '<a href="http://maps.google.com/maps?q='//
*           'http://walrus.wr.usgs.gov'//
*           JpgName(1:JpgNameLength-14)//
*           '.nav.kml&t=h" target="new">'//
*           '<img src="http://walrus.wr.usgs.gov'//
*           '/infobank/programs/html/tools/'//
*           'googlemaps.jpg" alt="Google Maps icon" '//
*           'width="12" border="0"></a>'

            write (IDHtml, '(24x,a)') ' '
        write (IDHtml, '(2x,a)')
*           '<a href="http://walrus.wr.usgs.gov'//
*           JpgName(1:JpgNameLength-14)//'.nav.kmz"> '//
*           '<img src="http://walrus.wr.usgs.gov'//
*           '/infobank/programs/html/tools/'//
*           'googleearth.jpg" alt="Google Earth icon" '//
*           'width="12" border="0"></a>'

        write (IDHtml, '(2x,a)')
*           '<a href="http://walrus.wr.usgs.gov'//
*           '/infobank/programs/kml'//
*           '/participants4kml/participants/'//
*           JpgName(1:JpgNameLength-14)//'.nav.kml"> '//
*           '<img src="http://walrus.wr.usgs.gov'//
*           '/infobank/programs/html/tools/'//
*           'googleearth.jpg" alt="Google Earth icon" '//
*           'width="12" border="0"></a>'

                write (IDHtml, '(24x,a)')
*                   '   '//
*                   '<img src="http://walrus.wr.usgs.gov/'//
*                   'infobank/programs/html/tools/book.gif" '//
*                   'alt = "icon of a book" height="14">'
                  write (IDHtml, '(24x,a)')
*                   '<br>('//InfoBankID(1:InfoBankIDLength)//')'
            write (IDHtml, '(24x,a)')
*               '<br>'//DateLine(10:15)//DateLine(18:19)//
*               ' - '//DateLine(34:39)//DateLine(42:43)
     write (IDHtml, 4005)
     write (95, '(a)') ALine(1:ALineLength)
     write (93, '(a)') ALine(1:ALineLength)
     write (93, '(a)') ALine(1:29)//
*         Link(1:LinkLength)
             write (ID, '(7x)')
                 write (91, '(a)') ID(1:IDLength)
                 write (91, '(a)') ALine(1:19)
                 write (91, '(i4.4,a,a,a,t30,a)') Year, 
*                ID(1:1), '0', ID(2:IDLength), ID(1:IDLength)
                 write (91, '(i4.4,a,t30,a)') Year, 
*                ID(1:IDLength), ID(1:IDLength)
             write (91, '(i4.4,a,t30,a)') Year,
*            ID(1:IDLength), ID(1:7)
    
Calls
 call idsbyletter
 call idsbyyear
     call stringlen (HtmlName, HtmlNameLength)
     call stringlen (Title, TitleLength)
     call htmlhead (IDHtml, Title(1:TitleLength))
     call includeit (IDHtml,
*        '/infobank/programs/html/tools/activities.tabs')

     call includeit (IDHtml,
*        '/infobank/programs/html/tools/home.newfieldwork.tabs')

     call includeit (IDHtml,
*      '/infobank/programs/html/tools/activities.activities.tabs')

     call includeit (IDHtml,
*      '/infobank/programs/html/tools/activities.firstletter.tabs')

         call stringlen (ALine(1:ALineLength), ALineLength)
 call includeit (IDHtml,
*    '/infobank/programs/html/tools/virtualglobesstart.tabs')
 call includeit (IDHtml,
*    '/infobank/programs/html/tools/virtualglobesend.tabs')

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

 call includeit (IDHtml,
*    '/infobank/programs/html/tools/virtualglobeslegend.keep')

         call stringlen (ALine(1:ALineLength), ALineLength)
         call changecase ('CAPITAL', CapLine(1:ALineLength))
           call changecase ('SMALLS', ALine(30:ALineLength))
             call stringlen (JpgName, JpgNameLength)
             call stringlen (MetaName, MetaNameLength)
             call stringlen (JpgName, JpgNameLength)
             call stringlen (MetaName, MetaNameLength)
           call changecase ('SMALLS', ALine(30:ALineLength))
             call stringlen (JpgName, JpgNameLength)
             call stringlen (MetaName, MetaNameLength)
             call stringlen (JpgName, JpgNameLength)
             call stringlen (MetaName, MetaNameLength)
             call changecase ('SMALLS', ALine(30:ALineLength))
                 call stringlen (InfoBankID, InfoBankIDLength)
            call stringlen (DisplayID, DisplayIDLength)
           call changecase ('SMALLS', BLine(30:BLineLength))
             call stringlen (JpgName, JpgNameLength)
             call stringlen (MetaName, MetaNameLength)
             call stringlen (JpgName, JpgNameLength)
             call stringlen (MetaName, MetaNameLength)
     call htmlfoot (IDHtml, HtmlName(1:HtmlNameLength))
 call system ('/bin/rm /tmp/ids2idshtml.*.temp')
         call system ('cat /infobank/'//
*                Alphabet(Letter:Letter)//
*                '/*/meta/*.ids > '//
*                '/tmp/ids2idshtml.tempids.temp')
         call system ('cat /infobank/'//
*                Alphabet(Letter:Letter)//
*                '/*/meta/*.akas >> '//
*                '/tmp/ids2idshtml.tempids.temp')

         call system ('cat /infobank/'//
*                Alphabet(Letter:Letter)//
*                '/*/meta/*.ids >> '//
*                '/tmp/ids2idshtml.tempids.temp')
         call system ('cat /infobank/'//
*                Alphabet(Letter:Letter)//
*                '/*/meta/*.akas >> '//
*                '/tmp/ids2idshtml.tempids.temp')
 call system ('sort -u '//
*            '/tmp/ids2idshtml.tempids.temp > '//
*            '/tmp/ids2idshtml.sortedtempids.temp')

         call system ('/bin/rm '//
*            '/tmp/ids2idshtml.unsorted.ids.temp')
             call changecase ('SMALLS', ID)
             call stringlen (ID, IDLength)
         call system ('sort -u '//
*            '/tmp/ids2idshtml.unsorted.ids.temp > '//
*            '/tmp/ids2idshtml.letter.'//
*            Alphabet(Letter:Letter)//
*            '.ids.temp')
         call system ('sort -u '//
*            '/tmp/ids2idshtml.unsorted.ids.temp | '//
*            'sort -k 2.1b,2.10b > '//
*            '/tmp/ids2idshtml.letter.'//
*            Alphabet(Letter:Letter)//
*            '.ids.temp')
         call system ('/bin/rm '//
*            '/tmp/ids2idshtml.unsorted.ids.temp')
         call system ('sort -k 1.1,1.4r -k 1.5 -k 1.6,1.7 '//
*            '/tmp/ids2idshtml.unsorted.ids.temp > '//
*            '/tmp/ids2idshtml.year.'//
*            Alphabet(Letter:Letter)//
*            '.ids.temp')
         call system ('sort -k 1.1,1.4r -k 1.14,1.28 '//
*            '/tmp/ids2idshtml.unsorted.ids.temp > '//
*            '/tmp/ids2idshtml.year.'//
*            Alphabet(Letter:Letter)//
*            '.ids.temp')           
    

Skip footer navigational links


InfoBank   Menlo Park & Santa Cruz Centers   St. Petersburg Center   Woods Hole Center   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  

FirstGov button   Take Pride in America button