Permalink
Browse files

Merge pull request #4 from mattlangtree/master

All the new good stuff!
  • Loading branch information...
2 parents 88db140 + 58b69ad commit cbd9d825d10ce18a42f8e4eddf6af9bc18183310 Sequel Pro committed Sep 4, 2012
View
@@ -0,0 +1,4 @@
+.DS_Store
+._*
+.Spotlight-V100
+.Trashes
View
@@ -0,0 +1,38 @@
+# Sequel Pro Bundles
+
+ * [Visit sequelpro.com/bundles][2]
+ * [Follow @sequelpro on Twitter][3]
+
+## About Sequel Pro Bundles
+Bundles are easy to write using your favourite scripting language and our [reference guide][4]. Have you written a fantastic Sequel Pro Bundle that you want to share? [Let us know][8] so that we can feature it on our website.
+
+### Contribute your own bundle
+Simply fork this repo and add any new modules to the __contributed__ folder. Apply any bug fixes to core modules directly to the existing module. In both cases, you would want to submit a pull request to the official repo [/sequelpro/Bundles][9].
+
+We will update the list of contributed bundles on our website as we get time. If you would prefer not to contribute using github you can share your bundle [however you like][8].
+
+![Image of Bundle Editor](http://www.sequelpro.com/w/images/6/67/New_Bundle_Editor_Screenshot.png "Image of Bundle Editor")
+
+## Latest Updates
+
+### August 2012
+ * We have broken the bundles up into Core and Contributed bundles.
+ * Integrated bundles from [voxpelli][6] and [liviutudor][7]. Thanks guys!
+
+### October 2011
+ * Integrated bundle from [andrewfulton][5], thanks!
+
+### June 2011
+ * Add core bundles.
+
+Contact [Sequel Pro][3] on Twitter with any questions.
+
+[1]: http://sequelpro.com/ "Sequel Pro"
+[2]: http://sequelpro.com/bundles "Sequel Pro Bundles"
+[3]: http://twitter.com/sequelpro "Sequel Pro on Twitter"
+[4]: http://www.sequelpro.com/bundles/reference "Bundles Documentation"
+[5]: https://github.com/andrewfulton "Andrew Fulton"
+[6]: https://github.com/voxpelli "Pelle Wessman"
+[7]: https://github.com/liviutudor "Liviu Tudor"
+[8]: http://sequelpro.com/bundles/share "Share your Bundle"
+[9]: https://github.com/sequelpro/Bundles "Sequel Pro Bundles on github"
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>author</key>
+ <string>Liviu Tudor</string>
+ <key>category</key>
+ <string>Copy</string>
+ <key>command</key>
+ <string>cat | perl -e '
+
+# read first line to get the column names (header)
+$firstLine = &lt;&gt;;
+
+# bail if nothing could read
+if(!defined($firstLine)) {
+ exit 0;
+}
+
+# store the column names
+chomp($firstLine);
+$firstLine =~ s/\"/\\\"/g; # escape "
+@header = split(/\t/, $firstLine);
+
+$h_cnt = $#header; # number of columns
+
+# get the column definitions
+open(META, $ENV{"SP_BUNDLE_INPUT_TABLE_METADATA"}) or die $!;
+@meta = ();
+while(&lt;META&gt;) {
+ chomp();
+ my @arr = split(/\t/);
+ push @meta, \@arr;
+}
+close(META);
+
+for($i=0; $i&lt;=$h_cnt; $i++) {
+ print "\"$header[$i]\"";
+ if( $i&lt;$h_cnt) {
+ print ";";
+ } else {
+ print "\n";
+ }
+}
+
+# read row data of each selected row
+$rowData=&lt;&gt;;
+while($rowData) {
+
+ # remove line ending
+ chomp($rowData);
+
+ # escape "
+ $rowData=~s/\"/\\\"/g;
+
+ # split column data which are tab-delimited
+ @data = split(/\t/, $rowData);
+ for($i=0; $i&lt;=$h_cnt; $i++) {
+ # re-escape \t and \n
+ $cellData = $data[$i];
+ $cellData =~ s/↵/\n/g;
+ $cellData =~ s/⇥/\t/g;
+
+ # check for data types
+ if($cellData eq "NULL") {
+ print "NULL";
+ } else {
+ chomp($cellData);
+ print "\"$cellData\"";
+ }
+ if($i&lt;$h_cnt) {
+ print ";";
+ } else {
+ print "\n";
+ }
+ }
+
+ # get next row
+ $rowData=&lt;&gt;;
+}
+
+print "\n";
+' | __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pbcopy</string>
+ <key>contact</key>
+ <string>yvivh.ghqbe@tznvy.pbz</string>
+ <key>description</key>
+ <string>Copies the selected rows to clipboard as CSV separating data by semi-colon</string>
+ <key>input</key>
+ <string>selectedtablerowsastab</string>
+ <key>keyEquivalent</key>
+ <string></string>
+ <key>name</key>
+ <string>Copy as CSV</string>
+ <key>output</key>
+ <string>none</string>
+ <key>scope</key>
+ <string>datatable</string>
+ <key>tooltip</key>
+ <string>Copy as CSV</string>
+ <key>trigger</key>
+ <string>none</string>
+ <key>uuid</key>
+ <string>E24C4537-0AAB-4C17-B5F9-C5054CADA77C</string>
+</dict>
+</plist>
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>author</key>
+ <string>Liviu Tudor</string>
+ <key>category</key>
+ <string>Copy</string>
+ <key>command</key>
+ <string>cat | perl -e '
+
+# read first line to get the column names (header)
+$firstLine = &lt;&gt;;
+
+# bail if nothing could read
+if(!defined($firstLine)) {
+ exit 0;
+}
+
+# store the column names
+chomp($firstLine);
+$firstLine =~ s/\"/\\\"/g; # escape "
+@header = split(/\t/, $firstLine);
+
+$h_cnt = $#header; # number of columns
+
+# get the column definitions
+open(META, $ENV{"SP_BUNDLE_INPUT_TABLE_METADATA"}) or die $!;
+@meta = ();
+while(&lt;META&gt;) {
+ chomp();
+ my @arr = split(/\t/);
+ push @meta, \@arr;
+}
+close(META);
+
+print "&lt;table border=\"1\" cellpadding=\"0\" cellspacing=\"0\"&gt;\n";
+print "&lt;tr&gt;";
+for($i=0; $i&lt;=$h_cnt; $i++) {
+ print "&lt;th&gt;$header[$i]&lt;/th&gt;";
+}
+print "&lt;/tr&gt;\n";
+
+# read row data of each selected row
+$rowData=&lt;&gt;;
+while($rowData) {
+
+ print "&lt;tr&gt;";
+
+ # remove line ending
+ chomp($rowData);
+
+ # escape "
+ $rowData=~s/\"/\\\"/g;
+
+ # split column data which are tab-delimited
+ @data = split(/\t/, $rowData);
+ for($i=0; $i&lt;=$h_cnt; $i++) {
+ # re-escape \t and \n
+ $cellData = $data[$i];
+ $cellData =~ s/↵/\n/g;
+ $cellData =~ s/⇥/\t/g;
+
+ print "&lt;td&gt;";
+ # check for data types
+ if($cellData eq "NULL") {
+ print "NULL";
+ } else {
+ chomp($cellData);
+ print "$cellData";
+ }
+ print "&lt;/td&gt;";
+ }
+
+ print "&lt;/tr&gt;\n";
+
+ # get next row
+ $rowData=&lt;&gt;;
+}
+
+print "&lt;/table&gt;\n";
+' | __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pbcopy</string>
+ <key>contact</key>
+ <string>yvivh.ghqbe@tznvy.pbz</string>
+ <key>description</key>
+ <string>Copies the selected rows to clipboard as html</string>
+ <key>input</key>
+ <string>selectedtablerowsastab</string>
+ <key>keyEquivalent</key>
+ <string></string>
+ <key>name</key>
+ <string>Copy as HTML</string>
+ <key>output</key>
+ <string>none</string>
+ <key>scope</key>
+ <string>datatable</string>
+ <key>tooltip</key>
+ <string>Copy as HTML</string>
+ <key>trigger</key>
+ <string>none</string>
+ <key>uuid</key>
+ <string>31FD6D95-CED5-4870-9A19-5A1396216C37</string>
+</dict>
+</plist>
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>author</key>
+ <string>Liviu Tudor</string>
+ <key>category</key>
+ <string>Copy</string>
+ <key>command</key>
+ <string>cat | perl -e '
+
+# read first line to get the column names (header)
+$firstLine = &lt;&gt;;
+
+# bail if nothing could read
+if(!defined($firstLine)) {
+ exit 0;
+}
+
+# store the column names
+chomp($firstLine);
+$firstLine =~ s/\"/\\\"/g; # escape "
+@header = split(/\t/, $firstLine);
+
+$h_cnt = $#header; # number of columns
+
+# get the column definitions
+open(META, $ENV{"SP_BUNDLE_INPUT_TABLE_METADATA"}) or die $!;
+@meta = ();
+while(&lt;META&gt;) {
+ chomp();
+ my @arr = split(/\t/);
+ push @meta, \@arr;
+}
+close(META);
+
+print "||";
+for($i=0; $i&lt;=$h_cnt; $i++) {
+ print " *$header[$i]* ||";
+}
+print "\n";
+
+# read row data of each selected row
+$rowData=&lt;&gt;;
+while($rowData) {
+
+ print "||";
+
+ # remove line ending
+ chomp($rowData);
+
+ # escape "
+ $rowData=~s/\"/\\\"/g;
+
+ # split column data which are tab-delimited
+ @data = split(/\t/, $rowData);
+ for($i=0; $i&lt;=$h_cnt; $i++) {
+ # re-escape \t and \n
+ $cellData = $data[$i];
+ $cellData =~ s/↵/\n/g;
+ $cellData =~ s/⇥/\t/g;
+
+ # check for data types
+ if($cellData eq "NULL") {
+ print " _NULL_ ";
+ } else {
+ chomp($cellData);
+ print " *$cellData* ";
+ }
+ print "||";
+ }
+
+ print "\n";
+
+ # get next row
+ $rowData=&lt;&gt;;
+}
+
+print "\n";
+' | __CF_USER_TEXT_ENCODING=$UID:0x8000100:0x8000100 pbcopy</string>
+ <key>contact</key>
+ <string>yvivh.ghqbe@tznvy.pbz</string>
+ <key>description</key>
+ <string>Copies the selected rows to clipboard as wiki table</string>
+ <key>input</key>
+ <string>selectedtablerowsastab</string>
+ <key>internalKeyEquivalent</key>
+ <dict>
+ <key>characters</key>
+ <string>C</string>
+ <key>keyCode</key>
+ <integer>8</integer>
+ <key>modifierFlags</key>
+ <integer>262144</integer>
+ </dict>
+ <key>keyEquivalent</key>
+ <string>^c</string>
+ <key>name</key>
+ <string>Copy as Wiki</string>
+ <key>output</key>
+ <string>none</string>
+ <key>scope</key>
+ <string>datatable</string>
+ <key>tooltip</key>
+ <string>Copy as Wiki</string>
+ <key>trigger</key>
+ <string>none</string>
+ <key>uuid</key>
+ <string>5B20D1B9-9C60-4D9F-B51B-5F742665557E</string>
+</dict>
+</plist>
Oops, something went wrong.

0 comments on commit cbd9d82

Please sign in to comment.