Commons:Convert tables and charts to wiki code
From Wikimedia Commons, the free media repository
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.
- meta:Help:Table#External links
- en:Wikipedia:Tools#Importing (converting) content from other formats to Wikipedia (MediaWiki) format
[edit] HTML to wiki code
Convert HTML (from web pages) to wiki code.
- Python wikipedia robot framework (pywikipediabot). It can convert HTML tables to wiki code. See also: wikiversity:Pywikipediabot.
- HTML WikiConverter. Convert HTML to wiki markup. Various versions and languages.
[edit] Online tools
- HTML to Wiki Converter - tables. From User:Magnus Manske. Hosted at uni-bonn.de site. Recommended.
- HTML tables to wiki converter. Hosted at cnic.org site.
- html2wiki - Convert HTML text to wiki markup. Hosted at diberri.dyndns.org site.
[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:
- PrimoPDF: [2].
- PdfEdit995: [3].
- wikipedia:List of PDF software.
- While viewing a PDF document with the free Adobe Reader one can select any area of it and then copy it from the edit menu. Then it can be pasted into any image editor and saved. For example; the freeware image editor, IrfanView.
[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.
- de:Wikipedia:Helferlein/VBA-Macro for EXCEL tableconversion. The page is in English. Published in German Wikipedia project.
[edit] Online tools
- CSV Converter (csv2wp) - converts many types of spreadsheet tables, comma-separated values (CSV), tab-separated values, etc. to wiki code or HTML. You can use this to convert tables from Excel and more.
- 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.