#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Strassenliste.py
# Version 1.0 by Benjamin Lebsanft
# Licensed under CC-BY-SA 3.0
#
# Script to create a wiki page for
# http://osm.gt.owl.de/Strassenliste/
#
# Usage: Strassenliste.py list relation
#
# list is expected to be a text file with
# each line containing one streetname, doesn't
# need to be sorted alphabetically
#
# relation is the relation id of the municipality

import sys
import array

list_array = []
relation = sys.argv[2]

list_file = open(sys.argv[1], 'r' ).readlines()
list_array.append(list_file)
list_array[0].sort()

print "`Output <http://osm.gt.owl.de/Strassenliste/output/" + relation + ">`_\n"
print "Relation:" + relation + "\n"
print "List: \n"

for i in range(len(list_array[0])):
	print "* " + list_array[0][i].rstrip()
