Tweaks, improved reddit

This commit is contained in:
Luke Rogers 2014-02-14 16:21:00 +13:00
parent 7265413a21
commit b4d7e200a3
3 changed files with 82 additions and 80 deletions

View file

@ -1,79 +1,79 @@
{ {
"templates":[ "templates": [
"rips off {user}'s {limbs} and leaves them to die.", "rips off {user}'s {limbs} and leaves them to die.",
"grabs {user}'s head and rips it clean off their body.", "grabs {user}'s head and rips it clean off their body.",
"grabs a {gun} and riddles {user}'s body with bullets.", "grabs a {gun} and riddles {user}'s body with bullets.",
"gags and ties {user} then throws them off a {tall_thing}.", "gags and ties {user} then throws them off a {tall_thing}.",
"crushes {user} with a huge spiked {spiked_thing}.", "crushes {user} with a huge spiked {spiked_thing}.",
"glares at {user} until they die of boredom.", "glares at {user} until they die of boredom.",
"stabs {user} in the heart a few times with a {weapon_stab}.", "stabs {user} in the heart a few times with a {weapon_stab}.",
"rams a {weapon_explosive} up {user}'s ass and lets off a few rounds.", "rams a {weapon_explosive} up {user}'s ass and lets off a few rounds.",
"crushes {user}'s skull in with a {weapon_crush}.", "crushes {user}'s skull in with a {weapon_crush}.",
"unleashes the armies of Isengard on {user}.", "unleashes the armies of Isengard on {user}.",
"gags and ties {user} then throws them off a {tall_thing} to their death.", "gags and ties {user} then throws them off a {tall_thing} to their death.",
"reaches out and punches right through {user}'s chest.", "reaches out and punches right through {user}'s chest.",
"slices {user}'s limbs off with a {weapon_slice}.", "slices {user}'s limbs off with a {weapon_slice}.",
"throws {user} to Cthulu and watches them get ripped to shreds.", "throws {user} to Cthulu and watches them get ripped to shreds.",
"feeds {user} to an owlbear who then proceeds to maul them violently.", "feeds {user} to an owlbear who then proceeds to maul them violently.",
"turns {user} into a snail and covers then in salt.", "turns {user} into a snail and covers then in salt.",
"snacks on {user}'s dismembered body.", "snacks on {user}'s dismembered body.",
"stuffs {bomb} up {user}'s ass and waits for it to go off.", "stuffs {bomb} up {user}'s ass and waits for it to go off.",
"puts {user} into a sack, throws the sack in the river, and hurls the river into space.", "puts {user} into a sack, throws the sack in the river, and hurls the river into space.",
"goes bowling with {user}'s bloody disembodied head.", "goes bowling with {user}'s bloody disembodied head.",
"sends {user} to /dev/null!", "sends {user} to /dev/null!",
"feeds {user} coke and mentos till they violently explode." "feeds {user} coke and mentos till they violently explode."
], ],
"parts": { "parts": {
"gun":[ "gun": [
"AK47", "AK47",
"machine gun", "machine gun",
"automatic pistol", "automatic pistol",
"Uzi" "Uzi"
], ],
"limbs": [ "limbs": [
"legs", "legs",
"arms", "arms",
"limbs" "limbs"
], ],
"weapon_stab": [ "weapon_stab": [
"knife", "knife",
"shard of glass", "shard of glass",
"sword blade", "sword blade",
"butchers knife", "butchers knife",
"corkscrew" "corkscrew"
], ],
"weapon_slice": [ "weapon_slice": [
"sharpened katana", "sharpened katana",
"chainsaw", "chainsaw",
"polished axe" "polished axe"
], ],
"weapon_crush": [ "weapon_crush": [
"spiked mace", "spiked mace",
"baseball bat", "baseball bat",
"wooden club", "wooden club",
"massive steel ball", "massive steel ball",
"heavy iron rod" "heavy iron rod"
], ],
"weapon_explosive": [ "weapon_explosive": [
"rocket launcher", "rocket launcher",
"grenade launcher", "grenade launcher",
"napalm launcher" "napalm launcher"
], ],
"tall_thing": [ "tall_thing": [
"bridge", "bridge",
"tall building", "tall building",
"cliff", "cliff",
"mountain" "mountain"
], ],
"spiked_thing": [ "spiked_thing": [
"boulder", "boulder",
"rock", "rock",
"barrel of rocks" "barrel of rocks"
], ],
"bomb": [ "bomb": [
"a bomb", "a bomb",
"some TNT", "some TNT",
"a bunch of C4" "a bunch of C4"
] ]
} }
} }

View file

@ -1,9 +1,11 @@
from util import hook, http, text, timesince
from datetime import datetime from datetime import datetime
import re import re
import random import random
reddit_re = (r'.*((www\.)?reddit\.com/r[^ ]+)', re.I) from util import hook, http, text, timesince
reddit_re = (r'.*(((www\.)?reddit\.com/r|redd\.it)[^ ]+)', re.I)
base_url = "http://reddit.com/r/{}/.json" base_url = "http://reddit.com/r/{}/.json"
short_url = "http://redd.it/{}" short_url = "http://redd.it/{}"

View file

@ -36,4 +36,4 @@ def rottentomatoes(inp, bot=None):
rotten = review_count - fresh rotten = review_count - fresh
return u"{} - Critics Rating: \x02{}%\x02 ({} liked, {} disliked) " \ return u"{} - Critics Rating: \x02{}%\x02 ({} liked, {} disliked) " \
"Audience Rating: \x02{}%\x02 - {}".format(title, critics_score, fresh, rotten, audience_score, url) "Audience Rating: \x02{}%\x02 - {}".format(title, critics_score, fresh, rotten, audience_score, url)