More actions
Python code for removing template:icon |
m Put the code inside <pre> tags to get rid of a "wanted" template. |
||
| (One intermediate revision by one other user not shown) | |||
| Line 2: | Line 2: | ||
# This python file removes template:icon from a page and replaces it with direct image links. | # This python file removes template:icon from a page and replaces it with direct image links. | ||
# Code is not formatted for wiki. Edit page and copy it from there. | |||
# Paste the article contents to "input.txt" and the processed article will be saved into "output.txt" | # Paste the article contents to "input.txt" and the processed article will be saved into "output.txt" | ||
<pre> | |||
trimmed_template = ",rr,remote armor,remote armor rep,remote armor reps,remote armor repair,remote armor repairs,remote armor repairer,remote armor repairers,remote armour,remote armour rep,remote armour reps,remote armour repair,remote armour repairs,=icon_remote_armor_repair_i.png\n\ | trimmed_template = ",rr,remote armor,remote armor rep,remote armor reps,remote armor repair,remote armor repairs,remote armor repairer,remote armor repairers,remote armour,remote armour rep,remote armour reps,remote armour repair,remote armour repairs,=icon_remote_armor_repair_i.png\n\ | ||
,remote shield booster,remote shield boosters,st,shield transfer,shield transfers,shield transporter,shield transporters,=icon_shield_transporter_i.png\n\ | ,remote shield booster,remote shield boosters,st,shield transfer,shield transfers,shield transporter,shield transporters,=icon_shield_transporter_i.png\n\ | ||
| Line 520: | Line 521: | ||
do_the_thing() | do_the_thing() | ||
</pre> | |||