elif key == u'Rodelverleih': inn.sled_rental, inn.sled_rental_comment = _conv(wrpylib.wrvalidators.BoolUnicodeTupleValidator().to_python, value, key)
elif key == u'Handyempfang': inn.mobile_provider = _conv(wrpylib.wrvalidators.ValueCommentListNeinLoopNone().to_python, value, key)
elif key == u'Homepage': inn.homepage = _conv(wrpylib.wrvalidators.UrlNeinNone().to_python, value, key)
- elif key == u'E-Mail': inn.email_list = _conv(wrpylib.wrvalidators.EmailCommentListNeinLoopNone().to_python, value, key)
+ elif key == u'E-Mail': inn.email_list = _conv(wrpylib.wrvalidators.EmailCommentListNeinLoopNone(allow_masked_email=True).to_python, value, key)
elif key == u'Telefon': inn.phone_list = _conv(wrpylib.wrvalidators.PhoneCommentListNeinLoopNone(comments_are_optional=True).to_python, value, key)
elif key == u'Bild': inn.image = _conv(wrpylib.wrvalidators.UnicodeNone().to_python, value, key)
elif key == u'Rodelbahnen': inn.sledding_list = _conv(wrpylib.wrvalidators.WikiPageListLoopNone().to_python, value, key)
keys.append(u'Homepage')
values.append(wrpylib.wrvalidators.UrlNeinNone().from_python(inn.homepage))
keys.append(u'E-Mail')
- values.append(wrpylib.wrvalidators.EmailCommentListNeinLoopNone().from_python(inn.email_list))
+ values.append(wrpylib.wrvalidators.EmailCommentListNeinLoopNone(allow_masked_email=True).from_python(inn.email_list))
keys.append(u'Telefon')
values.append(wrpylib.wrvalidators.PhoneCommentListNeinLoopNone(comments_are_optional=True).from_python(inn.phone_list))
keys.append(u'Bild')
return start, end, unsigned_value
+def create_template_unsigned(template_title, unsigned):
+ unsigned = wrpylib.wrvalidators.UnsignedNone().from_python(unsigned)
+ if len(unsigned) == 0: unsigned = u' '
+ return wrpylib.mwmarkup.create_template(template_title, [unsigned])
+
+
def find_template_Hoehenunterschied(wikitext):
"""Same as find_template_unsigned with template '{{Höhenunterschied|350}}'"""
return find_template_unsigned(wikitext, u'Höhenunterschied')
+def create_template_Hoehenunterschied(ele_diff):
+ return create_template_unsigned(u'Höhenunterschied', ele_diff)
+
+
def find_template_Bahnlaenge(wikitext):
"""Same as find_template_unsigned with template '{{Bahnlänge|4500}}'"""
return find_template_unsigned(wikitext, u'Bahnlänge')
+def create_template_Bahnlaenge(length):
+ return create_template_unsigned(u'Bahnlänge', length)
+
+
def find_template_Gehzeit(wikitext):
"""Same as find_template_unsigned with template '{{Gehzeit|60}}'"""
return find_template_unsigned(wikitext, u'Gehzeit')
+def create_template_Gehzeit(walkup_time):
+ return create_template_unsigned(u'Gehzeit', walkup_time)
+
+
def find_template_Forumlink(wikitext):
"""Same as find_template_unsigned with template '{{Forumlink|26}}'"""
start, end = wrpylib.mwmarkup.find_template(wikitext, u'Forumlink')