Commit a49339c4 authored by christoffer.stoll's avatar christoffer.stoll
Browse files

more arguments

parent 1ac9aa13
......@@ -10,6 +10,6 @@ Retrieves data for Albania from external server and converts it to Raven friendl
## Usage
```
python al2obs.py --output observations.csv
python al2obs.py --output observations.csv --usr username --psw password
```
......@@ -14,7 +14,11 @@ import argparse
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument(
'--output', help='Name of output file', default='observations.csv')
'--usr', help='Username for the external server', default='')
parser.add_argument(
'--psw', help='Password for the external server', default='')
parser.add_argument('--output', help='Name of output file',
default='observations.csv')
return parser.parse_args()
......@@ -22,8 +26,8 @@ args = get_args()
# HARD-CODED PARAMETERS
url = "http://easkunde3.eu/cgi-bin/leineweb_cgi.cgi"
usr = "Albania"
pwd = "MoEonly"
usr = args.usr
pwd = args.psw
fmt = "CSV"
data = []
columns = ["sampling_point_id", "begin_position", "end_position", "value",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment