dat merge

This commit is contained in:
reality 2013-04-20 10:51:39 +00:00
commit 8712216948
34 changed files with 856 additions and 145 deletions

11
.gitignore vendored
View File

@ -1,5 +1,10 @@
# Ignore the user config files # Ignore the user config files
./config.json config.json
# Ignore the user database
db.json db.json
# ignore npm
node_modules/
# ignore assets
public/bootstrap/
public/d3/

6
.gitmodules vendored
View File

@ -1,9 +1,9 @@
[submodule "jsbot"] [submodule "jsbot"]
path = jsbot path = jsbot
url = git://github.com/reality/jsbot.git url = git://github.com/reality/jsbot.git
[submodule "modules/stats"]
path = modules/stats
url = git://github.com/SamStudio8/stats.git
[submodule "modules/github"] [submodule "modules/github"]
path = modules/github path = modules/github
url = git://github.com/zuzak/dbot-github.git url = git://github.com/zuzak/dbot-github.git
[submodule "modules/stats"]
path = modules/stats
url = git@github.com:SamStudio8/dbot-stats.git

View File

@ -13,8 +13,8 @@
}, },
"admins": [ "batman" ], "admins": [ "batman" ],
"moderators": [ "whatever" ], "moderators": [ "whatever" ],
"moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "stats", "users", "link" ], "moduleNames": [ "ignore", "admin", "command", "dice", "js", "kick", "quotes", "spelling", "youare", "timers", "stats", "users", "link" ],
"language": "en", "language": "en",
"debugMode": true, "debugMode": false,
"version": "Depressionbot IRC bot 0.4-dev - Lovingly crafted by The DepressionBot Foundation (a charity arm of the Official Aberystwyth Open Source International Development League)." "version": "Depressionbot IRC bot 0.4-dev - Lovingly crafted by The DepressionBot Foundation (a charity arm of the Official Aberystwyth Open Source International Development League)."
} }

View File

@ -3,82 +3,97 @@
"en": "Joined {channel}", "en": "Joined {channel}",
"es" : "Entrado en {channel}", "es" : "Entrado en {channel}",
"na'vi": "fpxäkìm {channel}(nemfa)", "na'vi": "fpxäkìm {channel}(nemfa)",
"cy": "Wedi ymuno {channel}" "cy": "Wedi ymuno {channel}",
"nl": "{channel} binnengekomen"
}, },
"part": { "part": {
"en": "Left {channel}", "en": "Left {channel}",
"es" : "Abandonada {channel}", "es" : "Abandonada {channel}",
"na'vi": "Hum {channel}", "na'vi": "Hum {channel}",
"cy": "Wedi gadael {channel}" "cy": "Wedi gadael {channel}",
"nl": "{channel} verlaten"
}, },
"gpull": { "gpull": {
"en": "Git pulled that shit.", "en": "Git pulled that shit.",
"es": "Hecho git pull en esta mierda.", "es": "Hecho git pull en esta mierda.",
"na'vi": "Gìtìl fì'uti stamarsìm.", "na'vi": "Gìtìl fì'uti stamarsìm.",
"cy": "Wedi tynnu git yr cach na i gyd" "cy": "Wedi tynnu git yr cach na i gyd",
"nl": "Git heeft die zooi binnengehaald."
}, },
"reload": { "reload": {
"en": "Reloaded that shit.", "en": "Reloaded that shit.",
"es": "Recargado esta mierda.", "es": "Recargado esta mierda.",
"na'vi": "Oel fìuti stìyeftxaw.", "na'vi": "Oel fìuti stìyeftxaw.",
"cy": "Ail-lwytho'r cach na" "cy": "Ail-lwytho'r cach na",
"nl": "Die zooi opnieuw geladen."
}, },
"load_module": { "load_module": {
"en": "Loaded new module: {moduleName}", "en": "Loaded new module: {moduleName}",
"es": "Cargado módulo nuevo: {moduleName}", "es": "Cargado módulo nuevo: {moduleName}",
"na'vi": "Oel {moduleName}it amip stìyeftxaw.", "na'vi": "Oel {moduleName}it amip stìyeftxaw.",
"cy": "Wedi llwytho modiwl newydd: {moduleName}" "cy": "Wedi llwytho modiwl newydd: {moduleName}",
"nl": "Nieuwe module geladen: {moduleName}"
}, },
"unload_module": { "unload_module": {
"en": "Turned off module: {moduleName}", "en": "Turned off module: {moduleName}",
"es": "Descargado módulo: {moduleName}", "es": "Descargado módulo: {moduleName}",
"na'vi": "Oel {moduleName} tswìya'.", "na'vi": "Oel {moduleName} tswìya'.",
"cy": "Wedi troi ffwrdd y modiwl: {moduleName}" "cy": "Wedi troi ffwrdd y modiwl: {moduleName}",
"nl": "Module uitgeschakeld: {moduleName}"
}, },
"unload_error": { "unload_error": {
"en": "{moduleName} isn't loaded. Idiot.", "en": "{moduleName} isn't loaded. Idiot.",
"es": "{moduleName} no está cargado. Idiota.", "es": "{moduleName} no está cargado. Idiota.",
"na'vi": "Oel {moduleName}it omum. Nga skxawng lu.", "na'vi": "Oel {moduleName}it omum. Nga skxawng lu.",
"cy": "Di {moduleName} ddim wedi llwytho. Twpsyn" "cy": "Di {moduleName} ddim wedi llwytho. Twpsyn",
"nl": "{moduleName} is niet geladen. Idioot."
}, },
"banned": { "banned": {
"en": "{user} banned from {command}", "en": "{user} banned from {command}",
"es": "{user} está prohibido de usar {command}", "es": "{user} está prohibido de usar {command}",
"na'vi": "{command}ìri {user} ke tung.", "na'vi": "{command}ìri {user} ke tung.",
"cy": "{user} wedi ei gohurio o {command}" "cy": "{user} wedi ei gohurio o {command}",
"nl": "{user} mag {command} niet meer gebruiken"
}, },
"unbanned": { "unbanned": {
"en": "{user} unbanned from {command}", "en": "{user} unbanned from {command}",
"es": "{user} no está prohibido de user {command}", "es": "{user} no está prohibido de user {command}",
"na'vi": "{command}ìri {user} tung set.", "na'vi": "{command}ìri {user} tung set.",
"cy": "{user} wedi ei dad-wahardd o {command}" "cy": "{user} wedi ei dad-wahardd o {command}",
"nl": "{user} mag {command} weer gebruiken"
}, },
"unban_error": { "unban_error": {
"en": "{user} wasn't banned from that command, fool.", "en": "{user} wasn't banned from that command, fool.",
"es": "{user} no fue prohibido de esta instrucción, tont@.", "es": "{user} no fue prohibido de esta instrucción, tont@.",
"na'vi": "{user} fìtsu'oti tamung srekrr, nga skxawng lu.", "na'vi": "{user} fìtsu'oti tamung srekrr, nga skxawng lu.",
"cy": "Nid oedd {user} wedi ei wahardd o'r gyrchymun yna, fŵl" "cy": "Nid oedd {user} wedi ei wahardd o'r gyrchymun yna, fŵl",
"nl": "{user} mag dat commando sowieso al gebruiken, mafketel."
}, },
"qlock": { "qlock": {
"en": "Locked quote category: {category}", "en": "Locked quote category: {category}",
"es": "Cerrado la categoría: {category}", "es": "Cerrado la categoría: {category}",
"na'vi": "{category}ìri oel 'upxareti fmoli", "na'vi": "{category}ìri oel 'upxareti fmoli",
"cy": "Categori wedi cloi: {category}" "cy": "Categori wedi cloi: {category}",
"nl": "Quote categorie vergrendeld: {category}"
}, },
"already_in_channel": { "already_in_channel": {
"en": "I'm already in {channel}", "en": "I'm already in {channel}",
"na'vi": "Oel {channel}it tok li" "na'vi": "Oel {channel}it tok li",
"nl": "Ik ben al in {channel}"
}, },
"not_in_channel": { "not_in_channel": {
"en": "I'm not in {channel}", "en": "I'm not in {channel}",
"na'vi": "Oel {channel}it ke tok" "na'vi": "Oel {channel}it ke tok",
"nl": "Ik ben niet aanwezig in {channel}"
}, },
"already_loaded_web": { "already_loaded_web": {
"en": "WHY CAN'T I LOAD ALL THIS WEB? (web already loaded)", "en": "WHY CAN'T I LOAD ALL THIS WEB? (web already loaded)",
"na'vi": "PELUN OEL KE TSUN OMUM FÌWETIT NÌWOTX (wetìri oe omum li)" "na'vi": "PELUN OEL KE TSUN OMUM FÌWETIT NÌWOTX (wetìri oe omum li)",
"nl": "AL DIT WEB WORDT ME TOCH EEN BEETJE TE VEEL! (web is al geladen)"
}, },
"already_loaded": { "already_loaded": {
"en": "{moduleName} is already loaded.", "en": "{moduleName} is already loaded.",
"na'vi": "Oel omum teri {moduleName}it li." "na'vi": "Oel omum teri {moduleName}it li.",
"nl": "{moduleName} is al geladen."
} }
} }

View File

@ -3,31 +3,38 @@
"en": "{user} is banned from using this command. Commence incineration.", "en": "{user} is banned from using this command. Commence incineration.",
"es": "{user} está prohibido de usar esta instrucción. Comenzar incineración.", "es": "{user} está prohibido de usar esta instrucción. Comenzar incineración.",
"na'vi": "Tsu'ori {user} ke tung. Nga skxawng lu.", "na'vi": "Tsu'ori {user} ke tung. Nga skxawng lu.",
"cy": "Mae {user} wedi ei gohurio gan ddefnyddio'r gorchymun yma. Cychwyn orfflosgiad" "cy": "Mae {user} wedi ei gohurio gan ddefnyddio'r gorchymun yma. Cychwyn orfflosgiad",
"nl": "{user} mag dit commando niet meer gebruiken. Bereid het verbrandingsritueel voor."
}, },
"syntax_error": { "syntax_error": {
"en": "Invalid syntax. Initiate incineration.", "en": "Invalid syntax. Initiate incineration.",
"es": "Sintaxis no válida. Iniciar incineración.", "es": "Sintaxis no válida. Iniciar incineración.",
"na'vi": "Ngeyä pamrel keyawr lu. Nga skxawng lu.", "na'vi": "Ngeyä pamrel keyawr lu. Nga skxawng lu.",
"cy": "Cystrawen annilys. Cychwyn orfflosgiad" "cy": "Cystrawen annilys. Cychwyn orfflosgiad",
"nl": "Ongeldige syntax. Bereid het verbrandingsritueel voor."
}, },
"usage": { "usage": {
"en": "Usage for {command}: {usage}.", "en": "Usage for {command}: {usage}.",
"na'vi": "Nga tsun sivar ìlä {command}: {usage}." "na'vi": "Nga tsun sivar ìlä {command}: {usage}.",
"nl": "{command} wordt op de volgende manier gebruikt: {usage}."
}, },
"no_usage_info": { "no_usage_info": {
"en": "No usage information found for {command}.", "en": "No usage information found for {command}.",
"na'vi": "Oel ke tsun sivar {comamnd}it" "na'vi": "Oel ke tsun sivar {comamnd}it",
"nl": "Geen gebruiksinformatie gevonden voor {command}."
}, },
"help_link": { "help_link": {
"en": "Help for {module}: {link}", "en": "Help for {module}: {link}",
"na'vi": "{module}ä srungìl {link} it tok" "na'vi": "{module}ä srungìl {link} it tok",
"nl": "Hulp voor {module}: {link}"
}, },
"no_help": { "no_help": {
"en": "No help found for {module}.", "en": "No help found for {module}.",
"na'vi": "Fì{module}ìri oel ke tsun run srungit" "na'vi": "Fì{module}ìri oel ke tsun run srungit",
"nl": "Geen hulp gevonden voor {module}."
}, },
"loaded_modules_with_help": { "loaded_modules_with_help": {
"en": "Loaded modules with help information: {modules}." "en": "Loaded modules with help information: {modules}.",
"nl": "Geladen modules die hulpinformatie bevatten: {modules}."
} }
} }

View File

@ -1,14 +1,17 @@
{ {
"lookup-error": { "lookup-error": {
"en": "{domain} is \u000303AVAILABLE! \u000314({code})" "en": "{domain} is \u000303AVAILABLE! \u000314({code})",
"nl": "{domain} is \u000303BESCHIKBAAR! \u000314({code})"
}, },
"lookup": { "lookup": {
"en": "{domain} is \u000305TAKEN! \u000314({address})" "en": "{domain} is \u000305TAKEN! \u000314({address})",
"nl": "{domain} is \u000305BEZET! \u000314({address})"
}, },
"rdns": { "rdns": {
"en": "{ip} \u2192 {domain}" "en": "{ip} \u2192 {domain}"
}, },
"rdns-error": { "rdns-error": {
"en": "Unable to lookup {ip}. \u000314({error})" "en": "Unable to lookup {ip}. \u000314({error})",
"nl": "{ip} kan niet worden opgezocht. \u000314({error})"
} }
} }

@ -1 +1 @@
Subproject commit e9e9089f282b0455a481460ebec17a4672617ceb Subproject commit 7e38c6be750a071724763872175f1a9445297b76

View File

@ -3,83 +3,102 @@
"en": "{user}: Usage: ~ignore [module]. Modules you can ignore are: {modules}.", "en": "{user}: Usage: ~ignore [module]. Modules you can ignore are: {modules}.",
"es": "{user}: Modo de empleo: ~ignore [módulo]. Módulos que tú puedes ignorar son: {modules}.", "es": "{user}: Modo de empleo: ~ignore [módulo]. Módulos que tú puedes ignorar son: {modules}.",
"na'vi": "{user}: Sar: ~ignore ['u]. U, nga ke tìng mikyun: {modules}.", "na'vi": "{user}: Sar: ~ignore ['u]. U, nga ke tìng mikyun: {modules}.",
"cy": "{user}: Defnydd: ~ignore [modiwl]. Modiwlau a allech anwybyddu yw: {modules}." "cy": "{user}: Defnydd: ~ignore [modiwl]. Modiwlau a allech anwybyddu yw: {modules}.",
"nl": "{user}: Gebruik: ~ignore [module]. Modules die negeert kunnen worden zijn: {modules}."
}, },
"already_ignoring": { "already_ignoring": {
"en": "{user}: You're already ignoring that module.", "en": "{user}: You're already ignoring that module.",
"es": "{user}: Ya ignoras este módulo.", "es": "{user}: Ya ignoras este módulo.",
"na'vi": "{user}: 'uri nga ke tìng mikyun srekrr.", "na'vi": "{user}: 'uri nga ke tìng mikyun srekrr.",
"cy": "{user}: Mi rwyt ti'n anwybyddu'r modiwl yna'n barod." "cy": "{user}: Mi rwyt ti'n anwybyddu'r modiwl yna'n barod.",
"nl": "{user}: Je negeert deze module al."
}, },
"ignored": { "ignored": {
"en": "{user}: Now ignoring {module}.", "en": "{user}: Now ignoring {module}.",
"es": "{user}: Estás ignorando {module}.", "es": "{user}: Estás ignorando {module}.",
"na'vi": "{user}: Nga ke terìng mikyun {module}ne set.", "na'vi": "{user}: Nga ke terìng mikyun {module}ne set.",
"cy": "{user}: Nawr yn anwybyddu {module}" "cy": "{user}: Nawr yn anwybyddu {module}",
"nl": "{user}: {module} wordt nu genegeerd."
}, },
"invalid_ignore": { "invalid_ignore": {
"en": "{user}: That isn't a valid module name.", "en": "{user}: That isn't a valid module name.",
"es": "{user}: Ese no es un nombre de un módulo valido.", "es": "{user}: Ese no es un nombre de un módulo valido.",
"na'vi": "{user}: Tsatstxo eyawr ke lu.", "na'vi": "{user}: Tsatstxo eyawr ke lu.",
"cy": "{user}: Nid oedd hwna'n modiwl dilys" "cy": "{user}: Nid oedd hwna'n modiwl dilys",
"nl": "{user}: Dat is geen geldige modulenaam."
}, },
"unignore_usage": { "unignore_usage": {
"en": "{user}: Usage: ~unignore [module]. Modules you are currently ignoring: {modules}.", "en": "{user}: Usage: ~unignore [module]. Modules you are currently ignoring: {modules}.",
"es": "{user}: Modo de empleo: ~unignore [módulo]. Módulos que ignoras ahora mismo: {modules}.", "es": "{user}: Modo de empleo: ~unignore [módulo]. Módulos que ignoras ahora mismo: {modules}.",
"na'vi": "{user}: Sar: ~unignore ['u]. Uri, nga ke terìng mikyun: {modules}.", "na'vi": "{user}: Sar: ~unignore ['u]. Uri, nga ke terìng mikyun: {modules}.",
"cy": "{user}: Defnydd ~unignore [modiwl]. Modiwlau rydech yn anwybyddu ar hyn o bryd: {modules}" "cy": "{user}: Defnydd ~unignore [modiwl]. Modiwlau rydech yn anwybyddu ar hyn o bryd: {modules}",
"nl": "{user}: Gebruik: ~unignore [module]. Modules die momenteel worden genegeerd: {modules}."
}, },
"invalid_unignore": { "invalid_unignore": {
"en": "{user}: You're not ignoring that module or it doesn't exist.", "en": "{user}: You're not ignoring that module or it doesn't exist.",
"es": "{user}: No ignoras este módulo o no existe.", "es": "{user}: No ignoras este módulo o no existe.",
"na'vi":"{user}: Nga terìng mikyun fu fì'ul fìtsengit ke tok.", "na'vi":"{user}: Nga terìng mikyun fu fì'ul fìtsengit ke tok.",
"cy": "{user}: Nid wyt ti'n anwybyddu'r modiwl yna neu nid yw e'n bodoli" "cy": "{user}: Nid wyt ti'n anwybyddu'r modiwl yna neu nid yw e'n bodoli",
"nl": "{user}: Deze module bestaat niet of wordt niet genegeerd."
}, },
"unignored": { "unignored": {
"en": "{user}: No longer ignoring {module}.", "en": "{user}: No longer ignoring {module}.",
"es": "{user}: Ya no ignoras {module}.", "es": "{user}: Ya no ignoras {module}.",
"na'vi": "{user}: Nga terìng mikyun {module}ne set", "na'vi": "{user}: Nga terìng mikyun {module}ne set",
"cy": "{user}: Ddim yn anwybyddu {module} bellach" "cy": "{user}: Ddim yn anwybyddu {module} bellach",
"nl": "{user}: {module} wordt niet langer genegeerd."
}, },
"ban_usage": { "ban_usage": {
"en": "{user}: Usage: ~ban [user] [module/command]. Use * for all modules and commands." "en": "{user}: Usage: ~ban [user] [module/command]. Use * for all modules and commands.",
"nl": "{user}: Gebruik: ~ban [gebruiker] [module/commando]. Gebruik * voor alle modules en alle commandos."
}, },
"already_banned": { "already_banned": {
"en": "{user}: {banned} is already banned from that module." "en": "{user}: {banned} is already banned from that module.",
"nl": "{user}: {banned} is al geband van deze module."
}, },
"banned_success": { "banned_success": {
"en": "{user}: {banned} is now banned from {module}." "en": "{user}: {banned} is now banned from {module}.",
"nl": "{user}: {banned} mag {module} nu niet meer gebruiken."
}, },
"invalid_ban": { "invalid_ban": {
"en": "{user}: That isn't a valid module name." "en": "{user}: That isn't a valid module name.",
"nl": "{user}: Dat is geen geldige modulenaam."
}, },
"unban_usage": { "unban_usage": {
"en": "{user}: Usage: ~unban [user] [module]." "en": "{user}: Usage: ~unban [user] [module].",
"nl": "{user}: Gebruik: ~unban [gebruiker] [module]."
}, },
"invalid_unban": { "invalid_unban": {
"en": "{user}: {banned} is not banned from that module or it doesn't exist." "en": "{user}: {banned} is not banned from that module or it doesn't exist.",
"nl": "{user}: {banned} is niet geband van die module of de module bestaat niet."
}, },
"unbanned_success": { "unbanned_success": {
"en": "{user}: {banned} is no longer banned from {module}." "en": "{user}: {banned} is no longer banned from {module}.",
"nl": "{user}: {banned} mag {module} weer gebruiken."
}, },
"ignoring_channel": { "ignoring_channel": {
"en": "Now ignoring {module} in {channel}", "en": "Now ignoring {module} in {channel}.",
"na'vi": "Oe ke stayawm {module}ur mì {channel}" "na'vi": "Oe ke stayawm {module}ur mì {channel}",
"nl": "{module} wordt nu genegeerd in {channel}."
}, },
"already_ignoring_channel": { "already_ignoring_channel": {
"en": "Already ignoring {module} in {channel}", "en": "Already ignoring {module} in {channel}.",
"na'vi": "Oe ke stayawm {module}ur mì {channel} li" "na'vi": "Oe ke stayawm {module}ur mì {channel} li",
"nl": "{module} wordt al genegeerd in {channel}."
}, },
"module_not_exist": { "module_not_exist": {
"en": "{module} isn't loaded or doesn't exist.", "en": "{module} isn't loaded or doesn't exist.",
"na'vi": "Oel ke omum teri {module}it fu {module} ke fkeytok" "na'vi": "Oel ke omum teri {module}it fu {module} ke fkeytok",
"nl": "{module} is niet geladen of bestaat niet."
}, },
"unignoring_channel": { "unignoring_channel": {
"en": "No longer ignoring {module} in {channel}", "en": "No longer ignoring {module} in {channel}.",
"na'vi": "Oel stayawm {module}ur mì {channel} set." "na'vi": "Oel stayawm {module}ur mì {channel} set.",
"nl": "{module} wordt niet meer genegeerd in {channel}."
}, },
"not_ignoring_channel": { "not_ignoring_channel": {
"en": "{module} wasn't being ignored in {channel}", "en": "{module} wasn't being ignored in {channel}.",
"na'vi": "Oel stayawm {module}ur mì {channel} li." "na'vi": "Oel stayawm {module}ur mì {channel} li.",
"nl": "{module} werd niet genegeerd in {channel}."
} }
} }

View File

@ -0,0 +1,8 @@
{
"dbKeys": [ "imgur" ],
"dependencies": [ "web", "api" ],
"imagelength": 5,
"nsfwwarn": true,
"apikey": "86fd3a8da348b65",
"highscore": "ricount"
}

View File

@ -7,14 +7,14 @@ var _ = require('underscore')._,
request = require('request'); request = require('request');
var imgur = function(dbot) { var imgur = function(dbot) {
this.db = dbot.db.imgur;
this.internalAPI = { this.internalAPI = {
'infoString': function(imgData) { 'infoString': function(imgData) {
info = null; info = '';
if(imgData && _.has(imgData, 'data')) { if(imgData && _.has(imgData, 'data')) {
imgData = imgData.data; imgData = imgData.data;
info = '[';
if(imgData.title) { if(imgData.title) {
info += imgData.title + ' is '; info += imgData.title + ' - ';
} }
if(imgData.type) { if(imgData.type) {
if(imgData.animated) { if(imgData.animated) {
@ -26,11 +26,11 @@ var imgur = function(dbot) {
info += 'an image with '; info += 'an image with ';
} }
info += imgData.views + ' views ('; info += imgData.views + ' views (';
info += imgData.width + 'x' + imgData.height + ')].'; info += imgData.width + 'x' + imgData.height + ')';
} }
return info; return info;
} }.bind(this)
}; };
this.api = { this.api = {
@ -45,9 +45,11 @@ var imgur = function(dbot) {
var testUrl = 'http://i.imgur.com/' + var testUrl = 'http://i.imgur.com/' +
testSlug + testSlug +
'.' + ext[_.random(0, ext.length - 1)]; '.' + ext[_.random(0, ext.length - 1)];
this.db.totalHttpRequests += 1;
var image = request(testUrl, function(error, response, body) { var image = request(testUrl, function(error, response, body) {
// 492 is body.length of a removed image // 492 is body.length of a removed image
if(!error && response.statusCode == 200 && body.length != 492) { if(!error && response.statusCode == 200 && body.length != 492) {
this.db.totalImages += 1;
callback(testUrl, testSlug); callback(testUrl, testSlug);
} else { } else {
this.api.getRandomImage(callback); this.api.getRandomImage(callback);
@ -55,27 +57,36 @@ var imgur = function(dbot) {
}.bind(this)); }.bind(this));
}, },
'getImageInfoString': function(slug, callback) {
this.api.getImageInfo(slug, function(imgData) {
callback(this.internalAPI.infoString(imgData));
}.bind(this));
},
'getImageInfo': function(slug, callback) { 'getImageInfo': function(slug, callback) {
request.get({ request.get({
'url': 'https://api.imgur.com/3/image/' + slug + '.json', 'url': 'https://api.imgur.com/3/image/' + slug + '.json',
'json': true, 'json': true,
'headers': { 'headers': {
'Authorization': 'Client-ID 86fd3a8da348b65' 'Authorization': 'Client-ID ' + dbot.config.imgur.apikey
} }
}, function(err, response, body) { }, function(err, response, body) {
this.db.totalApiRequests += 1;
callback(body); callback(body);
}); }.bind(this));
} }
}; };
this.api['getRandomImage'].external = true; this.api['getRandomImage'].external = true;
this.api['getRandomImage'].extMap = [ 'callback' ]; this.api['getRandomImage'].extMap = [ 'callback' ];
this.api['getImageInfoString'].external = true;
this.api['getImageInfoString'].extMap = [ 'slug', 'callback' ];
this.commands = { this.commands = {
'~ri': function(event) { '~ri': function(event) {
this.api.getRandomImage(function(link, slug) { this.api.getRandomImage(function(link, slug) {
this.api.getImageInfo(slug, function(imgData) { this.api.getImageInfo(slug, function(imgData) {
var info = this.internalAPI.infoString(imgData); var info = this.internalAPI.infoString(imgData);
event.reply(event.user + ': ' + link + ' ' + info); event.reply(event.user + ': ' + link + ' [' + info + ']');
}.bind(this)); }.bind(this));
}.bind(this)); }.bind(this));
} }
@ -86,12 +97,15 @@ var imgur = function(dbot) {
if(matches[1]) { if(matches[1]) {
this.api.getImageInfo(matches[1], function(imgData) { this.api.getImageInfo(matches[1], function(imgData) {
var info = this.internalAPI.infoString(imgData); var info = this.internalAPI.infoString(imgData);
if(info) event.reply(info); if(info) event.reply('[' + info + ']');
}.bind(this)); }.bind(this));
} }
}.bind(this); }.bind(this);
dbot.api.link.addHandler(this.name, /https?:\/\/i\.imgur\.com\/([a-zA-Z0-9]+)\.([jpg|png|gif])/, imgurHandler); dbot.api.link.addHandler(this.name, /https?:\/\/i\.imgur\.com\/([a-zA-Z0-9]+)\.([jpg|png|gif])/, imgurHandler);
dbot.api.link.addHandler(this.name, /https?:\/\/imgur\.com\/([a-zA-Z0-9]+)/, imgurHandler); dbot.api.link.addHandler(this.name, /https?:\/\/imgur\.com\/([a-zA-Z0-9]+)/, imgurHandler);
if(!_.has(dbot.db.imgur, 'totalHttpRequests')) dbot.db.imgur.totalHttpRequests = 0;
if(!_.has(dbot.db.imgur, 'totalApiRequests')) dbot.db.imgur.totalApiRequests = 0;
if(!_.has(dbot.db.imgur, 'totalImages')) dbot.db.imgur.totalImages = 0;
}.bind(this); }.bind(this);
}; };

29
modules/imgur/pages.js Normal file
View File

@ -0,0 +1,29 @@
var _ = require('underscore')._;
var pages = function(dbot) {
return {
'/imgur/random': function(req, res) {
var quoteCat = dbot.db.quoteArrs[dbot.config.imgur.highscore],
highScore = 0;
if(quoteCat) {
highScore = _.last(quoteCat);
}
res.render('imgurr', { "highscore" : highScore });
},
'/imgur/stats': function(req, res) {
res.render('imgurstats', {
'name': dbot.config.name,
'totalHttpRequests': this.db.totalHttpRequests,
'totalApiRequests': this.db.totalApiRequests,
'totalImages': this.db.totalImages
});
}
};
};
exports.fetch = function(dbot) {
return pages(dbot);
};

View File

@ -1,6 +1,7 @@
{ {
"nsfw": { "nsfw": {
"en": "might be NSFW", "en": "might be NSFW",
"na'vi": "kxawm ke wivìntxu evengur" "na'vi": "kxawm ke wivìntxu evengur",
"nl": "bevat mogelijk gevoelige beelden"
} }
} }

View File

@ -3,7 +3,8 @@
"en": "{user} has been kicked {kicks} times and has kicked people {kicked} times.", "en": "{user} has been kicked {kicks} times and has kicked people {kicked} times.",
"es": "Se ha expulsado {user} {kicks} veces y {user} ha expulsado personas {kicked} veces.", "es": "Se ha expulsado {user} {kicks} veces y {user} ha expulsado personas {kicked} veces.",
"na'vi": "Tuteol {user}it tsrame'i {kicks} hìmtxan ulte sute tsrame'i {kicked} hìmtxan.", "na'vi": "Tuteol {user}it tsrame'i {kicks} hìmtxan ulte sute tsrame'i {kicked} hìmtxan.",
"cy": "Cafwyd {user} ei gicio {kicks} gwaith ac wedi cicio pobl {kicked} gwaith." "cy": "Cafwyd {user} ei gicio {kicks} gwaith ac wedi cicio pobl {kicked} gwaith.",
"nl": "{user} is {kicks} keer gekickt en heeft anderen {kicked} keer gekickt."
}, },
"kicked_dbot": { "kicked_dbot": {
"en": "Thou shalt not kick {botname}", "en": "Thou shalt not kick {botname}",
@ -13,5 +14,7 @@
}, },
"ckicked": { "ckicked": {
"en": "Attention: {kicker} has kicked {kickee} from {channel}. The reason given was: \"{reason}.\"" "en": "Attention: {kicker} has kicked {kickee} from {channel}. The reason given was: \"{reason}.\""
"cy": "Ni ddylech cicio {botname}",
"nl": "Gij zult {botname} niet kicken"
} }
} }

View File

@ -1,13 +1,15 @@
{ {
"title_not_found": { "title_not_found": {
"en": "No page title found.", "en": "No page title found.",
"na'vi": "Oel ke tsun run 'upxare atxin." "na'vi": "Oel ke tsun run 'upxare atxin.",
"nl": "Er is geen paginatitel gevonden."
}, },
"xkcd": { "xkcd": {
"en": "xkcd {num}: {title} https://xkcd.com/{num}" "en": "xkcd {num}: {title} https://xkcd.com/{num}"
}, },
"no-hits": { "no-hits": {
"en": "No hits.", "en": "No hits.",
"na'vi": "Oel ke tsun rivum ayuoti." "na'vi": "Oel ke tsun rivum ayuoti.",
"nl": "Geen resultaten."
} }
} }

View File

@ -3,18 +3,21 @@
"en": "Usage: ~newpoll name [options=opt1,opt2,opt3] description", "en": "Usage: ~newpoll name [options=opt1,opt2,opt3] description",
"es" : "Modo de empleo: ~newpoll nombre [options=opción1,opción2,opción3] descripción", "es" : "Modo de empleo: ~newpoll nombre [options=opción1,opción2,opción3] descripción",
"na'vi": "Usage: ~newpoll tstxo [sìftxey=tìfxey1,tìfxey2,fìfxey3] tìsla'tsu", "na'vi": "Usage: ~newpoll tstxo [sìftxey=tìfxey1,tìfxey2,fìfxey3] tìsla'tsu",
"cy": "Defnydd: ~newpoll enw [optiynau=opt1,opt2,op3] disgrifiad" "cy": "Defnydd: ~newpoll enw [optiynau=opt1,opt2,op3] disgrifiad",
"nl": "Gebruik: ~newpoll name [options=opt1,opt2,opt3] description"
}, },
"poll_exists": { "poll_exists": {
"en": "Poll '{name}' already exists.", "en": "Poll '{name}' already exists.",
"es" : "Votación '{name}' ya existe.", "es" : "Votación '{name}' ya existe.",
"na'vi": "sìpawm sna'o '{name}' fkeytok srekrr.", "na'vi": "sìpawm sna'o '{name}' fkeytok srekrr.",
"cy": "Mae'r pôl {name} bodoli'n barod" "cy": "Mae'r pôl {name} bodoli'n barod",
"nl": "Poll '{name}' bestaat al."
}, },
"poll_created": { "poll_created": {
"en": "Poll '{name}' created ({description}). Cast thy votations! - {url}", "en": "Poll '{name}' created ({description}). Cast thy votations! - {url}",
"es" : "Votación '{name}' creado ({description}). ¡Emited sus votas! - {url}", "es" : "Votación '{name}' creado ({description}). ¡Emited sus votas! - {url}",
"na'vi": "sìpawm sna'o '{name}' ngìyop ({description}). Nga tìpe'unit Pe'eiun - {url}" "na'vi": "sìpawm sna'o '{name}' ngìyop ({description}). Nga tìpe'unit Pe'eiun - {url}",
"nl": "Poll '{name}' aangemaakt ({description}). Laat uw stem horen! - {url}"
}, },
"poll_describe": { "poll_describe": {
"en": "{name}: {description} - {url}." "en": "{name}: {description} - {url}."
@ -23,65 +26,76 @@
"en": "{user} changed their vote in {poll} to '{vote}' ({count}).", "en": "{user} changed their vote in {poll} to '{vote}' ({count}).",
"es" : "{user} cambió su voto en {poll} a '{vote}' ({count}).", "es" : "{user} cambió su voto en {poll} a '{vote}' ({count}).",
"na'vi": "{user} lìyatem ngeyä tìpe'un {poll}mì, ngeyä tìpe'un amip '{vote}'({count}) lu.", "na'vi": "{user} lìyatem ngeyä tìpe'un {poll}mì, ngeyä tìpe'un amip '{vote}'({count}) lu.",
"cy": "Newidiodd {user} eu pleidlais yn {poll} i '{vote}' ({count})." "cy": "Newidiodd {user} eu pleidlais yn {poll} i '{vote}' ({count}).",
"nl": "{user} heeft zijn stem voor {poll} veranderd in '{vote}' ({count})."
}, },
"voted": { "voted": {
"en": "{user} voted for '{vote}' in {poll} ({count}).", "en": "{user} voted for '{vote}' in {poll} ({count}).",
"es" : "{user} votó para '{vote}' en {poll} ({count}).", "es" : "{user} votó para '{vote}' en {poll} ({count}).",
"na'vi": "'{vote}'ìri {user} pìye'un {poll}mì ({count}).", "na'vi": "'{vote}'ìri {user} pìye'un {poll}mì ({count}).",
"cy": "Pledleisiodd {user} am '{vote}' yn {poll} ({count})." "cy": "Pledleisiodd {user} am '{vote}' yn {poll} ({count}).",
"nl": "{user} heeft gestemd voor '{vote}' in {poll} ({count})."
}, },
"invalid_vote": { "invalid_vote": {
"en": "Invalid vote: {vote}", "en": "Invalid vote: {vote}",
"es" : "Vota inválida: {vote}", "es" : "Vota inválida: {vote}",
"na'vi": "Ngeyä tìpe'un keyawr lu ({vote}).", "na'vi": "Ngeyä tìpe'un keyawr lu ({vote}).",
"cy": "Pleidlais annilys: {vote}" "cy": "Pleidlais annilys: {vote}",
"nl": "Ongeldige stem: {vote}"
}, },
"poll_unexistent": { "poll_unexistent": {
"en": "Poll '{name}' doesn't exist.", "en": "Poll '{name}' doesn't exist.",
"es" : "Votación '{name}' no existe.", "es" : "Votación '{name}' no existe.",
"na'vi": "sìpawm sna'o '{name}' ke fkeytok.", "na'vi": "sìpawm sna'o '{name}' ke fkeytok.",
"cy": "Nid yw pôl '{name}' yn bodoli" "cy": "Nid yw pôl '{name}' yn bodoli",
"nl": "Poll '{name}' bestaat niet."
}, },
"option_added": { "option_added": {
"en": "{user}: '{option}' added to '{name}'.", "en": "{user}: '{option}' added to '{name}'.",
"es" : "{user}: '{option}' añadido a '{name}'.", "es" : "{user}: '{option}' añadido a '{name}'.",
"na'vi": "'{name}'ur {user}ìl '{option}'it sung.", "na'vi": "'{name}'ur {user}ìl '{option}'it sung.",
"cy": "{user}: Ychwanegwyd '{option}' i '{name}'" "cy": "{user}: Ychwanegwyd '{option}' i '{name}'",
"nl": "{user}: '{option}' toegevoegd aan '{name}'."
}, },
"option_exists": { "option_exists": {
"en": "{user}: '{option}' already exists in '{name}'.", "en": "{user}: '{option}' already exists in '{name}'.",
"es" : "{user}: '{option}' ya existe en '{name}'.", "es" : "{user}: '{option}' ya existe en '{name}'.",
"na'vi": "{user}: '{option}' fkeytok srekrr '{name}'mì.", "na'vi": "{user}: '{option}' fkeytok srekrr '{name}'mì.",
"cy": "{user}: Mae '{option}' yn bodoli'n barod yn '{name}'." "cy": "{user}: Mae '{option}' yn bodoli'n barod yn '{name}'.",
"nl": "{user}: '{option}' bestaat al in '{name}'."
}, },
"not_poll_owner": { "not_poll_owner": {
"en": "{user}: You don't own the '{name}' poll.", "en": "{user}: You don't own the '{name}' poll.",
"es" : "{user}: La votación '{name}' no es tuyo.", "es" : "{user}: La votación '{name}' no es tuyo.",
"na'vi": "{user}: ngaru '{name}' sìpawm sna'o ke lu.", "na'vi": "{user}: ngaru '{name}' sìpawm sna'o ke lu.",
"cy": "{user}: Nid ydech chi'n berchen y pôl '{name}'." "cy": "{user}: Nid ydech chi'n berchen y pôl '{name}'.",
"nl": "{user}: Je bent niet de eigenaar van de poll '{name}'."
}, },
"option_removed": { "option_removed": {
"en": "{user}: '{option}' removed from '{name}'", "en": "{user}: '{option}' removed from '{name}'",
"es" : "{user}: '{option}' eliminado de '{name}'", "es" : "{user}: '{option}' eliminado de '{name}'",
"na'vi": "{user}: '{option}'it 'aku '{name}'ta", "na'vi": "{user}: '{option}'it 'aku '{name}'ta",
"cy": "{user}: '{option}' wedi ei ddileu o '{name}'" "cy": "{user}: '{option}' wedi ei ddileu o '{name}'",
"nl": "{user}: '{option}' verwijderd van '{name}'"
}, },
"av_voted": { "av_voted": {
"en": "{user} voted '{vote}' in {poll}.", "en": "{user} voted '{vote}' in {poll}.",
"es": "{user} votó '{vote}' en {poll}.", "es": "{user} votó '{vote}' en {poll}.",
"na'vi": "{user}ìl '{vote}'it pìye'un '{poll}'mì.", "na'vi": "{user}ìl '{vote}'it pìye'un '{poll}'mì.",
"cy": "Pledleisiodd {user} am '{vote}' yn {poll}" "cy": "Pledleisiodd {user} am '{vote}' yn {poll}",
"nl": "{user} heeft '{vote}' gestemd in {poll}."
}, },
"av_changed_vote": { "av_changed_vote": {
"en": "{user} changed their vote in {poll} to '{vote}'.", "en": "{user} changed their vote in {poll} to '{vote}'.",
"es" : "{user} cambió su voto en {poll} a '{vote}'.", "es" : "{user} cambió su voto en {poll} a '{vote}'.",
"na'vi": "{user}ìl lìyatem ngeyä tìpa'unit '{poll}'mì, ngeyä tìpe'un '{vote} lu set.", "na'vi": "{user}ìl lìyatem ngeyä tìpa'unit '{poll}'mì, ngeyä tìpe'un '{vote} lu set.",
"cy": "Newidiodd {user} eu pleidlais yn {poll} i '{vote}'" "cy": "Newidiodd {user} eu pleidlais yn {poll} i '{vote}'",
"nl": "{user} heeft zijn stem veranderd naar '{vote}' in {poll}."
}, },
"count": { "count": {
"en": "The running-order of poll '{poll}' ({description}) is: {places}.", "en": "The running-order of poll '{poll}' ({description}) is: {places}.",
"na'vi": "Sute tsnì pole'un '{poll}'mì ({description}) lu: {places}.", "na'vi": "Sute tsnì pole'un '{poll}'mì ({description}) lu: {places}.",
"cy": "Trefn yr pôl '{poll}' ({description}) yw: {places}" "cy": "Trefn yr pôl '{poll}' ({description}) yw: {places}",
"nl": "De volgorde van poll '{poll}' ({description}) is: {places}."
} }
} }

View File

@ -0,0 +1,3 @@
{
"dependencies": ["web", "quotes", "github"]
}

70
modules/project/pages.js Normal file
View File

@ -0,0 +1,70 @@
var exec = require('child_process').exec,
request = require('request');
var pages = function(dbot) {
var quoteCat = dbot.db.quoteArrs[dbot.config.name],
rev, diff;
exec("git rev-list --all | wc -l", function(a, b, c) {
rev = b
});
exec("git log -1", function(a, b, c) {
diff = b
});
/* TODO: merge back into github module */
var milestones;
request("https://api.github.com/repos/" + dbot.config.github.defaultrepo + "/milestones?state=open", function(e, r, b){
milestones = JSON.parse(b);
});
return {
'/project': function(req, res) {
var quote = dbot.config.name;
if(quoteCat) {
quote = quoteCat[Math.floor(Math.random()*quoteCat.length)];
}
res.render('project', {
"name": dbot.config.name,
"intro": dbot.t("dbotintro", {
"botname": dbot.config.name
}),
"curr839": dbot.config.language,
"currver": dbot.config.version,
"currlang": dbot.t("dbotspeaks",{
"lang839": dbot.config.language,
"langen": dbot.strings[dbot.config.language]["en"],
"lang": dbot.t(dbot.config.language),
"name": dbot.config.name
}),
"projectstatus": dbot.t("projectstatus"),
"revnum": dbot.t("revnum",{
"name": dbot.config.name,
"rev": rev,
"ver": "abcdef" // TODO, obviously
}),
"modules": dbot.config.moduleNames,
"loadmod": dbot.t("loadedmodules"),
"debugmode": dbot.t("debugmode-" + dbot.config.debugMode),
"milestones": milestones,
"milestoneprog": dbot.t("milestoneprog"),
"config": dbot.t("configoptions"),
"milestonename": dbot.t("milestonename"),
"openmilestone": dbot.t("openmilestone"),
"closedmilestone": dbot.t("closedmilestone"),
"development": dbot.t("development"),
"dquote": quote,
"diff": diff,
"pagetitle": dbot.t("pagetitle", {
"botname": dbot.config.name
})
});
},
};
};
exports.fetch = function(dbot) {
return pages(dbot);
};

View File

@ -0,0 +1,13 @@
/**
* Module Name: Project
* Description: Web page which shows git status and other various stats about
* the dbot.
*/
var project = function(dbot) {
// Nothing to see here go away love zuzak
}
exports.fetch = function(dbot) {
return new project(dbot);
}

View File

@ -0,0 +1,138 @@
{
"dbotintro": {
"en": "{botname} lorem ipsum dolor sit amet"
},
"dbotspeaks": {
"en": "{name} speaks {lang}",
"de": "{name} spricht {lang} ({langen})",
"fr": "{name} parle {lang} ({langen})",
"it": "{name} parla {lang} ({langen})",
"nl": "{name} spreekt {lang} ({langen})"
},
"pagetitle": {
"en": "{botname} web interface",
"fr": "{botname} interface réseau",
"de": "{botname} Web-Interface",
"it": "{botname} interfaccia web",
},
"en": {
"en": "English",
"fr": "anglais",
"de": "Englisch",
"it": "inglese",
"cy": "saesneg",
"nl": "Engels"
},
"fr": {
"en": "French",
"fr": "français",
"de": "Französisch",
"it": "francese",
"nl": "Frans"
},
"de": {
"en": "German",
"fr": "allemande",
"de": "Deutsch",
"it": "tedesco",
"nl": "Duits"
},
"it": {
"en": "Italian",
"fr": "italien",
"de": "Italiener",
"it": "italiano",
"nl": "Italiaans"
},
"cy": {
"en": "Welsh",
"fr": "gallois",
"de": "Walisisch",
"it": "gallese",
"cy": "cymraeg",
"nl": "Welsh"
},
"na'vi": {
"en": "Na'vi",
"fr": "na'vi",
"de": "Na'vi",
"it": "Na'vi",
"nl": "Na'vi"
},
"es": {
"en": "Spanish",
"fr": "espagnole",
"de": "Spanisch",
"it": "spagnolo",
"nl": "Spaans"
},
"revnum": {
"en": "{name} is at revision {rev}",
"fr": "{name} est à révision {rev}",
"de": "{name} ist in der Revision {rev}",
"it": "{name} il numero di revisione {rev}",
"nl": "{name} is bij revisie {rev}"
},
"loadedmodules": {
"en": "loaded modules",
"fr": "modules chargés",
"it": "moduli caricati",
"nl": "geladen modules"
},
"configoptions": {
"en": "Configuration",
"fr": "Configuration",
"de": "Konfiguration",
"it": "Configuazione",
"nl": "Configuratie"
},
"debugmode-true": {
"en": "Debug mode active",
"fr": "debug actif",
"de": "Debug aktiv",
"it": "debug attivo",
"nl": "Debug actief"
},
"debugmode-false": {
"en": "Debug off",
"fr": "debug éteint",
"de": "Debug ausgeschaltet",
"it": "debug spento",
"nl": "Debug uitgeschakeld"
},
"milestoneprog": {
"en": "Progress",
"fr": "Progression",
"de": "Fortschritt",
"it": "sviluppo",
"nl": "Voortgang"
},
"openmilestone": {
"en": "Open",
"fr": "Ouvert",
"de": "Offen",
"it": "Aperto",
"nl": "Open"
},
"closedmilestone": {
"en": "Closed",
"fr": "Fermé",
"de": "Gesperrt",
"it": "Chiuso",
"nl": "Gesloten"
},
"milestonename": {
"en": "Name",
"fr": "Nom",
"de": "Name",
"it": "Nome",
"nl": "Naam"
},
"development": {
"en": "Development",
"fr": "Développement",
"de": "Entwicklung",
"it": "Sviluppo",
"nl": "Ontwikkeling"
}
}

View File

@ -111,9 +111,6 @@ var quotes = function(dbot) {
} }
}; };
this.api['getQuoteCategory'].external = true;
this.api['getQuoteCategory'].extMap = [ 'name' ];
this.listener = function(event) { this.listener = function(event) {
if(event.action == 'PRIVMSG') { if(event.action == 'PRIVMSG') {
if(event.user == 'reality') { if(event.user == 'reality') {
@ -128,7 +125,7 @@ var quotes = function(dbot) {
}); });
} }
} else if(event.action == 'JOIN') { } else if(event.action == 'JOIN') {
var userQuote = this.api.addQuote(event.user, function(quote) { var userQuote = this.api.getQuote(event.user, function(quote) {
if(quote) { if(quote) {
event.reply(event.user + ': ' + quote); event.reply(event.user + ': ' + quote);
} }

View File

@ -3,132 +3,156 @@
"en": "Nobody loves {category}", "en": "Nobody loves {category}",
"es": "Nadie ama a {category}", "es": "Nadie ama a {category}",
"na'vi": "{category} yawne ke lu kawturu.", "na'vi": "{category} yawne ke lu kawturu.",
"cy": "Does neb yn caru {category}" "cy": "Does neb yn caru {category}",
"nl": "Niemand houdt van {category}"
}, },
"large_categories": { "large_categories": {
"en": "Largest categories: ", "en": "Largest categories: ",
"es": "Los categorías más grandes: ", "es": "Los categorías más grandes: ",
"na'vi": "U atsawl: ", "na'vi": "U atsawl: ",
"cy": "Categoriau mwyaf: " "cy": "Categoriau mwyaf: ",
"nl": "Grootste categoriën: "
}, },
"empty_category": { "empty_category": {
"en": "That category has no quotes in. Commence incineration.", "en": "That category has no quotes in. Commence incineration.",
"es": "Categoría vacía. Iniciar incineración.", "es": "Categoría vacía. Iniciar incineración.",
"na'vi": "Tsauru upxare lu. Nga skxawng lu.", "na'vi": "Tsauru upxare lu. Nga skxawng lu.",
"cy": "Nid yw'r categori yna efo dyfyniadau. Cychwyn orfflosgiad" "cy": "Nid yw'r categori yna efo dyfyniadau. Cychwyn orfflosgiad",
"nl": "Die categorie heeft geen quotes. Bereid het verbrandingsritueel voor."
}, },
"no_results": { "no_results": {
"en": "No results found.", "en": "No results found.",
"es": "No hubo ningún resultado.", "es": "No hubo ningún resultado.",
"na'vi": "Oel kea humit rìmun", "na'vi": "Oel kea humit rìmun",
"cy": "Dim canlyniadau ar gael" "cy": "Dim canlyniadau ar gael",
"nl": "Geen resultaten gevonden."
}, },
"locked_category": { "locked_category": {
"en": "{category} is locked. Commence incineration.", "en": "{category} is locked. Commence incineration.",
"es": "{category} está cerrada. Comenzar incineración.", "es": "{category} está cerrada. Comenzar incineración.",
"na'vi": "{category} ke fkeytok set. Nga skxawng lu nafì'u", "na'vi": "{category} ke fkeytok set. Nga skxawng lu nafì'u",
"cy": "Mae {category} wedi cloi. Cychwyn orfflosgiad" "cy": "Mae {category} wedi cloi. Cychwyn orfflosgiad",
"nl": "{category} is op slot. Bereid het verbrandingsritueel voor."
}, },
"no_quotes": { "no_quotes": {
"en": "No quotes exist under {category}", "en": "No quotes exist under {category}",
"es": "Ninguna cita existe en {category}", "es": "Ninguna cita existe en {category}",
"na'vi": "Kea upxare fkeytok {category}mì", "na'vi": "Kea upxare fkeytok {category}mì",
"cy": "Does dim dyfyniadau gan {category}" "cy": "Does dim dyfyniadau gan {category}",
"nl": "Er zijn geen quotes in {category}"
}, },
"last_removed": { "last_removed": {
"en": "Last quote removed from {category}.", "en": "Last quote removed from {category}.",
"es": "Última cita quitado de {category}.", "es": "Última cita quitado de {category}.",
"na'vi": "Oel 'upxareti aham 'aku {category}ta", "na'vi": "Oel 'upxareti aham 'aku {category}ta",
"cy": "Dyfyniad olaf wedi ei ddileu o {category}" "cy": "Dyfyniad olaf wedi ei ddileu o {category}",
"nl": "De laatste quote is verwijderd uit {category}."
}, },
"no_recent_adds": { "no_recent_adds": {
"en": "No quotes were added recently.", "en": "No quotes were added recently.",
"es": "Ninguna cita fue añadido recientamente.", "es": "Ninguna cita fue añadido recientamente.",
"na'vi": "Kea upxareti samung nìfkrr", "na'vi": "Kea upxareti samung nìfkrr",
"cy": "Nid oes unrhyw dyfyniadau wedi ei ychwwanegu'n ddiweddar" "cy": "Nid oes unrhyw dyfyniadau wedi ei ychwwanegu'n ddiweddar",
"nl": "Er zijn recentelijk geen quotes toegevoegd."
}, },
"rmlast_spam": { "rmlast_spam": {
"en": "No spamming that shit. Try again in a few minutes...", "en": "No spamming that shit. Try again in a few minutes...",
"es": "No me inundes de mierda. Intenta otra vez en unos minutos...", "es": "No me inundes de mierda. Intenta otra vez en unos minutos...",
"na'vi": "Nga Tsasngelit ke zene fpivere'. Sweylu nga fmivi ye'rìn...", "na'vi": "Nga Tsasngelit ke zene fpivere'. Sweylu nga fmivi ye'rìn...",
"cy": "Peidiwch a sbamio hwna. Triwch eto mewn ychydyg funudau..." "cy": "Peidiwch a sbamio hwna. Triwch eto mewn ychydyg funudau...",
"nl": "Dat spammen kun je ook lekker laten. Probeer het zometeen nog eens..."
}, },
"removed_from": { "removed_from": {
"en": "'{quote}' removed from {category}", "en": "'{quote}' removed from {category}",
"es": "'{quote}' quitado de {category}", "es": "'{quote}' quitado de {category}",
"na'vi": "'{quote}'(it/ti) 'ìyaku {category}", "na'vi": "'{quote}'(it/ti) 'ìyaku {category}",
"cy": "'{quote}' wedi ei ddileu o {category}" "cy": "'{quote}' wedi ei ddileu o {category}",
"nl": "{quote} verwijderd uit {category}"
}, },
"q_not_exist_under": { "q_not_exist_under": {
"en": "'{quote}' doesn't exist under '{category}'.", "en": "'{quote}' doesn't exist under '{category}'.",
"es": "'{quote}' no existe en '{category}'.", "es": "'{quote}' no existe en '{category}'.",
"na'vi": "'{quote}' ke fkeytok '{category}'ta.", "na'vi": "'{quote}' ke fkeytok '{category}'ta.",
"cy": "Nid yw '{quote}' yn bodoli yn '{category}'" "cy": "Nid yw '{quote}' yn bodoli yn '{category}'",
"nl": "{quote} bestaat niet in '{category}'."
}, },
"total_quotes": { "total_quotes": {
"en": "Total quote count: {count}.", "en": "Total quote count: {count}.",
"es": "Total de citas: {count}.", "es": "Total de citas: {count}.",
"na'vi": "'upxareri holpxay: {count}.", "na'vi": "'upxareri holpxay: {count}.",
"cy": "Cyfanswm dyfyniadau: {count}." "cy": "Cyfanswm dyfyniadau: {count}.",
"nl": "Totaal aantal quotes: {count}."
}, },
"quote_exists": { "quote_exists": {
"en": "Quote already in DB. Initiate incineration.", "en": "Quote already in DB. Initiate incineration.",
"es": "Cita ya existe. Iniciar incineración.", "es": "Cita ya existe. Iniciar incineración.",
"na'vi": "'Upxarel säomumit fìtsengit tok srekrr. Nga skxawng lu.", "na'vi": "'Upxarel säomumit fìtsengit tok srekrr. Nga skxawng lu.",
"cy": "Dyfyniad yn y gronfa ddata yn barod. Cychwyn orfflosgiad" "cy": "Dyfyniad yn y gronfa ddata yn barod. Cychwyn orfflosgiad",
"nl": "De quote bestaat al. Bereid het verbrandingsritueel voor."
}, },
"quote_saved": { "quote_saved": {
"en": "Quote saved in '{category}' ({count}).", "en": "Quote saved in '{category}' ({count}).",
"es": "Cita guardada en '{category}' ({count}).", "es": "Cita guardada en '{category}' ({count}).",
"na'vi": "Oe zayerok '{category}'mì ({count}).", "na'vi": "Oe zayerok '{category}'mì ({count}).",
"cy": "Dyfyniad wedi ei gadw yn '{category}' ({count})." "cy": "Dyfyniad wedi ei gadw yn '{category}' ({count}).",
"nl": "Quote opgeslagen in '{category}' ({count})."
}, },
"quote_replace": { "quote_replace": {
"en": "No replacing arrays, you whore.", "en": "No replacing arrays, you whore.",
"es": "No sustituites arrays, hijo de puta.", "es": "No sustituites arrays, hijo de puta.",
"na'vi": "Ngal fìsäomumit ke tsun rivawn. Nga muntxa sayi suteo hrh.", "na'vi": "Ngal fìsäomumit ke tsun rivawn. Nga muntxa sayi suteo hrh.",
"cy": "Peidiwch a newid rhestrau, y cachgi" "cy": "Peidiwch a newid rhestrau, y cachgi",
"nl": "Geen arrays vervangen, slet."
}, },
"quote_count": { "quote_count": {
"en": "{category} has {count} quotes.", "en": "{category} has {count} quotes.",
"es": "{category} tiene {count} citas.", "es": "{category} tiene {count} citas.",
"na'vi": "{count}a upxare {category}ur lu.", "na'vi": "{count}a upxare {category}ur lu.",
"cy": "{count} dyfyniad yn {category}" "cy": "{count} dyfyniad yn {category}",
"nl": "{category} heeft {count} quotes."
}, },
"quote_link": { "quote_link": {
"en": "Link to {category} - {url}", "en": "Link to {category} - {url}",
"es": "Enlace a {category} - {url}", "es": "Enlace a {category} - {url}",
"na'vi": "Fya'o {category}ne - {url}", "na'vi": "Fya'o {category}ne - {url}",
"cy": "Dolen i {category} - {url}" "cy": "Dolen i {category} - {url}",
"nl": "Link naar {category} - {url}"
}, },
"search_results": { "search_results": {
"en": "{category} ({needle}): '{quote}' [{matches} results]", "en": "{category} ({needle}): '{quote}' [{matches} results]",
"es" : "{category} ({needle}): '{quote}' [{matches} resultados]", "es" : "{category} ({needle}): '{quote}' [{matches} resultados]",
"na'vi": "{category} ({needle}): '{quote}' [kum a{matches}]", "na'vi": "{category} ({needle}): '{quote}' [kum a{matches}]",
"cy": "{category} ({needle}): '{quote}' [{matches} canlyniad]" "cy": "{category} ({needle}): '{quote}' [{matches} canlyniad]",
"cy": "{category} ({needle}): '{quote}' [{matches} resultaten]"
}, },
"quote_cache_auto_remove": { "quote_cache_auto_remove": {
"en": "There are {count} quotes in the removal cache, which will be automatically cleared.", "en": "There are {count} quotes in the removal cache, which will be automatically cleared.",
"na'vi": "{count}a 'upxarel sngelit tok, Oel 'ayku sngelit lukenga." "na'vi": "{count}a 'upxarel sngelit tok, Oel 'ayku sngelit lukenga.",
"nl": "Er staan {count} quotes klaar om verwijderd te worden, wat automatisch zal gebeuren."
}, },
"quote_cache_manual_remove": { "quote_cache_manual_remove": {
"en": "There are {count} quotes in the removal cache, which must be manually cleared.", "en": "There are {count} quotes in the removal cache, which must be manually cleared.",
"na'vi": "{count}a 'upxarel sngelit tok slä oel ke 'ayku sngelit tafral nga zene 'aivku" "na'vi": "{count}a 'upxarel sngelit tok slä oel ke 'ayku sngelit tafral nga zene 'aivku",
"nl": "Er staan {count} quotes klaar om verwijderd te worden, wat handmatig zal moeten gebeuren."
}, },
"quote_cache_cleared": { "quote_cache_cleared": {
"en": "{count} quotes cleared from the removal cache.", "en": "{count} quotes cleared from the removal cache.",
"na'vi": "Oel 'aìmku {count}a 'upxareti ta sngel." "na'vi": "Oel 'aìmku {count}a 'upxareti ta sngel.",
"nl": "{count} quotes verwijderd uit de verwijderlijst."
}, },
"quote_cache_reinstated": { "quote_cache_reinstated": {
"en": "{count} quotes reinstated from the removal cache.", "en": "{count} quotes reinstated from the removal cache.",
"na'vi": "{count}a 'upxare tolätxaw ta sngel." "na'vi": "{count}a 'upxare tolätxaw ta sngel.",
"nl": "{count} quotes hersteld van de verwijderlijst."
}, },
"rm_cache_limit": { "rm_cache_limit": {
"en": "Attention: Too many quotes removed, rmCache must be cleared or reinstated manually with ~rmconfirm or ~rmdeny.", "en": "Attention: Too many quotes removed, rmCache must be cleared or reinstated manually with ~rmconfirm or ~rmdeny.",
"na'vi": "Oel zerok 'upxareti apxay set, sweylu txo nga 'aivku upxareti ìlä ~rmconfirm fu ~rmdeny." "na'vi": "Oel zerok 'upxareti apxay set, sweylu txo nga 'aivku upxareti ìlä ~rmconfirm fu ~rmdeny.",
"nl": "Waarschuwing: Er zijn te veel quotes verwijderd. rmCache moet opgeschoond of herinstalleerd worden met ~rmconfirm of ~rmdeny"
}, },
"web_not_configured": { "web_not_configured": {
"en": "Cannot link to category. Web module is either not loaded or misconfigured." "en": "Cannot link to category. Web module is either not loaded or misconfigured.",
"nl": "De categorie kan niet gelinkt worden. De web module is niet geladen of onjuist geconfigureerd."
}, },
"category_renamed": { "category_renamed": {
"en": "Category ~{oldName} renamed to ~{newName}." "en": "Category ~{oldName} renamed to ~{newName}."

View File

@ -1,58 +1,72 @@
{ {
"rain-0": { "rain-0": {
"en" : "It's not raining in {place}.", "en" : "It's not raining in {place}.",
"na'vi": "tompa ke zup {place}ur." "na'vi": "tompa ke zup {place}ur.",
"nl": "Het regent niet in {place}."
}, },
"rain-1": { "rain-1": {
"en" : "It's raining in {place}.", "en" : "It's raining in {place}.",
"na'vi":"tompa zup {place}ur." "na'vi":"tompa zup {place}ur.",
"nl": "Het regent in {place}."
}, },
"rain-2": { "rain-2": {
"en" : "It's raining rather a lot in {place}.", "en" : "It's raining rather a lot in {place}.",
"na'vi":"tompa zup {place}ur nìhawng." "na'vi":"tompa zup {place}ur nìhawng.",
"nl": "Het regent tamelijk hard in {place}."
}, },
"rain-3": { "rain-3": {
"en" : "It's raining shitloads.", "en" : "It's raining shitloads.",
"na'vi":"tompa zup {place}ur nìhawng." "na'vi":"tompa zup {place}ur nìhawng.",
"nl": "Het regent nu toch wel erg hard."
}, },
"rain-4": { "rain-4": {
"en" : "It's raining fucktons.", "en" : "It's raining fucktons.",
"na'vi": "tompa zup {place}ur nìhawng." "na'vi": "tompa zup {place}ur nìhawng.",
"nl": "De regen komt verdorie met bakken uit de lucht."
}, },
"rain-5": { "rain-5": {
"en" : "It's raining whales (in {place})!", "en" : "It's raining whales (in {place})!",
"na'vi": "payoang zup {place}ur" "na'vi": "payoang zup {place}ur",
"nl": "Een punker krijgt z'n hanekam niet meer omhoog gehouden."
}, },
"rain-6": { "rain-6": {
"en" : "IT'S SO FUCKING WET OUT HERE MAN", "en" : "IT'S SO FUCKING WET OUT HERE MAN",
"na'vi" : "pey lu oeru nìhawng taluna tok fìtengeti" "na'vi" : "pey lu oeru nìhawng taluna tok fìtengeti",
"nl": "Dit is dus een inloopdouche."
}, },
"rain-7": { "rain-7": {
"en" : "I AM SO MOIST RIGHT NOW", "en" : "I AM SO MOIST RIGHT NOW",
"na'vi":"pey lu oeru nìhawng taluna tok fìtengeti" "na'vi":"pey lu oeru nìhawng taluna tok fìtengeti",
"nl": "IK VOEL ME NU TOCH ANDERS WEL BEHOORLIJK ONDER GEZEKEN."
}, },
"rain-8": { "rain-8": {
"en" : "You used a #3 pencil instead of #2, didn't you?", "en" : "You used a #3 pencil instead of #2, didn't you?",
"na'vi": "Nga pamrel sami hu pencìl a#3 ulte ke pamrel sami pencìl a#2 kefyak?" "na'vi": "Nga pamrel sami hu pencìl a#3 ulte ke pamrel sami pencìl a#2 kefyak?",
"nl": "PROOST."
}, },
"rain-9": { "rain-9": {
"en" : "WELCOME TO ATLANTIS", "en" : "WELCOME TO ATLANTIS",
"na'vi": "ziva'u nìprrte atlantisftu." "na'vi": "ziva'u nìprrte atlantisftu.",
"nl": "HAD IK GEVRAAGD OM EEN OMMETJE ATLANTIS?!"
}, },
"rain-10": { "rain-10": {
"en" : "GET INSIDE", "en" : "GET INSIDE",
"na'vi": "Sweylu txo nga livatam futa ngal fìtsengeti tok" "na'vi": "Sweylu txo nga livatam futa ngal fìtsengeti tok",
"nl": "SCHUIL, BITCH! SCHUIL!"
}, },
"rain-11": { "rain-11": {
"en" : "LOL U PROBABLY DIED", "en" : "LOL U PROBABLY DIED",
"na'vi": "hrh kxawm nga tolerkup." "na'vi": "hrh kxawm nga tolerkup.",
"nl": "HA, NU BEN JE TOCH ZEKER VERZOPEN?!"
}, },
"rain-e": { "rain-e": {
"en" : "Unable to fetch weather data.", "en" : "Unable to fetch weather data.",
"na'vi":"Oel ke tsun rivum sänumeti teriyafkeyk." "na'vi":"Oel ke tsun rivum sänumeti teriyafkeyk.",
"nl": "Geen weerinformatie beschikbaar."
}, },
"rain-u": { "rain-u": {
"en": "Location too ambigious to process.", "en": "Location too ambiguous to process.",
"na'vi":"tsengeri, yayayr lu oeru." "na'vi":"tsengeri, yayayr lu oeru.",
"nl": "Deze locatie is te onduidelijk."
} }
} }

View File

@ -1,18 +1,22 @@
{ {
"report": { "report": {
"en": "Attention: {reporter} has reported {reported} in {channel}. The reason given was: \"{reason}.\"", "en": "Attention: {reporter} has reported {reported} in {channel}. The reason given was: \"{reason}.\"",
"na'vi": "{reporter}ìl fpìl futa {reported} fe' lu taluna {reason}." "na'vi": "{reporter}ìl fpìl futa {reported} fe' lu taluna {reason}.",
"nl": "Waarschuwing: {reporter} heeft {reported} aangegeven in {channel}. De reden die gegeven werd was: \"{reason}.\""
}, },
"reported": { "reported": {
"en": "Thank you, {reported} has been reported to the channel administrators.", "en": "Thank you, {reported} has been reported to the channel administrators.",
"na'vi": "Irayo si ngari, fìtsengìri ayeyktan omum teri {reported}it set." "na'vi": "Irayo si ngari, fìtsengìri ayeyktan omum teri {reported}it set.",
"nl": "Bedankt, {reported} is aangegeven bij de administrators."
}, },
"user_not_found": { "user_not_found": {
"en": "{reported} isn't a known user in {channel}.", "en": "{reported} isn't a known user in {channel}.",
"na'vi": "Oel ke omum {reported}it mì {channel}." "na'vi": "Oel ke omum {reported}it mì {channel}.",
"nl": "{reported} is geen bestaande gebruiker in {channel}."
}, },
"not_in_channel": { "not_in_channel": {
"en": "I am not present in {channel}.", "en": "I am not present in {channel}.",
"na'vi": "Oel {channel}it ke tok." "na'vi": "Oel {channel}it ke tok.",
"nl": "Ik ben niet aanwezig in {channel}."
} }
} }

View File

@ -3,12 +3,14 @@
"en": "{correcter} meant: {fix}", "en": "{correcter} meant: {fix}",
"es": "{correcter} quería decir: {fix}", "es": "{correcter} quería decir: {fix}",
"na'vi": "Sweylu {correcter} pamrel sivi: {fix}", "na'vi": "Sweylu {correcter} pamrel sivi: {fix}",
"cy": "Oedd {correcter} yn feddwl: {fix}" "cy": "Oedd {correcter} yn feddwl: {fix}",
"nl": "{correcter} bedoelde: {fix}"
}, },
"spelling_other": { "spelling_other": {
"en": "{correcter} thinks {candidate} meant: {fix}", "en": "{correcter} thinks {candidate} meant: {fix}",
"es": "{correcter} piensa que {candidate} queria decir: {fix}", "es": "{correcter} piensa que {candidate} queria decir: {fix}",
"na'vi": "{correcter} fpìl futa sweylu {candiate} pamrel sivi: {fix}", "na'vi": "{correcter} fpìl futa sweylu {candiate} pamrel sivi: {fix}",
"cy": "Mae {correcter} yn meddwl bod {candidate} yn feddwl: {fix}" "cy": "Mae {correcter} yn meddwl bod {candidate} yn feddwl: {fix}",
"nl": "{correcter} denkt dat {candidate} bedoelde: {fix}"
} }
} }

View File

@ -13,6 +13,7 @@
}, },
"not-found": { "not-found": {
"en": "{s} No results.", "en": "{s} No results.",
"na'vi": "{s}, Oel ke tsun rivum ayuoti." "na'vi": "{s}, Oel ke tsun rivum ayuoti.",
"nl": "{s} Geen resultaten."
} }
} }

@ -1 +1 @@
Subproject commit e5519f353abf00e4ec25702f8e02231c9b1f5258 Subproject commit 500a21d78b8882eb206598011ab3a5f30e7113b6

View File

@ -1,26 +1,32 @@
{ {
"alias": { "alias": {
"en": "{alias} is an alias of {user}", "en": "{alias} is an alias of {user}",
"na'vi": "ayfko syaw {user} {alias} nìteng" "na'vi": "ayfko syaw {user} {alias} nìteng",
"nl": "{alias} is een alias van {user}"
}, },
"primary": { "primary": {
"en": "{user} is a primary user (currently {currentNick}) with {count} aliases, ", "en": "{user} ({currentNick}) is a primary user with {count} aliases, ",
"na'vi": "{user} lu txin ulte {count}a stxo lu poru, " "na'vi": "{user} ({currentNick}) lu txin ulte {count}a stxo lu poru, ",
"nl": "{user} ({currentNick}) is een primaire gebruiker met {count} aliassen, "
}, },
"unknown_alias": { "unknown_alias": {
"en": "{alias} does not currently exist as an alias or known user.", "en": "{alias} does not currently exist as an alias or known user.",
"na'vi": "{alias} ke fkeytok nìfkrr" "na'vi": "{alias} ke fkeytok nìfkrr",
"nl": "{alias} staat momenteel niet bekend als een bestaande gebruiker of alias."
}, },
"aliasparentset": { "aliasparentset": {
"en": "{newParent} is now the parent user, and {newAlias} is an alias.", "en": "{newParent} is now the parent user, and {newAlias} is an alias.",
"na'vi": "{newParent} lu sa'sem set ulte {newAlias} lu stxo set nìteng." "na'vi": "{newParent} lu sa'sem set ulte {newAlias} lu stxo set nìteng.",
"nl": "{newParent} is nu de bovenliggende gebruiker, en {newAlias} is een alias."
}, },
"unprimary_error": { "unprimary_error": {
"en": "One of those users isn't currently recorded as a primary user.", "en": "One of those users isn't currently recorded as a primary user.",
"na'vi": "fo sute txin ke lu." "na'vi": "fo sute txin ke lu.",
"nl": "Een van deze gebruikers is nog niet bekend als een primaire gebruiker."
}, },
"merged_users": { "merged_users": {
"en": "{old_user} and their aliases have been merged into {new_user}.", "en": "{old_user} and their aliases have been merged into {new_user}.",
"na'vi": "{old_user} ulte stxo alahe {new_user} lu set." "na'vi": "{old_user} ulte stxo alahe {new_user} lu set.",
"nl": "{old_user} en zijn aliassen zijn samengevoegd met {new_user}."
} }
} }

View File

@ -1,5 +1,5 @@
{ {
"webHost": "localhost", "webHost": "nourishedcloud.com",
"webPort": 8080, "webPort": 8080,
"externalPath": false, "externalPath": false,
"help": "https://github.com/reality/depressionbot/blob/master/modules/web/README.md" "help": "https://github.com/reality/depressionbot/blob/master/modules/web/README.md"

108
public/imgurr.css Normal file
View File

@ -0,0 +1,108 @@
#container {
text-align:center;
}
#container,#image {
margin:0;
max-height:100%;
max-width:100%;
padding:0;
}
#details {
display:none;
font-family:sans-serif;
font-weight:700;
left:25px;
min-width:280px;
padding:20px;
text-align:center;
top:25px;
}
#history {
left:25px;
margin:0;
max-height:210px;
overflow:hidden;
padding:0;
top:95px;
}
#history li {
font-family:monospace;
left:25px;
margin-bottom:10px;
opacity:0.1;
text-align:center;
width:168px;
}
#history li,#loading,#count {
display:block;
font-family:monospace;
font-size:10px;
padding:10px;
}
#history li:hover,#history li:nth-of-type(1) {
opacity:1!important;
}
#history li:nth-of-type(2) {
opacity:0.8;
}
#history li:nth-of-type(3) {
opacity:0.6;
}
#history li:nth-of-type(4) {
opacity:0.4;
}
#history li:nth-of-type(5) {
opacity:0.2;
}
#history,#loading,#details,#count {
position:absolute;
}
#loading, #count {
font-weight:500;
}
#loading {
top:95px;
left:220px;
min-width:95px;
}
#count {
bottom:25px;
left:25px;
display:none;
}
#loading,#details,#history li,#count {
background:rgba(43,43,43,0.8);
border-radius:5px;
color:#85bf25;
}
a {
color:inherit;
}
body.crop {
overflow:hidden;
}
html,body {
background-color:#121211;
border:0;
height:100%;
margin:0;
overflow:auto;
padding:0;
}

65
public/project.css Normal file
View File

@ -0,0 +1,65 @@
pre#gitdiff {
text-align:left;
width:80;
margin:auto;
}
div#main {
text-align:inherit;
font-size:18px;
}
h2,h3,h4,h5,h6,.center {
text-align:center;
text-transform:lowercase;
}
table#milestones {
margin:auto;
width:80%;
}
table#milestones td {
padding:5px;
}
p.intro {
text-align:center;
border:1px solid #ccc;
padding:20px;
border-radius:4px;
}
div.progress.open {
background-color: #f4fff4;
background-image: linear-gradient(to bottom,#f4fff4,#f9fff9);
}
div.progress {
margin-top:auto;
margin-bottom:auto;
}
div.progress-inner.open {
width:20%;
background-color: #3fff3f;
background-image: linear-gradient(to bottom,#3fff3f,#7fff7f);
}
div.progress.closed {
background-color: #fff5f5;
background-image: linear-gradient(to bottom,#fff5f5,#fff9f9);
}
div.progress-inner.closed {
background-color: #ff3f3f;
background-image: linear-gradient(to bottom,#ff3f3f,#ff7f7f);
width:20%;
}
#config {
text-align:center;
text-transform:lowercase;
}
li {
background-image: linear-gradient(to bottom, #f5ebe2, #f5e6d8);
border:1px solid #f5dcc5;
padding:5px;
margin:5px;
display:inline-block;
}
#footer {
font-size:80%;
}

View File

@ -13,7 +13,6 @@ body {
margin: 0; margin: 0;
font-family: "Source Sans Pro", sans-serif; font-family: "Source Sans Pro", sans-serif;
color: #444; color: #444;
text-shadow: 1px 1px 2px #2B2B2B;
background: url("background.jpg") no-repeat center center fixed; background: url("background.jpg") no-repeat center center fixed;
-webkit-background-size: cover; -webkit-background-size: cover;
-moz-background-size: cover; -moz-background-size: cover;
@ -133,7 +132,6 @@ li.quote {
padding: 6px; padding: 6px;
font-size: 18px; font-size: 18px;
width: 40%; width: 40%;
text-shadow: 1px 1px 1px black;
} }
img { img {

76
views/imgur/imgurr.jade Normal file
View File

@ -0,0 +1,76 @@
!!! 5
html(lang='en')
head
meta(charset='utf-8')
script(type="text/javascript", src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js")
link(rel="stylesheet", href="/imgurr.css")
title random imgur
script
var count = 0;
function giveMessage(msg) {
$('<li>'+msg+'</li>').prependTo('#history').hide().slideDown();
}
var lock = false
var highscore = #{highscore} + 1;
var score = highscore;
$('#count').text(score);
function getNewImage() {
count += 1;
lock = true;
$('#loading').fadeIn();
$('#loading').text('Loading image ' + count + '...');
document.title = 'random imgur (' + count + ')';
$('#loading').fadeIn();
$('#image').load(function(){});
$.get("/api/imgur/getRandomImage", function(d) {
$('#image').attr('src', d.data[0]);
lock = false;
score -= 1;
$('#count').text(score);
$('#details').text("Fetching info...");
giveMessage('<a href="' + d.data[0] + '">' + d.data[0] + '</a>');
$.get("/api/imgur/getImageInfoString", { 'slug': d.data[1] }, function(info) {
if(info.data[0].indexOf('undefined') == -1) {
$("#details").text(count + ': ' + info.data[0]);
$('#details').show();
} else {
$("#details").hide();
}
$('#loading').fadeOut();
}, "json");
}, "json");
}
$(getNewImage());
$(document).on('keydown', function(e){
switch(e.which){
case 82: // r
score = highscore;
$('#count').text(highscore);
giveMessage("Score reset.");
case 13: // enter
case 32: // space
if (lock) {
$('#loading').text(function(index, text){
return text.replace(/\.(?=[^.]*$)/, "!");
});
} else {
getNewImage();
}
break;
case 67:
$('#count').fadeToggle();
break;
case 83: // s
$('body').toggleClass('crop');
giveMessage("Toggled scrollbars.")
};
});
body
div#loading Loading image 1...
div#details Press [SPACE] to load a new image
div#count
#{highscore}
ul#history
li Press [SPACE] for next
div#container
img#image

View File

@ -0,0 +1,9 @@
extends ../layout
block content
div#http
Total Imgur HTTP requests made: #{totalHttpRequests}
div#api
Total Imgur API requests made: #{totalApiRequests}
div#images
Total Images generated: #{totalImages}

View File

@ -0,0 +1,63 @@
!!!
html(lang='#{curr839}')
head
meta(charset='utf-8')
script(type="text/javascript", src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js")
link(rel="stylesheet", type="text/css", href="http://fonts.googleapis.com/css?family=Source+Sans+Pro")
link(rel="stylesheet", type="text/css", href="/bootstrap/css/bootstrap.min.css")
link(rel='stylesheet', type='text/css', href='/styles.css')
link(rel="stylesheet", href="/project.css")
title #{pagetitle}
- var mstone = "milestone"
style(type="text/css")
each milestone in milestones
- current = mstone+milestone.number
- wdth = ((milestone.open_issues/(milestone.open_issues + milestone.closed_issues))*100)
.current { width: wdth% }
body
div.container
div#page
div#title #{pagetitle}
div.container#main
p.intro
#{dquote}
section#git
h3 #{development}
p.center
#{revnum}
pre#gitdiff
#{diff}
h4 #{milestoneprog}
table#milestones.center
tr
th #{milestonename}
th #{milestoneprog}
th #{openmilestone}
th #{closedmilestone}
each milestone in milestones
- var mstone = "milestone"
- var wd = "width:"
- var pc = "%"
- var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100)
tr(id=mstone+milestone.number)
td
a(href=milestone.url)
#{milestone.title}
td
div.progress(class=milestone.state)
div.progress-inner(style=wd+wdth+pc)(class=milestone.state)
&nbsp;
td #{milestone.open_issues}
td #{milestone.closed_issues}
section#config
h3 #{config}
ul
li #{currlang}
li #{debugmode}
h4 #{loadmod}
ul#modules
each module in modules
li #{module}
section#footer
p
#{currver}