Browse Source

misc - Compilation error fixes; minor TODOs

wakabamark
k-anon 10 years ago
parent
commit
a3a2598372
6 changed files with 12 additions and 11 deletions
  1. +0
    -0
      app.py
  2. +3
    -4
      board.py
  3. +2
    -0
      oekaki.py
  4. +4
    -4
      strings.py
  5. +2
    -2
      strings.sed
  6. +1
    -1
      template.py

+ 0
- 0
app.py View File


+ 3
- 4
board.py View File

@@ -10,7 +10,7 @@ import oekaki
import util
import model
import config, config_defaults
import strings_en as strings
import strings as strings
from util import WakaError, local
from template import Template

@@ -404,9 +404,8 @@ class Board(object):
elif email.lower() == 'noko':
noko = True

# fix up the email/link
# TODO support URLs instead of emails too (wakaba uses a regexp here)
if email:
# fix up the email/link, if it is not a generic URI already.
if email and not re.match("(?!^\w+:)|(?:\:\/\/)", email):
email = "mailto:%s" % email

# format comment


+ 2
- 0
oekaki.py View File

@@ -1,3 +1,5 @@
import re

PCH_RE = re.compile('\.[^\.]+$')
def find_pch(image_filename):
return re.sub(PCH_RE, '.pch', image_filename)


+ 4
- 4
strings.py View File

@@ -211,10 +211,10 @@ OEKUNKNOWN = 'Unknown oekaki painter requested.'
HAXORING = 'Stop hax0ring the Gibson!'

OEKPAINTERS = [
{painter: "shi_norm", name: "Shi Normal"},
{painter: "shi_pro", name: "Shi Pro"},
{painter: "shi_norm_selfy", name: "Shi Normal+Selfy"},
{painter: "shi_pro_selfy", name: "Shi Pro+Selfy"},
{"painter": "shi_norm", "name": "Shi Normal"},
{"painter": "shi_pro", "name": "Shi Pro"},
{"painter": "shi_norm_selfy", "name": "Shi Normal+Selfy"},
{"painter": "shi_pro_selfy", "name": "Shi Pro+Selfy"},
]




+ 2
- 2
strings.sed View File

@@ -12,9 +12,9 @@ s/^\s+(['"].*['"]);(\s*#?.*)$/ \1\2/;
# S_OEKPAINTERS
s/use constant S_([A-Z0-9_]+) ?=> ?\[\s*$/\1 = [/;
/^\s*\{/ {
s/\{ /{/;
s/\{ /{"/;
s/ \}/}/;
s/=>/\: /g;
s/=>/"\: /g;
}
s/^\];\s*$/]/;



+ 1
- 1
template.py View File

@@ -7,7 +7,7 @@ import random
import jinja2

import config, config_defaults
import strings_en as strings
import strings
from util import local

TEMPLATES_DIR = 'templates'


Loading…
Cancel
Save