7

A MediaWiki wiki table looks like this:

{|
|a1
|b1
|-
|a2
|b2
|-
|a3
|b3
|}

It renders as:

a1    b1
a2    b2
a3    b3

Wikipedia editors often need to reorder columns (for instance alphabetically), because of renamings or when translating to a new language. Reordering is very error-prone, especially in tables with 15+ columns and 100+ lines.

QUESTION: Is there a tool that could reorder columns painlessly?

Requirements

  • Open Source
  • UI, script, command line, anything is OK
  • Any OS is OK
  • Not supporting the whole specification is OK, just the format seen in the example above is OK
2

There was no such software, so I created one, as open source (GPLv3):

https://github.com/nicolas-raoul/reorder-wikitable-columns

It is very user-unfriendly:

  • bash script
  • you have to edit code to specify what order you want
  • no error handling

... so any other answer is very welcome!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.