http://pastie.org/4642740
How to use:
- Save it with PY extension. ie; new_comments.py
- If you don’t have a Python interpreter, download one: http://www.python.org/getit/
- Run the file and enjoy.
You can change the line user=raw_input("Enter your Kongregate name.\n\t\t") for something like user="Abigayl", so it automatically browses your games instead of asking you to input your name everytime.
Also, the first time it will tell you that you have new comments in all the games. That’s normal, since the save file doesn’t exist and the program will see all comments as new ones.
And it will store the info in data.txt so make sure that there’s not a file with that name in the folder where you save the PY file or its content will be replaced.
Finally, it’s designed to handle a single user. If you use it with a name and then run it with a different name, it won’t work properly.
This can be avoided by placing copies of the PY file in different directories or temproary renaming the old data.txt file and switching the names of the data files when necessary.
E: Uploaded a new version which runs a bit faster.
Also, don’t edit the data.txt file.
I don’t know what happens, but even if you edit it in a valid format, the thing messes up the application and throws a couple of empty values. I’m guessing it’s some sort of special character or something.</edit>
If anyone knows Python and has some free time, it’d be nice if you could clean this and post an updated version.
Before this, all I’ve done with Python was some super small script/mods, and I bet this code is full of stuff done in the worst possible way.
|