Commons:Convert tables and charts to wiki code

From Wikimedia Commons, the free media repository

Jump to: navigation, search

Contents


Here are some tools, resources, tips, and instructions for converting tables and charts to wiki code. Most of the tools and resources are free.

[edit] HTML to wiki code

Convert HTML (from web pages) to wiki code.

[edit] Online tools

[edit] Conversion examples

[edit] List of countries by incarceration rate

See the long table at en:List of countries by incarceration rate. It has over 200 rows. The online uni-bonn.de converter by Magnus Manske was used to convert the HTML table found here: [1].

View the HTML code for the source table by clicking the source command found in one of the menus of your browser. Then copy only the table HTML, and paste it into the "HTML markup" form of the online converter. The table HTML starts with <table and ends with </table>.

Click "convert" at the bottom of the converter page. It converts the table HTML to wiki code. The wiki code needs to be cleaned up further.

To do so copy the wiki code into a blank page of a good free text editor such as NoteTab Light. Then click the replace command from the search menu of NoteTab. It pulls up the find-and-replace form. It can be used to quickly find and remove any remaining HTML. The fastest way is to put a checkmark in the regular expression checkbox, and then remove everything between HTML tag brackets: <> ... To do that paste this regular expression

\<.*?>

in the "find what" line. Leave the "replace with" line empty. Click "replace all." This instantly removes nearly all HTML code. Do some additional manual cleaning to get rid of the rest. Also, fix any text laddering. Edit the column headers as necessary, and make the rank and country columns sortable. See meta:Help:Table and the current table wikicode at en:List of countries by incarceration rate.

An additional column for notes is instantly added by doing a regular find-and-replace (uncheck the regular expression box).

Replace

^p|-
with
^p|^p|-

^p is a text editor code for line breaks.

[edit] PDF to wiki code or image files

Convert PDF charts, graphs, diagrams, and illustrations to image files or to HTML. For example; the many free illustrations in public-domain PDF documents from the U.S. federal government. See Upload work from a government source. Some free tools:

[edit] CSV, DSV, and Excel to wiki code

Convert Excel, comma-separated values (CSV), tab-separated values, delimiter-separated values (DSV), etc. to table wiki code.

[edit] Online tools

More info in English: de:Benutzer:Duesentrieb/csv2wp_(en)

[edit] Microsoft Word to wiki code

Microsoft Word converters. See:

[edit] OpenOffice.org to wiki code

OpenOffice 2.3 can export to wiki code.