import csv
import json

csvfile = open('CollaborateCSV.csv', 'r')
jsonfile = open('collab.json', 'w')

fieldnames = ("Subject Discipline","Topic Name","Keyword","Hint")
reader = csv.DictReader(csvfile, fieldnames)
reader = unicode(reader)

topics = {}

for row in reader:
	if topics[row["Topic Name"]] is None:
		topic_name = row["Topic Name"]
		#create a new object
		topics[topic_name] = []
	obj = {

			"Keyword":row["Keyword"],
			"Hint":row["Hint"],
			"Subject Discipline":row["Subject Discipline"]
			
	}
	topics[row["Topic Name"]].append(obj)

topics.encode('utf-8')
jsonfile.write(topics)

@@ -21,50 +21,73 @@
 on%0A%0A
-csvfile = open('CollaborateCSV.csv'
+def csv2json(*readurl,*writeurl):%0A%09csvfile = open(readurl
 , 'r')%0A
+%09
 json
@@ -102,29 +102,24 @@
 pen(
-'collab.json'
+writeurl
 , 'w')%0A%0A
 fiel
@@ -114,16 +114,17 @@
 , 'w')%0A%0A
+%09
 fieldnam
@@ -181,16 +181,17 @@
 %22Hint%22)%0A
+%09
 reader =
@@ -231,47 +231,39 @@
 es)%0A
-reader = unicode(reader)%0A%0Atopics = %7B%7D%0A%0A
+%0A%09topics = %7B%7D%0A%09print(reader)%0A%0A%09
 for 
@@ -282,18 +282,25 @@
 r:%0A%09
-if topics%5B
+%09print(row)%0A%09%09if 
 row%5B
@@ -316,19 +316,25 @@
 me%22%5D
-%5D is None
+ not in topics
 :%0A
+%09
 %09%09to
@@ -364,16 +364,17 @@
 ame%22%5D%0A%09%09
+%09
 #create 
@@ -386,16 +386,17 @@
  object%0A
+%09
 %09%09topics
@@ -413,16 +413,17 @@
 e%5D = %5B%5D%0A
+%09
 %09obj = %7B
@@ -424,16 +424,17 @@
 bj = %7B%0A%0A
+%09
 %09%09%09%22Keyw
@@ -450,24 +450,25 @@
 %22Keyword%22%5D,%0A
+%09
 %09%09%09%22Hint%22:ro
@@ -481,16 +481,17 @@
 t%22%5D,%0A%09%09%09
+%09
 %22Subject
@@ -536,12 +536,15 @@
 %0A%09%09%09
-%0A
+%09%0A%09
 %09%7D%0A
+%09
 %09top
@@ -583,31 +583,9 @@
 j)%0A%0A
-topics.encode('utf-8')%0A
+%09
 json
@@ -599,12 +599,17 @@
 ite(
+str(
 topics)
+)
 %0A

Update csv2json