Probably depends on the terminal you're on, at least for the color option.
There is some way for a program to determine if the terminal it's
interacting with supports color or not, isn't there?
Scaling might have to be just ignored altogether for command-line.
nophead wrote
What would these do when run from the command line?
On Mon, 6 Jan 2020 at 18:27, Jordan Brown <
openscad@.maileater
>
wrote:
On 1/5/2020 11:02 PM, egburr wrote:
Too bad this:
color("red") echo("This should be red text.");
doesn't work. :)
Or
scale(1.1) echo("Big text");
--
Sent from: http://forum.openscad.org/
What happens on command-line with current "ERROR" and "WARNING" messages that
are currently colored/highlited in the OpenSCAD console? I'm guessing they
come out as just plain uncolored text?
nophead wrote
What would these do when run from the command line?
On Mon, 6 Jan 2020 at 18:27, Jordan Brown <
openscad@.maileater
>
wrote:
On 1/5/2020 11:02 PM, egburr wrote:
Too bad this:
color("red") echo("This should be red text.");
doesn't work. :)
Or
scale(1.1) echo("Big text");
--
Sent from: http://forum.openscad.org/
Yes they need to be plain text for my usage.
On Mon, 6 Jan 2020 at 18:44, egburr egburr@burr.cc wrote:
What happens on command-line with current "ERROR" and "WARNING" messages
that
are currently colored/highlited in the OpenSCAD console? I'm guessing they
come out as just plain uncolored text?
nophead wrote
What would these do when run from the command line?
On Mon, 6 Jan 2020 at 18:27, Jordan Brown <
openscad@.maileater
>
wrote:
On 1/5/2020 11:02 PM, egburr wrote:
Too bad this:
color("red") echo("This should be red text.");
doesn't work. :)
Or
scale(1.1) echo("Big text");
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 1/6/2020 10:30 AM, nop head wrote:
On Mon, 6 Jan 2020 at 18:27, Jordan Brown
<openscad@jordan.maileater.net mailto:openscad@jordan.maileater.net>
wrote:
On 1/5/2020 11:02 PM, egburr wrote:
Too bad this:
*color("red") echo("This should be red text.");*
doesn't work. :)
Or
scale(1.1) echo("Big text");
What would these do when run from the command line?
I guess it was unclear that I was 97% kidding.
Semi-seriously...
You could use ANSI x3.64 escape sequences for color. Addenda bring in
24-bit color support. However, I don't see any size support.
That would mess up any postprocessor, but you'd use the same strategy
that was used for (e.g.) ls and its color-coding of file types: have
OpenSCAD automatically disable colors if stdout isn't a terminal.
Tempting and cute as this scheme might be, I don't think you'd actually
want to have the same operators affecting your console output and your
geometry. Just because a particular component is scaled or colored
doesn't mean that you want its diagnostic output to be scaled or colored.
I also use some simple HTML formatting in my output window.
I have a rudimentary library that creates documentation for my other
libraries, so that I can quickly remind myself of function/module syntax
without loading up the library source directly.
I don't use colours as much but I do use text formatting - for example:
http://forum.openscad.org/file/t311/Screenshot_2020-01-11_at_16.png
Will this be lost?
--
Sent from: http://forum.openscad.org/
This is not a direct answer to your question, but some of my programs has a
switch to output either HTML-encoded text or plain text.
nophead wrote
What would these do when run from the command line?
$ Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), editor of choice: CudaText ( OpenSCAD lexer ); $ Tips ; $ Snippets
--
Sent from: http://forum.openscad.org/
So perhaps we need a variable to indicate command line mode.
On Sat, 18 Jan 2020, 18:31 runsun, runsun@gmail.com wrote:
This is not a direct answer to your question, but some of my programs has a
switch to output either HTML-encoded text or plain text.
nophead wrote
What would these do when run from the command line?
$ Runsun Pan, PhD $ libs: scadx , doctest , faces ( git ), offline doc (
git ), runscad.py ( 2 , git ), editor of choice: CudaText ( OpenSCAD lexer
); $ Tips ; $ Snippets
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
My use case for "HTML" output is to generate and output SVG (mainly in
generating nets from solids). I used to output this with angle brackets but
thanks to the change to interpret such characters as HTML which since they
are not and are all ignored, I've had to change to outputing < etc.
Of course, I would prefer to be able to output the SVG directly to a file
rather than the console :)
--
Sent from: http://forum.openscad.org/