User:OmegaK2/page templates

From Path of Exile Wiki
Jump to navigation Jump to search

new main map pages

for map_name in maps:
	source = site.pages['%s (disambiguation)' % map_name]
	history = re.search('<section begin="version history".*<section end="version history" />', source.text(), re.UNICODE | re.DOTALL)
	if history is None:
		print('History not found: %s' % map_name)
		continue
	target = site.pages['%s' % map_name]
	if not target.exists:
		print('no exist: %s' % map_name)
		continue
	target.save("""{{Current map version infobox}}
{{Itembox|page={{subst:PAGENAME}} ({{Current map series}})}}
{{{description|'''{{subst:PAGENAME}}''' is a [[map]] [[area]].}}}
<section begin="layout" />
==Layout==
<section end="layout" />
<section begin="encounters" />
==Encounters==
===Boss===
===Boss video===
<section end="encounters" />
{{Map item drops
|page = {{subst:PAGENAME}} ({{Current map series}})
}}
{{Item acquisition
|page = {{subst:PAGENAME}} ({{Current map series}})
}}
{{Item unique versions
|base_item = {{subst:PAGENAME}} ({{Current map series}})
}}
%s
{{Navbox maps}}""" % history.group(0))