Copying Table from Numbers into a Wiki

Quick and Dirty in the IRB

I want to convert a table from Numbers into a Wiki:

Left: Numbers.app. Right: PukiWiki.

When copying cells from Numbers, you get a tab-separated value format.

And the table syntax in the Wiki looks like this:

Paste ‘em Into IRB

So, I fired up IRB, copied the table from Numbers and pasted it through the use of pbpaste command.

Process ‘em

Then I split them by line.

Looks good so far. Go ahead and turn each line into the Wiki syntax.

Copy ‘em!

Looks great. Let’s copy it by piping the result into pbcopy.

It’s in my pasteboard now. I can now copy into the wiki.

Stories about how coding can be applied to solve everyday…

Code, Applied to Life
Thai Pangsakulyanont

Written by

(@dtinth) A software engineer and frontend enthusiast. A Christian. A JavaScript musician. A Ruby and Vim lover.

Code, Applied to Life

Stories about how coding can be applied to solve everyday life problems. (Formerly Ruby Everyday).