![]() ![]() | ![]() |
Removed 7.3 installation instructions link.
1: #!/usr/bin/perl -w 2: 3: =pod 4: 5: =NAME 6: 7: generate_web_pages.pl - generate the web pages for the install site 8: 9: =SYNOPSIS 10: 11: Yeah, it does that. 12: 13: Basically, there's a few comments in shell.html that we replace with 14: what we really want in the files. Pretty simple. 15: 16: The point of this is to look like the main site. 17: 18: =cut 19: 20: # This is the list of pages to generate: Change this to 21: # add/subtract/etc. pages. Index is done seperately. 22: # Title, source 23: 24: my @pages = ( 25: # ['Red Hat 7.3 Install', 'rh73'], 26: ['Fedora Install', 'fedora_install'], 27: ['Fedora Core 3 Install', 'FC3_install'], 28: ['Manual Install from Tarballs', 'manual_install'], 29: ['Upgrading from Previous LON-CAPA install', 'upgrade'], 30: ['Post-installation Configuration', 'config'], 31: ['LON-CAPA License (Gnu Public License)', 'license'] 32: ); 33: 34: open SHELL, '<', "shell.html"; 35: my $shell = join '', <SHELL>; 36: $shell =~ s/\r/\n/g; 37: 38: # Call with: The title, breadcrumb, and content 39: sub replaceText { 40: my ($title, $breadcrumb, $content) = @_; 41: 42: my $page = $shell; 43: $page =~ s/\<!-- *title *--\>/$title/g; 44: $page =~ s/\<!-- *breadcrumb *--\>/$breadcrumb/g; 45: $page =~ s/\<!-- *content *--\>/$content/g; 46: 47: return $page; 48: } 49: 50: # Do the index page 51: 52: open INDEX, '>', "index.html"; 53: my $content = <<PRELUDE; 54: <p>LON-CAPA is based upon a lot of Open Source modules, so it's important 55: to have the right environment on your computer. Since it will frequently 56: be the case that LON-CAPA will be going onto a dedicated machine, we've 57: included instructions for installing LON-CAPA concurrently with new 58: installations of some of the popular Linux distributions.</p> 59: 60: <p>A tarball installation is also available for those who wish to 61: install on other distributions. Currently, Apache 1.x is required; 62: LON-CAPA does not yet run on 2.0.</p> 63: 64: <p>For all distributions, please see how to 65: <a href="config.html">configure the server after installation</a>.</p> 66: <hr /> 67: PRELUDE 68: 69: $content .= "<ul>\n"; 70: for (@pages) { 71: $content .= "<li><a href='$_->[1].html'>$_->[0]</a></li>\n"; 72: } 73: 74: $content .= "</ul>\n"; 75: 76: $content .= <<'POSTLUDE'; 77: <hr /> 78: <a name="download" /> 79: <h3>Downloading LON-CAPA</h3> 80: 81: <p> 82: <b>Current Production Release is Version LATESTVERSION. 83: This version was released on LATESTDATE.</b> 84: </p> 85: <p> 86: You can download the <b>most current production version of LON-CAPA</b> at 87: <a href="http://install.lon-capa.org/versions/loncapa-current.tar.gz"> 88: http://install.lon-capa.org/versions/loncapa-current.tar.gz</a> 89: (version LATESTVERSION). 90: </p> 91: TESTINGRELEASE_START 92: <p> 93: <b>Current Testing Release is Version LATESTTESTINGVERSION. 94: This version was released on LATESTTESTINGDATE.</b> 95: </p> 96: <p> 97: You can download the <b>testing version of the upcoming LON-CAPA</b> at 98: <a href="http://install.lon-capa.org/versions/loncapa-testing.tar.gz"> 99: http://install.lon-capa.org/versions/loncapa-testing.tar.gz</a> 100: (version LATESTTESTINGVERSION). 101: </p> 102: TESTINGRELEASE_END 103: <p> 104: The <b>development release of LON-CAPA</b> is at: 105: <a href="http://install.lon-capa.org/versions/loncapa-unstable.tar.gz"> 106: http://install.lon-capa.org/versions/loncapa-unstable.tar.gz</a>. 107: </p> 108: <p> 109: To view the code development history of LON-CAPA, you can access a <a 110: href="http://zaphod.lite.msu.edu/cgi-bin/cvsweb.cgi/">web version</a> 111: of our CVS respository. Otherwise, please contact Helen (<a 112: href="mailto:helen@lon-capa.org"> helen@lon-capa.org</a>) to request a 113: CVS USERNAME. 114: </p> 115: <p> 116: The initial CVS commands would be: 117: </p> 118: <blockquote> 119: <table bgcolor="#aaaaaa" border="1"> 120: <tr><td> 121: <pre> 122: export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs 123: cvs login 124: cvs co loncapa 125: </pre> 126: </td></tr></table> 127: </blockquote> 128: <p> 129: For more information on using CVS, please visit 130: <a href="http://www.cvshome.org/">http://www.cvshome.org/</a> 131: or read <tt>loncom/build/readme.html</tt> after downloading 132: the current version of LON-CAPA as described above. 133: </p> 134: 135: POSTLUDE 136: 137: my $index = replaceText("Install LON-CAPA", "Install LON-CAPA", 138: $content); 139: 140: print INDEX $index; 141: close INDEX; 142: 143: # Build the pages 144: for (@pages) { 145: my ($title, $source) = @$_; 146: 147: # read in content 148: open SOURCE, '<', $source.'.frag'; 149: $content = join '', <SOURCE>; 150: close SOURCE; 151: 152: $content = replaceText($title, '<a href="/">Install LON-CAPA</a> > ' . $title, 153: $content); 154: open DEST, '>', $source.'.html'; 155: print DEST $content; 156: close DEST; 157: }