I'm semi-new to the whole textmate thing and loving the bundles, however i seem to have had a cracking idea which could speed up our company's development no-end.
What i plan on doing is coding a script in preference this would sit somewhere on our server so it could be easily globally updated. This script would ask a few questions and then generate a zip file or a new folder in the repository, not sure which yet. The wish then is to take these files and plonk them into a project. Now im pretty sure the way to do this would be to pass back to the script that opened the browser window some sort of reference. Do you guys (and girls) know of a way to either a) post something back into a script after a window has opened or find out the url of a web window when it closes?
Many thanks. Lawrence
On 20. Apr 2007, at 20:37, Lawrence Curtis wrote:
[...] What i plan on doing is coding a script in preference this would sit somewhere on our server so it could be easily globally updated. This script would ask a few questions and then generate a zip file or a new folder in the repository, not sure which yet. The wish then is to take these files and plonk them into a project. Now im pretty sure the way to do this would be to pass back to the script that opened the browser window some sort of reference. Do you guys (and girls) know of a way to either a) post something back into a script after a window has opened or find out the url of a web window when it closes?
So if I understand correctly, user on machine A loads a web page, on the web page he answers some questions, and on a server, a package is generated.
Now you want machine A to fetch this package from the server? But you do not want to just do it as a regular download initiated from the browser?
How is the web page reached in the first place? Using a normal browser or is this from a TextMate command with HTML output?
This was my intention yes, so a command could be run within textmate with HTML, a few tick-boxes later a few files custom generated files could be inserted into a project, my only reason for taking this route really was that we (our development team) are php developers and we want to maintain some sort of interface as often as we want centrally to generate these files.
If you can think of a better way of running a central script that does this it would be greatly appreciated, the script will be just a php script that does things like generate a site skeleton with 2 or 3 column layout customising the css file to only show the bits you need etc.
Although i could just fire open a browser window go to the url and then download the package, extract the files into the project this strikes me as rather clunky and i know some of the staff will have issues with it. However if there is some way of just grabbing a remote file straight into a project that could be one answer as i was thinking that i could setup a text based config, post that over and have the script parser that and then send them back some files into the project, however it would be a lot lot cooler if it were possible to fire open a command in HTML output and then have that after its run continue through the textmate command so i can extract or svn co the contents.
Thanks for your time and i'd also like to add that textmate has been the cornerstone in converting a completely windows powered dev team to 100% mac.
On 20 Apr 2007, at 21:52, Allan Odgaard wrote:
On 20. Apr 2007, at 20:37, Lawrence Curtis wrote:
[...] What i plan on doing is coding a script in preference this would sit somewhere on our server so it could be easily globally updated. This script would ask a few questions and then generate a zip file or a new folder in the repository, not sure which yet. The wish then is to take these files and plonk them into a project. Now im pretty sure the way to do this would be to pass back to the script that opened the browser window some sort of reference. Do you guys (and girls) know of a way to either a) post something back into a script after a window has opened or find out the url of a web window when it closes?
So if I understand correctly, user on machine A loads a web page, on the web page he answers some questions, and on a server, a package is generated.
Now you want machine A to fetch this package from the server? But you do not want to just do it as a regular download initiated from the browser?
How is the web page reached in the first place? Using a normal browser or is this from a TextMate command with HTML output?
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 Apr 20, 2007, at 5:03 PM, Lawrence Curtis wrote:
However if there is some way of just grabbing a remote file straight into a project
TextMate HTML output windows are capable of running shell command on your machine through javascript. If you have a url with files to download, you can use javascript to call a shell script on the TextMate users machine that will download the file and load them up in TextMate and do whatever else you want.
You could even have the script recreated each time you view that page via the same technique so you'd have the whole thing centralized and auto-updating.
that's a really cool idea you have there, do share your results if you can.
thomas Aylott — subtleGradient — CrazyEgg — sixteenColors
I will, if it works ill not just keep it internal but release it to the world, i find myself in a constant battle against developers especially in my team to keep the straight and narrow, being a standards zealot i find myself constantly screaming at people for not doing things the right way or simply copying bits from one website or anouther. Infact it drives me mad the way that people feel the need to rewrite the xhtml and basic css each time as i know they've done it before let alone myself, this is the case when it comes to news engines and all sorts of ecommerce apps that we write.
The idea is that they start a project and run this baby and it starts spitting out a site skeleton with some basic set of tick boxes of requirements, i figured it wont take me long to write a modular script that can pull in bits and bobs of script to mashup together a basic site so thats the plan. I was thinking when its all done to release it to the world in a sort of php/textmate developers guide to heaven. So people can publish there modules and people can simply use them as bits to slot in. I know this isn't the place to gather interest but none-the-less it seems the place to have a good rant.
Anyway....
Rather than just tell me the syntax if you could point me along to the js file that the object is based on or the docs or if failing that just tell me the command, that be great!
Thanks lots!
On 20 Apr 2007, at 22:09, Thomas Aylott (subtleGradient) wrote:
On Apr 20, 2007, at 5:03 PM, Lawrence Curtis wrote:
However if there is some way of just grabbing a remote file straight into a project
TextMate HTML output windows are capable of running shell command on your machine through javascript. If you have a url with files to download, you can use javascript to call a shell script on the TextMate users machine that will download the file and load them up in TextMate and do whatever else you want.
You could even have the script recreated each time you view that page via the same technique so you'd have the whole thing centralized and auto-updating.
that's a really cool idea you have there, do share your results if you can.
thomas Aylott — subtleGradient — CrazyEgg — sixteenColors
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 20. Apr 2007, at 23:22, Lawrence Curtis wrote:
[...] Rather than just tell me the syntax if you could point me along to the js file that the object is based on or the docs or if failing that just tell me the command, that be great!
The function is TextMate.system(shell_cmd, handler) -- but there is a caveat, this does *not* work for files retrieved over http (for security reasons). For more info see http://macromates.com/textmate/ manual/commands#html_output
So this complicates things, i.e. the TextMate command would need to curl the page from the server, and cat that to stdout, so that it can stay on the internal TM url scheme, where shell commands can be executed.
How feasible this is, depends on how complex the customization page (s) are. I.e. if it’s just a single page, it should not be a problem nor add any real complexity, as the command would simply be:
curl -s «your server page»
Thank you very much :)
Ill let you know how i get on.
On 21 Apr 2007, at 14:00, Allan Odgaard wrote:
On 20. Apr 2007, at 23:22, Lawrence Curtis wrote:
[...] Rather than just tell me the syntax if you could point me along to the js file that the object is based on or the docs or if failing that just tell me the command, that be great!
The function is TextMate.system(shell_cmd, handler) -- but there is a caveat, this does *not* work for files retrieved over http (for security reasons). For more info see http://macromates.com/textmate/ manual/commands#html_output
So this complicates things, i.e. the TextMate command would need to curl the page from the server, and cat that to stdout, so that it can stay on the internal TM url scheme, where shell commands can be executed.
How feasible this is, depends on how complex the customization page (s) are. I.e. if it’s just a single page, it should not be a problem nor add any real complexity, as the command would simply be:
curl -s «your server page»
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
Problem im having is that i need to post to and from a page, now i can include that content with an iframe and fire js from the parent and that seems to be working ok, however there any chance of somehow setting a list of domains or in my case a domain that textmate will talk to using that method? Would allow me then to slap lots of nice features all over my intranet. Just a thought. =)
On 21 Apr 2007, at 14:00, Allan Odgaard wrote:
On 20. Apr 2007, at 23:22, Lawrence Curtis wrote:
[...] Rather than just tell me the syntax if you could point me along to the js file that the object is based on or the docs or if failing that just tell me the command, that be great!
The function is TextMate.system(shell_cmd, handler) -- but there is a caveat, this does *not* work for files retrieved over http (for security reasons). For more info see http://macromates.com/textmate/ manual/commands#html_output
So this complicates things, i.e. the TextMate command would need to curl the page from the server, and cat that to stdout, so that it can stay on the internal TM url scheme, where shell commands can be executed.
How feasible this is, depends on how complex the customization page (s) are. I.e. if it’s just a single page, it should not be a problem nor add any real complexity, as the command would simply be:
curl -s «your server page»
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 21. Apr 2007, at 17:17, Lawrence Curtis wrote:
Problem im having is that i need to post to and from a page, now i can include that content with an iframe and fire js from the parent and that seems to be working ok, however there any chance of somehow setting a list of domains or in my case a domain that textmate will talk to using that method? Would allow me then to slap lots of nice features all over my intranet. Just a thought. =)
Currently no way to open up for shell execution on white-listed sites.
Since you are ready to do per-machine configuration (as a white-list would require) you could in practice install a program on the users machine, to allow this shell execution from your site (granted, you’d have to write a minimal custom URL scheme handler, but effectively this is no more complex than have me write white-list handling for TextMate’s scheme ;) ).
This is very true however i can't code c, so it might be a lot harder than i think, thanks for the pointer anyway.
On 22 Apr 2007, at 11:17, Allan Odgaard wrote:
On 21. Apr 2007, at 17:17, Lawrence Curtis wrote:
Problem im having is that i need to post to and from a page, now i can include that content with an iframe and fire js from the parent and that seems to be working ok, however there any chance of somehow setting a list of domains or in my case a domain that textmate will talk to using that method? Would allow me then to slap lots of nice features all over my intranet. Just a thought. =)
Currently no way to open up for shell execution on white-listed sites.
Since you are ready to do per-machine configuration (as a white- list would require) you could in practice install a program on the users machine, to allow this shell execution from your site (granted, you’d have to write a minimal custom URL scheme handler, but effectively this is no more complex than have me write white- list handling for TextMate’s scheme ;) ).
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