diff options
Diffstat (limited to 'tools/mmd')
-rw-r--r-- | tools/mmd/MmdCommands.py | 6 | ||||
-rw-r--r-- | tools/mmd/MmdSatellite.py | 5 | ||||
-rw-r--r-- | tools/mmd/MmdWidgets.py | 12 | ||||
-rw-r--r-- | tools/mmd/mmd.wsgi | 2 |
4 files changed, 25 insertions, 0 deletions
diff --git a/tools/mmd/MmdCommands.py b/tools/mmd/MmdCommands.py index a60bf51..3cd5466 100644 --- a/tools/mmd/MmdCommands.py +++ b/tools/mmd/MmdCommands.py @@ -108,6 +108,12 @@ def cancelRegistration (session): session.user.cancel (code) return indexWidget (dataWidget (session), cancelRegistrationWidget (), statusWidget (session), session) +def credits (session): + ''' + display a page with credits/thanks + ''' + return indexWidget (dataWidget (session), creditsWidget (), statusWidget (session)) + def submitForm (session): """ display the form for data submission diff --git a/tools/mmd/MmdSatellite.py b/tools/mmd/MmdSatellite.py index 97f516a..9e9a041 100644 --- a/tools/mmd/MmdSatellite.py +++ b/tools/mmd/MmdSatellite.py @@ -152,6 +152,11 @@ class Satellite: return False def _compareAndLinkNewTLEFile (self, filename): + ''' + we should use field 21-32 from first line of TLE to + compare data; then use this date to generate a filename + and update the database; + ''' old_data = open (self.tle_filename).read () new_data = open (filename).read () if old_data == new_data: diff --git a/tools/mmd/MmdWidgets.py b/tools/mmd/MmdWidgets.py index 6e55036..44ff5de 100644 --- a/tools/mmd/MmdWidgets.py +++ b/tools/mmd/MmdWidgets.py @@ -249,6 +249,18 @@ def cancelRegistrationWidget (): return html +def creditsWidget (): + html = ''' + <div> + Thanks to <a href="http://openstreetmap.org/">OpenStreetMap</a> for this great project. Plotting the + trajectory would not have been possible without <a href="http://openlayers.org">OpenLayers</a> JavaScript + Mapping Library and the <a href="http://rhodesmill.org/pyephem/index.html">PyEphem</a> module to compute + astronomical data. + </div> + ''' + + return html + def errorWidget (error_message): html = ''' <h3>An error occured!</h3> diff --git a/tools/mmd/mmd.wsgi b/tools/mmd/mmd.wsgi index 5503c40..729bb0e 100644 --- a/tools/mmd/mmd.wsgi +++ b/tools/mmd/mmd.wsgi @@ -71,6 +71,8 @@ def application (environ, response): body = completeRegistration (session) elif cmd == 'cancelRegistration': body = cancelRegistration (session) + elif cmd == 'credits': + body = credits (session) elif cmd == 'mmdtest': body = mmdtest (environ, cookie) content_type = 'text/plain' |