Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/DPPP/kml/python/csml2kml/csml2kml/scripts/stations2kml.py@3742
Revision 3742,
449 bytes
checked in by domlowe, 13 years ago
(diff) |
changing entry points for python scripts
|
Line | |
---|
1 | import sys |
---|
2 | from csml2kml.StationConvertor import StationConvertor |
---|
3 | from csml2kml.ET import ElementTree |
---|
4 | |
---|
5 | def main(): |
---|
6 | # Get the config file name |
---|
7 | if len(sys.argv) != 2: |
---|
8 | raise ValueError('The name of config file (and nothing more) required') |
---|
9 | configFileName = sys.argv[1] |
---|
10 | |
---|
11 | # Load the configuration XML element |
---|
12 | config = ElementTree().parse(configFileName) |
---|
13 | |
---|
14 | # Do the conversion |
---|
15 | StationConvertor(config).convert() |
---|
Note: See
TracBrowser
for help on using the repository browser.