Building Your Web Site - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

Building Your Web Site

Description:

Pick out a couple of charts that can be made with the programs we ... Novella 12. Malone 11. Karr 10. Hyda 9. Hollibaugh 8. Franks 7. Fontaine 6. Dea 5. Craft 4 ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 39
Provided by: CU14
Category:
Tags: building | novella | site | web

less

Transcript and Presenter's Notes

Title: Building Your Web Site


1
Building Your Web Site
  • ATS 315

2
Your Project
  • Make a web site that shows plots that YOU
    generated!
  • Plots should regenerate every hour!

3
Step 1 Decide what plots you want to show
  • Pick out a couple of charts that can be made with
    the programs we have written this semester.
  • Dont go nutsmaybe 4 or 5 plots at most!

4
Step 2 Make special versions of your programs
with NO interaction!
  • Your programs shouldnt require anyone to choose
    a variable, domain, contour interval or anything
    like that.
  • Each program should produce ONE chart!

5
Step 3 Modify these programs so that they
produce an XWD file
  • XWD XWindow Dump
  • a file format for images, similar to GIF
  • Well learn how to do this later.

6
Step 4 Create a script that runs these
programs.
  • scripts little programs that perform unix
    commands.
  • Well learn more about this later.

7
Step 5 Set up a crontab that runs your
script each hour
  • crontabs are scripts that execute on a schedule.
  • Well learn more about this later.

8
Step 6 Make an HTML page to display your output
  • You already know how to do this!

9
The Steps
  • Decide what youll show
  • Versions w/o interaction
  • Produce XWD files
  • Set up scripts
  • Set up crontabs
  • Write HTML code

10
Step 3 Produce XWD files of your maps
  • /export/home/schragej/X/xwdjms
  • a special version of a standard unix program
    xwd
  • captures a graphics window and saves it as a .xwd
    file
  • no beeping!
  • xwdjms name myplot

11
Step 3 Produce XWD files of your maps
  • /export/home/schragej/X/xwdjms
  • a special version of a standard unix program
    xwd
  • captures a graphics window and saves it as a .xwd
    file
  • no beeping!
  • xwdjms name myplot

The name of the graphics window that you
opened! Dont use any spaces!
12
Step 3 Produce XWD files of your maps
  • xwdjms uses printf to dump everything it does
    to the screen.
  • You need to capture this to a file!
  • xwdjms name myplot gt image.xwd

13
Step 3 Produce XWD files of your maps
  • xwdjms is a UNIX command, not a C command!
  • system( )

14
Step 3 Produce XWD files of your maps
  • xwdjms is a UNIX command, not a C command!
  • system( )
  • Example
  • system(rm .dat)

15
Step 3 Produce XWD files of your maps
  • system(/export/home/schragej/X/xwdjms name
    myplot gt image.xwd)

16
Step 3 Produce XWD files of your maps
  • system(/export/home/schragej/X/xwdjms name
    myplot gt image.xwd)
  • Also, turn off the ghold!!!!!!!!

17
Step 3 Produce XWD files of your maps
  • system(/export/home/schragej/X/xwdjms name
    myplot gt image.xwd)
  • Also, turn off the ghold!!!!!!!!
  • Still more problems

18
Step 3 Produce XWD files of your maps
  • Draw the map
  • Draw the data
  • system(xwdjms)
  • Even though youve given the orders to draw all
    the lines and all the data, the graphics might
    not keep up

19
Step 3 Produce XWD files of your maps
  • Draw the map
  • Draw the data
  • system(xwdjms)
  • when you call xwdjms, its possible/likely that
    the picture isnt done yet!
  • Youll capture a partial image!

20
Step 3 Produce XWD files of your maps
  • Draw the map
  • Draw the data
  • XFlush(display)
  • system(xwdjms)
  • You need to XFlush the display.

21
Step 3 Produce XWD files of your maps
  • Draw the map
  • Draw the data
  • XFlush(display)
  • system(xwdjms)
  • You need to XFlush the display.

22
Step 3 Produce XWD files of your maps
  • Draw the map
  • Draw the data
  • XFlush(display)
  • system(xwdjms)
  • Display display
  • display gget_xdisplay()

23
Step 3 Produce XWD files of your maps
  • Display display
  • display gget_xdisplay()
  • Draw the map
  • Draw the data
  • XFlush(display)
  • system(xwdjms)

24
The Steps
  • Decide what youll show
  • Versions w/o interaction
  • Produce XWD files
  • Set up scripts
  • Set up crontabs
  • Write HTML code

25
Step 4 Create a script that runs these
programs.
  • scripts little programs that perform unix
    commands.
  • An example of a script

26
Step 4 Create a script that runs these
programs.
  • An example of a script

! /bin/csh f rm .gif mv sample.data my.data
27
Step 4 Create a script that runs these
programs.
  • All scripts start with pound bang space slash
    bin slash sea ess aich space minus eff

! /bin/csh f rm .gif mv sample.data my.data
28
Step 4 Create a script that runs these
programs.
  • Everything after that just runs as if you typed
    it at the keyboard in Unix.

! /bin/csh f rm .gif mv sample.data my.data
29
Step 4 Create a script that runs these
programs.
  • Everything after that just runs as if you typed
    it at the keyboard in Unix.

! /bin/csh f setenv DISPLAY wx-sun10. rm
.xwd MakeTempContours /opt/sfw/bin/convert
image.xwd temperature.gif mv temperature.gif
public_html
30
Step 4 Create a script that runs these
programs.
  • Change the execution privileges on your script
  • chmod ax MyScript
  • Test it.

31
The Steps
  • Decide what youll show
  • Versions w/o interaction
  • Produce XWD files
  • Set up scripts
  • Set up crontabs
  • Write HTML code

32
Step 5 Set up a crontab that runs your
script each hour
  • crontabs are scripts that execute on a schedule.
  • To edit a crontab, you need to have set the
    EDITOR variable to your favorite editor
  • setenv EDITOR vi
  • setenv EDITOR pico

33
Step 5 Set up a crontab that runs your
script each hour
  • start editing
  • crontab e
  • Every line of the crontab schedules one task to
    be run repeatedly.
  • There are 6 entries on every line

34
Step 5 Set up a crontab that runs your
script each hour
  • The first entry is the MINUTE of each hour during
    which to run your job.

Adams 1
Affelt
Augustyn 2
Campbell 3
Craft 4
Dea 5
Fontaine 6
Franks 7
Hollibaugh 8
Hyda 9
Karr 10
Malone 11
Novella 12
Robinson 13
Selin 14
Smoliak 15
Taylor 16
Wilson 17
15 /export/home/schragej/MyScript
35
Step 5 Set up a crontab that runs your
script each hour
  • Entries 2, 3, 4, and 5 are the hour, day, day of
    week and day of month on which to run the job.
  • A star means every.

15 /export/home/schragej/MyScript
36
Step 5 Set up a crontab that runs your
script each hour
  • The sixth entry is the name of your script, with
    the full path name!
  • If your script prints ANYTHING to the screen,
    youll need to include
  • gt /dev/null
  • or the output will be emailed to you!

15 /export/home/schragej/MyScript
37
The Steps
  • Decide what youll show
  • Versions w/o interaction
  • Produce XWD files
  • Set up scripts
  • Set up crontabs
  • Write HTML code

38
Your (Last!) Assignment
  • Impress me with a web site with weather charts
    that refresh hourly!
Write a Comment
User Comments (0)
About PowerShow.com