mailr23177 - in /website: .setup_redirects.py api/fdl.html


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on May 14, 2014 - 20:28:
Author: bugman
Date: Wed May 14 20:28:42 2014
New Revision: 23177

URL: http://svn.gna.org/viewcvs/relax?rev=23177&view=rev
Log:
Created a Python script for automatically creating all meta refresh redirect 
HTML pages.

This currently creates two HTML pages which refresh to their intended current 
page.  One of these,
api/fdl.html, has been added to the repository.


Added:
    website/.setup_redirects.py
    website/api/fdl.html

Added: website/.setup_redirects.py
URL: 
http://svn.gna.org/viewcvs/relax/website/.setup_redirects.py?rev=23177&view=auto
==============================================================================
--- website/.setup_redirects.py (added)
+++ website/.setup_redirects.py Wed May 14 20:28:42 2014
@@ -0,0 +1,22 @@
+#! /usr/bin/env python
+
+# This Python script is for setting up all of the meta refresh redirects 
required for the relax website.
+
+# The list of redirects to build.  The first element is the old page, the 
second is the new page.
+redirects = [
+        ['manual/d_Auvergne_protocol_GUI_mode_relaxation_interaction.html', 
'manual/d_Auvergne_protocol_GUI_mode_relaxation_interactions.html'],
+        ['api/fdl.html', 'fdl.html'],
+]
+
+# Loop over all redirects, automatically creating the webpage.
+for old, new in redirects:
+    # Open the old file for writing.
+    file = open(old, 'w')
+
+    # Add the contents.
+    file.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 
Transitional//EN\">\n")
+    file.write("<HTML>\n")
+    file.write("<HEAD>\n")
+    file.write("    <meta http-equiv=\"refresh\" content=\"0; 
url=http://www.nmr-relax.com/%s\";>\n" % new)
+    file.write("</HEAD>\n")
+    file.write("</HTML>\n")

Added: website/api/fdl.html
URL: http://svn.gna.org/viewcvs/relax/website/api/fdl.html?rev=23177&view=auto
==============================================================================
--- website/api/fdl.html        (added)
+++ website/api/fdl.html        Wed May 14 20:28:42 2014
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+    <meta http-equiv="refresh" content="0; 
url=http://www.nmr-relax.com/fdl.html";>
+</HEAD>
+</HTML>




Related Messages


Powered by MHonArc, Updated Wed May 14 20:40:02 2014