I’ve started a new open source project called Jester. Jester is a rules engine for points and badges, also known as Gamification.
Jester is written in Python, using Redis for storage.
I’ve created a tiny Domain Specific Language for defining rules using the pyparsing library.
A couple examples of rules:
create rule on game_play award 5 points create rule on game_play award badge game_addict when game_play occurs 5 times in 1 day This project is in the very early stages and is not yet functional as of this posting.
redis
- Redis supports a keys command, which takes in a pattern, but you can’t use patterns for deletes. Fortunately awk and xargs makes this easy. Just throw this on your server (somewhere in the PATH), chmod 755, and you’re good to go. #!/bin/bash redis-cli keys $1 | awk '{print $1}' | xargs --interactive redis-cli del {} \; How to use: redis-del pattern*