Beispiel #1
0
def print_map(config):
    colors = ''# 'greyscale'
    webpage = "http://localhost/collabs/static/v/worldmap.html?start=on&action=map&handle=hdl:10622/8FCYOX&catmax=6&ctrlist=&year=1981&lasty=2010&colors=" + colors
    fileformat = 'png'
    year = '1981'
    code = '4X6NCK'
    imagefile = chartonprint(webpage, fileformat, year, code, config['proxy'])
    return imagefile
Beispiel #2
0
def printall():
    config = configuration()
    if config['error']:
        return config['error']

    colors = ''# 'greyscale'
    root = request.url
    urigroup = re.search('\?(.+)', root)
    try:
        uri = urigroup.group(1)
    except:
        uri = root
    #webpage = config['apiroot'] + "/collabs/static/v/worldmap.html?start=on&action=map&dataset=4X6NCK&catmax=6&ctrlist=&year=1981&lasty=2010&colors=" + colors
    webpage = config['apiroot'] + "/collabs/static/v/worldmap.html?start=on&action=map&" + str(uri)  
    fileformat = 'png'
    year = '1982'
    code = '4X6NCK'
    imagefile = chartonprint(webpage, fileformat, year, code, config['proxy'])
    return redirect(imagefile, code=301)