Sequel Pro Bundles: Copy As HTML, Copy As Wiki Table, Copy as CSV

2011 08 16 11.33.03 am Sequel Pro Bundles: Copy As HTML, Copy As Wiki Table, Copy as CSV photo    technology news blogroll  sql Sequel Pro Redmine plugin mysql mac os x mac os Mac LinkedIn json bundle Some of you might know that I’ve moved to Mac recently (no comment!) — as such I had to ditch the HeidiSQL client for MySQL (booo! why does it only run on Windows????) and had to figure out another handy MySQL client which works on Mac OS X. You can of course use the MySQL Workbench but I found it clunky and not that helpful to be honest. So digging around I found this open source (hence free) client called Sequel Pro: http://www.sequelpro.com . I have to admit it doesn’t yet rival with HeidiSQL but like all the open-source projects, they had to start somewhere so a bit of patience is required.

One of the good things I found about it, is it offers a plugin framework (bundles) which allows you to write your own bundles — and even better, these can be written in Bash script, or, any other scripting language you can shebang from bash. Now that I found to be cool because I don’t want to learn a new scripting/programming language for each product which allows me to write my own plugins.

In Cognitive Match we use Redmine internally as our task tracking system, and when dealing with production investigation, I found myself quite often having to copy and paste rows of data from MySQL into Redmine — either so data can be investigated/approved by colleagues, or simply as an effective way of “saving to stack” row ID’s, campaign settings etc. (saves me running the same SELECT over and over again every time I need to check a campaign flag for instance). Redmine supports wiki text — and this is where HeidiSQL came in handy as you could select a few rows of data and it allowed you to copy that to clipboard as wiki text/table so you could then just paste it into Redmine and have the data formatted and therefore easy to read. Unfortunately Sequel Pro doesn’t support that, however, as I said, it offers the possibility of writing your own “bundle” (effectively a plugin).

I’m not the best bash‘er in the world, but since Sequel Pro came already with a bundle which allows you to copy rows as JSON (“Copy as JSON” from the Bundles -> Copy menu), I thought I’d adapt that to allow me to copy text to clipboard as wiki as well. And before I knew it, I ended up with these 3 bundles: one which copies tows to clipboard as wiki (in the same format as HeidiSQL does), one which copies the rows as HTML table and one which copies the rows as CSV. As I said before, all of these are straight copies of the HeidiSQL functionality — so if you’ve been a HeidiSQL user in the past, you might appreciate these.

Below you will find the links to the 3 bundles — as I understand talking to the Sequel Pro developers, you just need to bunzip/untar these folders and then simply double-click on the folder itself and Sequel Pro will install the bundle locally for you. However, if this doesn’t work, have a read of the Sequel Pro Bundles framework here : http://www.sequelpro.com/bundles/reference/ as it explains how bundles are used by the framework.

Now, as I said, the above bundles are adaptation of the original “Copy as JSON” bundle that ships with Sequel Pro — my bash and perl are not the best so if you find any problems with these I would appreciate if you notify me and/or the Sequel Pro developers (I’ve sent an email to them already and hoping to get these into a future release). To get in touch with me, add a comment to this post with your email (don’t worry, it doesn’t get published so you won’t get spammed) or find more ways of getting in touch with me on my about.me page (e.g. Tweet me, contact me on LinkedIn etc).

Hope these bundles help a few others and not just me icon smile Sequel Pro Bundles: Copy As HTML, Copy As Wiki Table, Copy as CSV photo    technology news blogroll  sql Sequel Pro Redmine plugin mysql mac os x mac os Mac LinkedIn json bundle

Update as of Monday, 3rd of September 2012:

I have just received this email from Matt (see below) which suggests that my patches have been integrated into the main code for Sequel Pro, so expect any releases after this date to include these:

Hi Liviu,

I’m sorry it took almost a year to get this integrated!

We hadn’t really thought how we wanted to accept contributions until now. I have restructured the way we do bundles a little, so please take a look at that if you want to make any changes to your bundle. (https://github.com/sequelpro/Bundles).

In the meantime I have merged your 3 new bundles in here: https://github.com/sequelpro/Bundles/tree/master/contributed .

Thanks again for submitting these.

Matt

In fact, if you download a newer version with these integrated in, I would really appreciate it if you drop me a line about it!

Tags: , , , , , , , , , ,

5 Responses to "Sequel Pro Bundles: Copy As HTML, Copy As Wiki Table, Copy as CSV"

Leave a Comment