Hello!
I thought it would be great to run the Rails autotest (url) from a TM window to turn the file paths with line and column numbers into clickable links. With a normal command it would be very easy but since this command is running all the time I was wondering if somebody know how to capture its ouput, parse it (convert links etc) and then write it to a html output window.
Thanks Martin
On Dec 14, 2006, at 11:03 AM, Martin Ström wrote:
Hello!
I thought it would be great to run the Rails autotest (url) from a TM window to turn the file paths with line and column numbers into clickable links. With a normal command it would be very easy but since this command is running all the time I was wondering if somebody know how to capture its ouput, parse it (convert links etc) and then write it to a html output window.
Thanks Martin
-- burnfield.com/martin
This is one of my biggest wishlist items. I did successfully create something that kindof almost worked, but it was just to crappy to really use.
I also made a command that will let you do stuff like "tail -f" in a command window, using ajaxiness and whatnot. But I forget how far I got with all that. Something like that could be used for autotest, i'm sure.
thomas Aylott — design42 — subtleGradient — CrazyEgg
Yes I remember the tail-script. Do you have the latest version somewhere?
On 12/14/06, thomas Aylott oblivious@subtlegradient.com wrote:
On Dec 14, 2006, at 11:03 AM, Martin Ström wrote:
Hello!
I thought it would be great to run the Rails autotest (url) from a TM window to turn the file paths with line and column numbers into clickable links. With a normal command it would be very easy but since this command is running all the time I was wondering if somebody know how to capture its ouput, parse it (convert links etc) and then write it to a html output window.
Thanks Martin
-- burnfield.com/martin This is one of my biggest wishlist items. I did successfully create something that kindof almost worked, but it was just to crappy to really use.
I also made a command that will let you do stuff like "tail -f" in a command window, using ajaxiness and whatnot. But I forget how far I got with all that. Something like that could be used for autotest, i'm sure.
thomas Aylott — design42 — subtleGradient — CrazyEgg
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
I've just committed an update to Support/lib/scriptmate.rb which will let you do just this.
Here is an example: (Set this as a command with "Input: None" and "Output: Show as HTML")
http://pastie.textmate.org/27909
- Alex
On Dec 14, 2006, at 9:27 AM, Martin Ström wrote:
Yes I remember the tail-script. Do you have the latest version somewhere?
On 12/14/06, thomas Aylott oblivious@subtlegradient.com wrote:
On Dec 14, 2006, at 11:03 AM, Martin Ström wrote:
Hello!
I thought it would be great to run the Rails autotest (url) from a TM window to turn the file paths with line and column numbers into clickable links. With a normal command it would be very easy but since this command is running all the time I was wondering if somebody know how to capture its ouput, parse it (convert links etc) and then write it to a html output window.
Thanks Martin
-- burnfield.com/martin This is one of my biggest wishlist items. I did successfully create something that kindof almost worked, but it was just to crappy to really use.
I also made a command that will let you do stuff like "tail -f" in a command window, using ajaxiness and whatnot. But I forget how far I got with all that. Something like that could be used for autotest, i'm sure.
thomas Aylott — design42 — subtleGradient — CrazyEgg
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- burnfield.com/martin
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
I love you!
thomas Aylott — design42 — subtleGradient — CrazyEgg
On Dec 15, 2006, at 5:08 PM, Alexander Ross wrote:
I've just committed an update to Support/lib/scriptmate.rb which will let you do just this.
Here is an example: (Set this as a command with "Input: None" and "Output: Show as HTML")
http://pastie.textmate.org/27909
- Alex
On Dec 14, 2006, at 9:27 AM, Martin Ström wrote:
Yes I remember the tail-script. Do you have the latest version somewhere?
On 12/14/06, thomas Aylott oblivious@subtlegradient.com wrote:
On Dec 14, 2006, at 11:03 AM, Martin Ström wrote:
Hello!
I thought it would be great to run the Rails autotest (url) from a TM window
Awsome, thanks!
On 12/15/06, Alexander Ross alex.j.ross@gmail.com wrote:
I've just committed an update to Support/lib/scriptmate.rb which will let you do just this.
Here is an example: (Set this as a command with "Input: None" and "Output: Show as HTML")
http://pastie.textmate.org/27909
- Alex
On Dec 14, 2006, at 9:27 AM, Martin Ström wrote:
Yes I remember the tail-script. Do you have the latest version somewhere?
On 12/14/06, thomas Aylott oblivious@subtlegradient.com wrote:
On Dec 14, 2006, at 11:03 AM, Martin Ström wrote:
Hello!
I thought it would be great to run the Rails autotest (url) from a TM window to turn the file paths with line and column numbers into clickable links. With a normal command it would be very easy but since this command is running all the time I was wondering if somebody know how to capture its ouput, parse it (convert links etc) and then write it to a html output window.
Thanks Martin
-- burnfield.com/martin This is one of my biggest wishlist items. I did successfully create something that kindof almost worked, but it was just to crappy to really use.
I also made a command that will let you do stuff like "tail -f" in a command window, using ajaxiness and whatnot. But I forget how far I got with all that. Something like that could be used for autotest, i'm sure.
thomas Aylott — design42 — subtleGradient — CrazyEgg
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- burnfield.com/martin
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Let me know how it goes!
- Alex
On 12/16/06, Martin Ström martinstromlists@gmail.com wrote:
Awsome, thanks!
On 12/15/06, Alexander Ross alex.j.ross@gmail.com wrote:
I've just committed an update to Support/lib/scriptmate.rb which will let you do just this.
Here is an example: (Set this as a command with "Input: None" and "Output: Show as HTML")
http://pastie.textmate.org/27909
- Alex
On Dec 14, 2006, at 9:27 AM, Martin Ström wrote:
Yes I remember the tail-script. Do you have the latest version somewhere?
On 12/14/06, thomas Aylott oblivious@subtlegradient.com wrote:
On Dec 14, 2006, at 11:03 AM, Martin Ström wrote:
Hello!
I thought it would be great to run the Rails autotest (url) from a TM window to turn the file paths with line and column numbers into clickable links. With a normal command it would be very easy but since this command is running all the time I was wondering if somebody know how to capture its ouput, parse it (convert links etc) and then write it to a html output window.
Thanks Martin
-- burnfield.com/martin This is one of my biggest wishlist items. I did successfully create something that kindof almost worked, but it was just to crappy to really use.
I also made a command that will let you do stuff like "tail -f" in a command window, using ajaxiness and whatnot. But I forget how far I got with all that. Something like that could be used for autotest, i'm sure.
thomas Aylott — design42 — subtleGradient — CrazyEgg
_ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- burnfield.com/martin
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
-- burnfield.com/martin
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Alex,
I've just committed an update to Support/lib/scriptmate.rb which will let you do just this.
I couldn't find this file on my HD, and I would even less know where to find the update. Can you give a few more details? TIA.
Alain
Here is an example: (Set this as a command with "Input: None" and "Output: Show as HTML") http://pastie.textmate.org/27909
Alain,
The latest version of $TM_SUPPORT_PATH/lib/scriptmate.rb is available from TextMate's svn repository. This page gives instructions on how to do that: http://macromates.com/wiki/Main/SubversionCheckout
Once you've got the latest version of TextMate's Bundles and Support path, you'll be able to use the example command[1] I mentioned before (or modify it to your purposes).
I hope this helps?
– Alex
[1]: http://pastie.textmate.org/27909
On Jan 19, 2007, at 9:07 AM, Alain Ravet wrote:
Alex,
I've just committed an update to Support/lib/scriptmate.rb which
will
let you do just this.
I couldn't find this file on my HD, and I would even less know where to find the update. Can you give a few more details? TIA.
Alain
Here is an example: (Set this as a command with "Input: None" and "Output: Show as HTML") http://pastie.textmate.org/27909
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Alex
I'm 2 steps further, but I still have a problem.
The latest version of $TM_SUPPORT_PATH/lib/scriptmate.rb is available from TextMate's svn repository.
OK. I installed it through the GetBundle bundle. A no-brainer.
Once you've got the latest version of TextMate's Bundles and Support path, you'll be able to use the example command[1] I mentioned before (or modify it to your purposes).
With your original command, I get a "permission denied" on the _console.log_ file access => I added "sudo" in front of the "tail" to solve that problem => now, when I launch your command, I see a TM window with the file contents. That's OK.
Remaining problem: how do I launch/get "autotest" to dump its contents in the console.log file? (as a simple "autotest > somefile.log" doesn't do it)
Alain
Alain,
You don't need to tail the console.log file to get the autotest output. Any string that you pass to UserCommand will be executed in the shell by CommandMate, and the output will be printed to the webpreview window. This ought to do it: http://pastie.textmate.org/ 34483.
– Alex
On Jan 20, 2007, at 9:06 AM, Alain Ravet wrote:
Alex
I'm 2 steps further, but I still have a problem.
The latest version of $TM_SUPPORT_PATH/lib/scriptmate.rb is
available
from TextMate's svn repository.
OK. I installed it through the GetBundle bundle. A no-brainer.
Once you've got the latest version of TextMate's Bundles and Support path, you'll be able to use the example command[1] I mentioned
before
(or modify it to your purposes).
With your original command, I get a "permission denied" on the _console.log_ file access => I added "sudo" in front of the "tail" to solve that problem => now, when I launch your command, I see a TM window with the file contents. That's OK.
Remaining problem: how do I launch/get "autotest" to dump its contents in the console.log file? (as a simple "autotest > somefile.log" doesn't do it)
Alain
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 1/19/07, Alexander Ross alex.j.ross@gmail.com wrote:
Alain,
The latest version of $TM_SUPPORT_PATH/lib/scriptmate.rb is available from TextMate's svn repository. This page gives instructions on how to do that: http://macromates.com/wiki/Main/SubversionCheckout
Once you've got the latest version of TextMate's Bundles and Support path, you'll be able to use the example command[1] I mentioned before (or modify it to your purposes).
I hope this helps?
– Alex
thanks for the post, it helped me get some of my commands going.
perhaps worth noting, the pastie above should probably use #!/usr/bin/env ruby rather than hardcoding the system defined no?
and also, scriptmate.rb should probably be a bit more cautious in its require statements or else $:. rather than: require 'escape' it could: require File.expand_path("../escape", __FILE__) or some variation therein, that way people can write their own scripts which require scriptmate and not be concerned with the include paths and what not.
cheers, jean-pierre
I've hit on a development methodology where when I want to modify one file on a server quickly, I make the changes to my local copy, then scp it to the remote machine. That saves me the overhead and security problems of having an (S)FTP server running on my production box. Which brings me to the question:
Is there some really easy way to build a command (or is there one already built) that will scp a file to a server relative to its location in a project? For example, if my DocumentRoot on the server is /var/www/myfinewebsite and I want to modify a file like includes/ stupid_php_why_isnt_this_rails.php on my local machine, I'd like it to scp to uname@mydomain.com:/var/www/myfinewebsite/includes.
Is this something someone else has done? Any thoughts about this practice?
Thanks,
Steve
You should be able to do this fairly simply. Assuming you're working within a project, you should be able to set up a project specific environmental variable that contains the remote path relative to the project. Then it's just a matter of constructing your command in the bundle editor.
-dave
On 2/7/07, s.ross cwdinfo@gmail.com wrote:
I've hit on a development methodology where when I want to modify one file on a server quickly, I make the changes to my local copy, then scp it to the remote machine. That saves me the overhead and security problems of having an (S)FTP server running on my production box. Which brings me to the question:
Is there some really easy way to build a command (or is there one already built) that will scp a file to a server relative to its location in a project? For example, if my DocumentRoot on the server is /var/www/myfinewebsite and I want to modify a file like includes/ stupid_php_why_isnt_this_rails.php on my local machine, I'd like it to scp to uname@mydomain.com:/var/www/myfinewebsite/includes.
Is this something someone else has done? Any thoughts about this practice?
Thanks,
Steve
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 2/7/07, s.ross cwdinfo@gmail.com wrote:
I've hit on a development methodology where when I want to modify one file on a server quickly, I make the changes to my local copy, then scp it to the remote machine. That saves me the overhead and security problems of having an (S)FTP server running on my production box. Which brings me to the question:
Is there some really easy way to build a command (or is there one already built) that will scp a file to a server relative to its location in a project? For example, if my DocumentRoot on the server is /var/www/myfinewebsite and I want to modify a file like includes/ stupid_php_why_isnt_this_rails.php on my local machine, I'd like it to scp to uname@mydomain.com:/var/www/myfinewebsite/includes.
Is this something someone else has done? Any thoughts about this practice?
Thanks,
Steve
So having something that intelligently deals with local to remote paths is probably the tricky party here. You probably don't want to type a remote path every time. This might be a good time to try out MacFUSE and sshfs. Mount your remote filesystem via ssh and edit files just like you would locally. Of course, you are then working with live files, so beware.
http://code.google.com/p/macfuse/
Pat
So having something that intelligently deals with local to remote paths is probably the tricky party here. You probably don't want to type a remote path every time. This might be a good time to try out MacFUSE and sshfs.
.. or subversion/cvs ... :-)
-steve
Well, I'd rather use Capistrano, but it's a big hammer for a one-file edit to a Smarty template (client says, "add 'now hiring' to the home page) in a PHP project. Given the great integration with sftp clients, I was kinda hoping this would be pretty easy.
On Feb 7, 2007, at 2:41 PM, Steve Lianoglou wrote:
So having something that intelligently deals with local to remote paths is probably the tricky party here. You probably don't want to type a remote path every time. This might be a good time to try out MacFUSE and sshfs.
.. or subversion/cvs ... :-)
-steve
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
if it's a single file, you can simply open the file directly on the server using something like cyberduck or transmit.
for cyberduck in preferences under the general tab, choose textmate from the edior pulldown. connect to your server. find the file and click the edit icon (should be the textmate icon). edit the file in textmate. when you save, it is automatically pushed back up.
-dave
On 2/7/07, s.ross cwdinfo@gmail.com wrote:
Well, I'd rather use Capistrano, but it's a big hammer for a one-file edit to a Smarty template (client says, "add 'now hiring' to the home page) in a PHP project. Given the great integration with sftp clients, I was kinda hoping this would be pretty easy.
On Feb 7, 2007, at 2:41 PM, Steve Lianoglou wrote:
So having something that intelligently deals with local to remote paths is probably the tricky party here. You probably don't want to type a remote path every time. This might be a good time to try out MacFUSE and sshfs.
.. or subversion/cvs ... :-)
-steve
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
I generally use rsync in these cases. I'm surprised no one's suggested it yet.
On Feb 7, 2007, at 6:12 PM, Dave Grijalva wrote:
if it's a single file, you can simply open the file directly on the server using something like cyberduck or transmit.
for cyberduck in preferences under the general tab, choose textmate from the edior pulldown. connect to your server. find the file and click the edit icon (should be the textmate icon). edit the file in textmate. when you save, it is automatically pushed back up.
-dave
On 2/7/07, s.ross cwdinfo@gmail.com wrote: Well, I'd rather use Capistrano, but it's a big hammer for a one-file edit to a Smarty template (client says, "add 'now hiring' to the home page) in a PHP project. Given the great integration with sftp clients, I was kinda hoping this would be pretty easy.
On Feb 7, 2007, at 2:41 PM, Steve Lianoglou wrote:
So having something that intelligently deals with local to remote paths is probably the tricky party here. You probably don't want to type a remote path every time. This might be a good time to try out MacFUSE and sshfs.
.. or subversion/cvs ... :-)
The way I started this thread was to remark that rsync was too big a hammer for so small a task. I've used rSync too, but often I want to make a surgical change, such as a quick fix to a phone number, without committing a whole build. I know it's crummy development practice, but my clients typically don't want to hear, "when v2.0 is done and tested, you'll have the right phone number in there :)"
See my most recent post on a way to use SCP from inside TM.
--steve
On Feb 7, 2007, at 8:00 PM, Jeremy Amos wrote:
I generally use rsync in these cases. I'm surprised no one's suggested it yet.
On Feb 7, 2007, at 6:12 PM, Dave Grijalva wrote:
if it's a single file, you can simply open the file directly on the server using something like cyberduck or transmit.
for cyberduck in preferences under the general tab, choose textmate from the edior pulldown. connect to your server. find the file and click the edit icon (should be the textmate icon). edit the file in textmate. when you save, it is automatically pushed back up.
-dave
On 2/7/07, s.ross cwdinfo@gmail.com wrote: Well, I'd rather use Capistrano, but it's a big hammer for a one-file edit to a Smarty template (client says, "add 'now hiring' to the home page) in a PHP project. Given the great integration with sftp clients, I was kinda hoping this would be pretty easy.
On Feb 7, 2007, at 2:41 PM, Steve Lianoglou wrote:
So having something that intelligently deals with local to remote paths is probably the tricky party here. You probably don't want to type a remote path every time. This might be a good time to try out MacFUSE and sshfs.
.. or subversion/cvs ... :-)
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 08/02/2007, at 5.04, s.ross wrote:
The way I started this thread was to remark that rsync was too big a hammer for so small a task. I've used rSync too, but often I want to make a surgical change, such as a quick fix to a phone number, without committing a whole build. I know it's crummy development practice, but my clients typically don't want to hear, "when v2.0 is done and tested, you'll have the right phone number in there :)"
I've created a bundle for this, it suports both rsync via ssh of a full directory as well as a single file via plain scp.
http://article.gmane.org/gmane.editors.textmate.general/15431
On 08/02/2007, at 10.12, David Jack Olrik wrote:
I've created a bundle for this, it suports both rsync via ssh of a full directory as well as a single file via plain scp.
http://article.gmane.org/gmane.editors.textmate.general/15431
It would seem the attatchment is missing from the gmane archive, so for those interested:
http://david.olrik.dk/files/ Synchronize_remote_directory__rsync_ssh_.zip
Here's another take on it. I created a new bundle called SCP and added the command below. It relies on 1) You having a project; and 2) Your having entered HOST_NAME, USER_ID, and ROOT_DIR in the project's environment variables. It also relies on shared-key access to the host so I don't have to send a password. Comments?
# ------------------------ #!/usr/bin/env ruby
class String def -(other_string) self.sub(other_string, '') end end
working_file = ENV['TM_FILEPATH'] - ENV['TM_PROJECT_DIRECTORY'] working_directory = working_file.gsub(//[^/]*$/, '')
puts "Working File: #{working_file}" puts "Working Directory: #{working_directory}"
scp_cmd = "scp #{ENV['TM_FILEPATH']} #{ENV['USER_ID']}@#{ENV ['HOST_NAME']}:#{File.join(ENV['ROOT_DIR'], working_directory)}"
system scp_cmd # ------------------------
On Feb 7, 2007, at 3:12 PM, Dave Grijalva wrote:
if it's a single file, you can simply open the file directly on the server using something like cyberduck or transmit.
for cyberduck in preferences under the general tab, choose textmate from the edior pulldown. connect to your server. find the file and click the edit icon (should be the textmate icon). edit the file in textmate. when you save, it is automatically pushed back up.
-dave
On 2/7/07, s.ross cwdinfo@gmail.com wrote: Well, I'd rather use Capistrano, but it's a big hammer for a one-file edit to a Smarty template (client says, "add 'now hiring' to the home page) in a PHP project. Given the great integration with sftp clients, I was kinda hoping this would be pretty easy.
On Feb 7, 2007, at 2:41 PM, Steve Lianoglou wrote:
So having something that intelligently deals with local to remote paths is probably the tricky party here. You probably don't want to type a remote path every time. This might be a good time to try out MacFUSE and sshfs.
.. or subversion/cvs ... :-)
-steve
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you
don't)
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate