aidanhs / emsnudown_tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A set of comment data tests for aidanhs/emsnudown.

Originally obtained from here until it was removed.

New comments may be obtained with the comment stream.

Anonymisation has been performed with

$ mv 2013-06-27_HOUR-21 2013-06-27_HOUR-21_full
$ python
>>> import json
>>> comments = open("2013-06-27_HOUR-21_full").readlines()
>>> comments = map(lambda x: json.loads(x), comments)
>>> comments = map(lambda x: {u"body": x["body"]}, comments)
>>> out = open("2013-06-27_HOUR-21_stripped", "w")
>>> out.writelines(map(lambda x: json.dumps(x) + "\n", comments))
>>> out.close()
>>>
>>> import re
>>> comments = map
>>> comments = map(lambda x: {u"body": re.sub("[a-z]", "m", x["body"])}, comments)
>>> comments = map(lambda x: {u"body": re.sub("[A-Z]", "M", x["body"])}, comments)
>>> comments = map(lambda x: {u"body": re.sub("[0-9]", "5", x["body"])}, comments)
>>> out = open("2013-06-27_HOUR-21_anon", "w")
>>> out.writelines(map(lambda x: json.dumps(x) + "\n", comments))
>>> out.close()
>>> exit()
$ ln -s 2013-06-27_HOUR-21_anon 2013-06-27_HOUR-21
$ git add 2013-06-27_HOUR-21_anon 2013-06-27_HOUR-21

Note that this loses some markdown structure, e.g. ordered bullets.

If you have original comment files you can point the symlink at them instead.

About