so while editing a Qooxdoo playground script in my vim I just write
:!perl playground.pl %
and suddenly it starts firefox on the playground loading the script
On 8/19/10, b a wrote:
> pretty cool, Thanks !
>
> now I can write in my favourite editor and run the perl script so that
> it will be s
pretty cool, Thanks !
now I can write in my favourite editor and run the perl script so that
it will be shown in Firefox
On 8/19/10, Daniel Wagner wrote:
> Right, you actually need to encode your Javascript first, add the JSON
> window dressing, then encode the whole shebang again:
>
> my $code
Right, you actually need to encode your Javascript first, add the JSON
window dressing, then encode the whole shebang again:
my $code = slurp($ARGV[0]);
$code =uri_escape_utf8($code,"^A-Za-z");
$code = "{\"code\": \"$code\" }";
$code =uri_escape_utf8($code,"^A-Za-z");
That did it for me.
Regar
So I tried the following Perl code to do what you said, didn't work
out very well :(
I see that the slashes are %252F and spaces are encoded as being
%2520 instead of %20,
I tried to use uri_escape_utf8 for that, or tried a regex, neither of
which worked..
use strict;
use warnings;
use URI::Esca
Don't know much about vi, but maybe you can get it to load a Playground
URI with the code attached in the browser. The format is this:
{ "code": "// your code here" }
URIencode this and then load like so:
http://demo.qooxdoo.org/devel/playground/index.html#%7B%22code%22%3A%20%22%252F%252Fyour%2
Is there a way that I could edit my code with vim and then try it in
the playground ? I want to automate this somehow from the console..
--
This SF.net email is sponsored by
Make an app they can't live without
Enter the