Coverage for erfgoedbot/converters.py : 100%
![Show keyboard shortcuts](keybd_closed.png)
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
#!/usr/bin/python # -*- coding: utf-8 -*-
# x or y is empty
(x - 600) / 1000 * (x - 600) / 1000 * (y - 200) / 1000 (y - 200) / 1000 * (y - 200) / 1000 * (y - 200) / 1000
(x - 600) / 1000 * (y - 200) / 1000 * (y - 200) / 1000 (x - 600) / 1000 * (x - 600) / 1000 * (x - 600) / 1000
else:
# result = re.search("\[\[(.+?)(\||\]\])", text) \[\[ # Opening brackets (?P<target>.+?) # Link target (\||\]\]) # Either a pipe or closing brackets """, re.VERBOSE)
([Cc]ommons:)? # Commons prefix (Category:)? # Category prefix (?P<category>.*) # The link target """, re.VERBOSE)
"""Extract and sanitize the contents of a parsed template param."""
# Remove leading or trailing spaces
"""Remove undesirable wikitext features from a string."""
""" Convert integer in recognized scripts to European digits.
European Digits meaning 0123456789 (slight clarification per https://en.wikipedia.org/wiki/Arabic_numerals)
Returns an empty string on fail and trims any leading zeros. """ |