13 lines
269 B
Python
13 lines
269 B
Python
import re
|
|
|
|
SNIPPETS = {}
|
|
|
|
with open('/web/etc/www-data/snippet.list') as snl:
|
|
for line in snl:
|
|
label, value = re.split(r'\s+', line, 1)
|
|
value = value.rstrip("\r\n")
|
|
SNIPPETS[label] = value
|
|
|
|
def snippet(self, name):
|
|
return SNIPPETS[name]
|