diff --git a/index.html b/index.html index 5fae5d8..b7cd10e 100644 --- a/index.html +++ b/index.html @@ -443,20 +443,22 @@ but this will cause an error:

This program is designed to work as a filter. It can read from standard input if the file name argument is "-", and it can (and does by default) output the result to standard output. Any errors and warnings go to standard error always, to not interfere with the script being output.

-

Running it by hand to optimize your scripts can be cumbersome. The intention is for it to act as a filter that is transparent to the user; however, as of this writing there's no support for any viewer or IDE, as it is still a young project. Run it without parameters to see the invocation help, for example with python main.py. Redirect the output to a file if you want to store the result, possibly to open it with an editor and copy it to the clipboard. Or under X Window, if you install the package xclip, you can pipe the output directly to xclip -quiet -selection clipboard to copy it to the clipboard, rather than using a file, so you can paste it into the viewer. Examples:

+

The input script should be encoded in UTF-8. If you're using an editor, make sure it saves with that encoding.

-
python main.py myscript.lsl | xclip -quiet -selection clipboard
+

Running it by hand to optimize your scripts can be cumbersome. The intention is for it to act as a filter that is transparent to the user; however, as of this writing there's no support for any viewer or IDE, as it is still a young project. Run it without parameters to see the invocation help, for example with python main.py. Redirect the output to a file if you want to store the result, possibly to open it with an editor and copy it to the clipboard. Or under X Window, if you install the package xclip, you can pipe the output directly to xclip -quiet -selection clipboard to copy it to the clipboard, rather than using a file, so you can paste it into the viewer. It's a good idea to use the option --bom to include a UTF-8 byte order mark that other applications can use to recognize the encoding. Examples:

+ +
python main.py --bom myscript.lsl | xclip -quiet -selection clipboard
 

will, under X Window, read myscript.lsl, optimize it, and copy the optimized result to the clipboard, ready to be pasted into the viewer.

-
python main.py myscript.lsl -o temp.opt
+
python main.py --bom myscript.lsl -o temp.opt
 notepad temp.opt
 

will, under any system which has an editor called notepad, read myscript.lsl, optimize it, and write the optimized result to temp.opt, then open it in the editor, enabling you to copy it and paste it into the viewer. Under Windows version Vista and above, there's a command line application called clip that does the same as xclip does for X Window, enabling you to use this:

-
python main.py myscript.lsl | clip
+
python main.py --bom myscript.lsl | clip
 

to copy the optimized output to the clipboard. Under OS X, pbcopy does the same as xclip and clip.