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

USGS InfoBank program -- dates2html

Skip navigational links
Search InfoBank
Home tab Atlas tab Activities tab FACS tab Geology School tab More tab More tab Activities tabs
   
InfoBank Programs: by Name   by Topic  
   
Expanded description
Topic Description
Name
dates2html
Synopsis
/infobank/programs/html/dates2html/dates2html.for
Description
  Program to generate list of days for an activity.
    
Author
  Clint Steele        7/26/01


    
Opens
 open (unit = 90,
*      access = 'sequential',
*      form = 'formatted',
*      status = 'old',
*      file = '/tmp/dates2html_dates.temp')

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

 open (unit = 92,
*      access = 'sequential',
*      form = 'formatted',
*      status = 'old',
*      file = '/tmp/dates2html_sorted.temp')

         open (unit = 94,             ! header
*            access = 'sequential',
*              form = 'formatted',
*            status = 'unknown',
*              file = '/tmp/dates2html.part1.temp')

     open (unit = 65,
*          access = 'sequential',
*          form = 'formatted',
*          status = 'unknown',
*          name = Link(1:LinkLength))

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

    
Reads
     read (90, '(a7,t10,i2,1x,i2,1x,i4,
*                t25,i3,
*                t34,i2,1x,i2,1x,i4,
*                t49,i3)', end = 99)
*        ID, 
*        StartMonth, StartDay, StartYear,
*        StartJDay, 
*        EndMonth, EndDay, EndYear,
*        EndJDay

     read (92, '(i4.4,1x,i2.2,1x,i2.2,1x,i3.3,1x,
*                i4.4,1x,i2.2,1x,i2.2,1x,i3.3,1x,q,a)',
*                end = 999)
*                StartYear,
*                StartMonth, 
*                StartDay,
*                StartJDay,
*                EndYear,
*                EndMonth, 
*                EndDay,
*                EndJDay,
*                IDLength,
*                ID(1:IDLength)

         read (65, '(q,a)', end = 6599)
*            IDsLinkLength, IDsLink(1:IDsLinkLength)
 read (90, '(t36,i4)', end = 99) FirstYear
     read (90, '(t36,i4)', end = 99) LastYear
    
Writes
         write (91, '(i4.4,1x,i2.2,a,i2.2,1x,i3.3,1x,
*                     i4.4,1x,i2.2,a,i2.2,1x,i3.3,1x,a)')
*                StartYear,  
*                StartMonth, '/', 
*                StartDay, 
*                StartJDay,
*                EndYear,
*                EndMonth, '/',
*                EndDay,
*                EndJDay,
*                ID(1:IDLength)

         write (91, '(i4.4,1x,a,1x,
*                     i4.4,1x,i2.2,a,i2.2,1x,i3.3,1x,a)')
*                EndYear,
*                '01/01 001', 
*                EndYear,
*                EndMonth, '/',
*                EndDay,
*                EndJDay,
*                ID(1:IDLength)

         write (91, '(i4.4,1x,i2.2,a,i2.2,1x,i3.3,1x,
*                     i4.4,1x,a,1x,i3.3,1x,a)')
*                StartYear,  
*                StartMonth, '/', 
*                StartDay, 
*                StartJDay,
*                StartYear,  
*                '12/31',
*                YearLength,
*                ID(1:IDLength)
             write (94, '(12x,a,/)') '</table>'
             write (94, '(10x,a)') '</td>'
             write (94, '(8x,a)') '</tr>'
             write (94, '(6x,a,/)') '</table>'
             write (94, '(6x,a,//,6x,a,/,8x,a,/,6x,a)')
*                '<p>',
*                '<font COLOR="GREEN">',
*                'Time is nature''s way of making sure that '//
*                'everything doesn''t happen at once.',
*                '</font>'

         write (OutDate, '(i4.4)') CurrentYear
 write (94, '(6x,a)')
*           'Click on the '//
*           '<img src="http://walrus.wr.usgs.gov'//
*           '/infobank/programs/html/tools/'//
*           'googleearth.jpg" alt="Google Earth icon" '//
*           'width="12" border="0">'//
*    ' to Download for Google Earth'


 write (94, '(6x,a)') '<p>'
 write (94, '(6x,a)')
*           'Click on the '//
*           '<img src="http://walrus.wr.usgs.gov'//
*           '/infobank/programs/html/tools/'//
*           'googlemaps.jpg" alt="Google Maps icon" '//
*           'width="12" border="0">'//
*    ' to view with Google Maps'

         write (94, '(6x,a)') '<table border="0" '//
         write (94, '(8x,a)') '<tr>'
         write (94, '(10x,a)') '<td width="5%">'
         write (94, '(12x,a)') '<table border="0">'
         write (94, '(14x,a)') '<tr>'
         write (94, '(16x,a)') '<td> </td>'
         write (94, '(14x,a)') '</tr>'
         write (94, '(12x,a,/)') '</table>'
         write (94, '(12x,a)') '<table border="1" '//
     write (HyphenID, '(10x)')
     write (Link, '(512x)')
     write (Link, '(a)')
*        '/infobank/'//
*        ID(1:1)//
*        '/'//
*        ID(1:IDLength)//
*        '/meta/'//
*        HyphenID(1:IDLength+3)//
*        '.ids'

     write (94, '(14x,a)') '<tr>'
         write (94, '(16x,a,i2.2,a,i2.2,a,i2.2,a,i2.2,a,/)')
*            '<td '//
*            'bgcolor="#ffffff">',
*            StartMonth,'/',StartDay,'-',
*            EndMonth,'/',EndDay,
*            '</td>'

         write (94, '(16x,a,i2.2,a,i2.2,a,i2.2,a,i2.2,a,/)')
*            '<td '//
*            'bgcolor="#ccffff">',
*            StartMonth,'/',StartDay,'-',
*            EndMonth,'/',EndDay,
*            '</td>'   
     write (94, '(16x,a)') '<td>'
     write (94, '(18x,a,i3.3,a)')
*        '<table border="1" width=',YearLength,'>'
     write (94, '(20x,a)') '<tr>'
         write (94, '(22x,a,i,a)')
*            '<td width="',
*            StartJDay-1,
         write (94, '(22x,a,i,a)')
*            '<td width="',
*            EndJDay-StartJDay+1,
         write (94, '(22x,a,i,a)')
*            '<td width="',
*            EndJDay-StartJDay+1,
         write (94, '(22x,a,i,a)')
*            '<td width="',
*            YearLength-EndJDay+1,
     write (94, '(20x,a)') '</tr>'
     write (94, '(18x,a)') '</table>'
     write (94, '(16x,a,/)') '</td>'
    write (94, '(22x,a)') 
*       '<td width=16 align="center" bgcolor="#ccffff">'

        write (94, '(2x,a)')
*           '<a href="http://maps.google.com/maps?q='//
*           'http://walrus.wr.usgs.gov'//
*           '/infobank/'//LowercaseID(1:1)//'/'//
*           LowercaseID(1:IDLength)//'/html/'//
*           LowercaseHyphenID(1:IDLength+3)//
*           '.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 (94, '(2x,a)')
*           '<a href="http://maps.google.com/maps?q='//
*           'http://walrus.wr.usgs.gov'//
*           '/infobank/'//LowercaseID(1:1)//'/'//
*           LowercaseID(1:IDLength)//'/html/'//
*           LowercaseHyphenID(1:IDLength+3)//
*           '.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 (94, '(24x,a)') ' '
    write (94, '(22x,a)') '</td>'
    write (94, '(22x,a)') 
*       '<td width=16 align="center" bgcolor="#ccffff">'

        write (94, '(2x,a)')
*           '<a href="http://walrus.wr.usgs.gov'//
*           '/infobank/'//LowercaseID(1:1)//'/'//
*           LowercaseID(1:IDLength)//'/html/'//
*           LowercaseHyphenID(1:IDLength+3)//'.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 (94, '(2x,a)')
*           '<a href="http://walrus.wr.usgs.gov'//
*           '/infobank/'//LowercaseID(1:1)//'/'//
*           LowercaseID(1:IDLength)//'/html/'//
*           LowercaseHyphenID(1:IDLength+3)//'.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 (94, '(24x,a)') ' '
    write (94, '(22x,a)') '</td>'
    write (94, '(22x,a)') '<td bgcolor="#ccffff">'
             write (94, '(18x,a)') 
*            '<strong>'//
*            IDsLink(30:IDsLinkLength)//
*            '</strong>'
             write (94, '(18x,a)')
*            '  '//
*            IDsLink(30:IDsLinkLength)
     write (94, '(22x,a)') '</td>'
     write (94, '(22x,a)') '<td>'
     write (94, '(24x,a)')
*        '<img src="http://walrus.wr.usgs.gov'//
*        '/infobank/'//LowercaseID(1:1)//'/'//
*        LowercaseID(1:IDLength)//'/html/'//
*        LowercaseHyphenID(1:IDLength+3)//
*        '.nav.150px.jpg" alt = "thumbnail map" width="75">'
     write (94, '(22x,a)') '</td>'
     write (94, '(14x,a,/)') '</tr>'
 write (94, '(14x,a,/)') '</table>'
 write (94, '(12x,a)') '</td>'
 write (94, '(10x,a)') '</tr>'
 write (94, '(8x,a,/)') '</table>'
 write (94, '(6x,a,//,6x,a,/,8x,a,/,6x,a)')
*    '<p>',
*    '<font COLOR="GREEN">',
*    'Time is nature''s way of making sure that '//
*    'everything doesn''t happen at once.',
*    '</font>'

 write (94, '(14x,a)') '<tr>'
 write (94, '(16x,a,/)') '<th align="center" bgcolor="#ccffff">'//
*           'Dates</th>' 

 write (94, '(16x,a)') '<th>'
 write (94, '(18x,a,i3.3,a)') 
*   '<table border="1" bgcolor="#ccffff" width=',YearLength,'>'
 write (94, '(20x,a)') '<tr>'
 write (94, '(22x,a)') '<td width="31" align="center">J</td>'
 write (94, '(22x,a,i2.2,a)') '<td width="', YearLength - 337,
*                                   '" align="center">F</td>'
 write (94, '(22x,a)') '<td width="31" align="center">M</td>'
 write (94, '(22x,a)') '<td width="30" align="center">A</td>'
 write (94, '(22x,a)') '<td width="31" align="center">M</td>'
 write (94, '(22x,a)') '<td width="30" align="center">J</td>'
 write (94, '(22x,a)') '<td width="31" align="center">J</td>'
 write (94, '(22x,a)') '<td width="31" align="center">A</td>'
 write (94, '(22x,a)') '<td width="31" align="center">S</td>'
 write (94, '(22x,a)') '<td width="31" align="center">O</td>'
 write (94, '(22x,a)') '<td width="30" align="center">N</td>'
 write (94, '(22x,a)') '<td width="31" align="center">D</td>'
 write (94, '(20x,a)') '</tr>'
 write (94, '(18x,a)') '</table>'
 write (94, '(16x,a,/)') '</th>'
 write (94, '(16x,a)') '<th> </th>'
 write (94, '(16x,a)') '<th> </th>'
 write (94, '(16x,a,a,a)') '<th '//
*           'bgcolor="#ccffff" align="center">',
*           'IDs',
*           '</th>'

 write (94, '(14x,a,/)') '</tr>'
 write (94, '(2x,a)') '<tr>'
 write (94, '(4x,a)') 
*    '<td valign="top" align="right" width="10%">'
 write (94, '(6x,a)') '<b>Year:</b>'
 write (94, '(4x,a,/)') '</td>'
 write (94, '(4x,a)') '<td valign="middle">'
     write (AYear, '(i4.4)') Year
         write (94, '(6x,a,i2.2,a)')
*            '<a href="http://walrus.wr.usgs.gov'//
*            '/infobank/programs/html/dates2html'//
*            '/'//AYear//'.html">',ShortYear,'</a>  '
 write (94, '(4x,a)') '</td>'
 write (94, '(2x,a,/)') '</tr>'
    
Calls
     call system ('/bin/cat /infobank/'//
*         Alpha(Loop:Loop)//
*         '/*/meta/*.dates > '//
*         '/tmp/dates2html_dates.temp') 

         call system ('/bin/cat /infobank/'//
*         Alpha(Loop:Loop)//
*         '/*/meta/*.dates >> '//
*         '/tmp/dates2html_dates.temp')
 call system ('/bin/cp /tmp/dates2html_dates.temp '//
*             '/infobank/programs/keep/dates.keep')

     call stringlen (ID, IDLength)
 call system ('/bin/sort '//
*     '/tmp/dates2html_days.temp > '//
*     '/tmp/dates2html_sorted.temp')

 call system ('/bin/rm /tmp/dates2html_days.temp')
             call htmlfoot (94,
*                'http://walrus.wr.usgs.gov/'//
*                'infobank/programs/html/'//
*                'dates2html/'//
*                OutDate//'.html')

             call system ('/bin/cat '//
*                '/tmp/dates2html.part1.temp '//
*                '> /infobank/programs/html/'//
*                'dates2html/'//OutDate//'.html')

             call system ('/bin/rm '//
*                '/tmp/dates2html.part*.temp')
         call htmlhead (94, 'CMG Years ('//OutDate//
*            ') Data & Metadata')

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

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

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

         call datecontrol
 call includeit (94,
*    '/infobank/programs/html/tools/virtualglobesstart.tabs')
 call includeit (94,
*    '/infobank/programs/html/tools/virtualglobesend.tabs')

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

         call datebar (YearLength, CurrentYear)
     call stringlen (Link, LinkLength)
     call changecase ('SMALLS', Link(1:LinkLength))
     call changecase ('SMALLS', LowercaseID)
     call changecase ('SMALLS', LowercaseHyphenID)
 call htmlfoot (94,
*                'http://walrus.wr.usgs.gov/'//
*                'infobank/programs/html/'//
*                'dates2html/'//
*                OutDate//'.html')

 call system ('/bin/cat '//
*                '/tmp/dates2html.part1.temp '//
*                '> /infobank/programs/html/'//
*                'dates2html/'//OutDate//'.html')

 call system ('/bin/rm '//
*                '/tmp/dates2html.part*.temp')

 call system ('/bin/rm '//
*                '/tmp/dates2html_*.temp')

 call system ('/bin/ls -1 '//
*    '/infobank/programs/html/dates2html/????.html > '//
*    '/tmp/dates2html_htmllist.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