Community Central
Community Central
Forums: Index Support Requests Adding extensive icons?
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Archive
Note: This topic has been unedited for 86 days. It is considered archived - the discussion is over. Information in this thread may be out of date. Do not add to unless it really needs a response.


I would like to copy this documentation from my blog: http://civmodding.wordpress.com/vem/city-development-2

to my wiki: communitas.wikia.com/wiki/Gem_Cities

I want the new wiki documenation to look the same as the old website documentation. In visual text editors for websites & forums we can copy-paste and it looks like the original material. This works on a wiki until I click publish, at which point the icons disappear (I understand the reasons for that). After uploading the icons to my wiki, what would be the best way to copy them from website to wiki? The current solution I'm thinking of is listed below, but this solution will probably take several hours to get set up. Is there a better solution I'm overlooking?

  1. Copy the webpage source to text files.
  2. Create and run a windows sed script to find-replace the old wepabe-uploaded links with new wiki-uploaded links.
  3. Copy the source from the text files to the website source.
  4. Change the web editor from source to visual mode.
  5. Copy the visual page from website to wiki.

Thalassicus (talk) 01:40, July 25, 2012 (UTC)

I managed to get the sed solution to work. I use the script files below, with the website source I want to convert to wiki format in "replace.txt" in the same folder. I then double-click the FormatForWiki.bat file, and it produces the wiki-compatible source text I need. Hopefully this information will be helpful to others in the future.

FormatForWiki.bat

sed -f "FormatForWiki.sed" replace.txt > replace_new.txt


FormatForWiki.sed

s|<img[^>]*/food.png[^>]*>||g
s|<img[^>]*/production.png[^>]*>||g
s|<img[^>]*/gold.png[^>]*>|]|g
s|<img[^>]*/science.png[^>]*>||g
s|<img[^>]*/culture.png[^>]*>||g
s|<img[^>]*/faith.png[^>]*>||g
s|<img[^>]*/goldenage.png[^>]*>||g
s|<img[^>]*/happy.png[^>]*>||g
s|<img[^>]*/angry.png[^>]*>||g
s|<img[^>]*/greatperson.png[^>]*>||g
s|<img[^>]*/citizen.png[^>]*>||g
s|<img[^>]*/strength.png[^>]*>||g
s|<img[^>]*/rangedstrength.png[^>]*>||g
s|<img[^>]*/war.png[^>]*>||g
s|<img[^>]*/unhappy.png[^>]*>||g
s|<img[^>]*/moves.png[^>]*>||g
s|<img[^>]*/plus.png[^>]*>||g
s|<img[^>]*/minus.png[^>]*>||g
s|<img[^>]*/influence.png[^>]*>||g
s|<img[^>]*/puppet.png[^>]*>||g
s|<img[^>]*/razing.png[^>]*>||g
s|<img[^>]*/occupied.png[^>]*>||g
s|<img[^>]*/citystate.png[^>]*>||g
s|<img[^>]*/trade.png[^>]*>||g
s|<img[^>]*/capital.png[^>]*>||g

Thalassicus (talk) 04:12, July 25, 2012 (UTC)