I have written several new stages for my own use that I now propose for inclusion with the NetRexx package. The primary one is DISPLAY which acts as CONSOLE for output, but goes to a web browser. This permits all the nasty things one can display there: different fonts, colors, tables, etc. that can not be seen in terminal. Here are some test pipes:
Which displays:
Another:
Which displays:
Another:
Which displays: <span style='color:red'>test</span> of color This is the help section of my file, currently:
The heart of this stage, after processing the options into the variables tag and fname is this:
To support the DISPLAY stage, I also have a new stage TAG:
And to complement this, for when multiple tags might be needed, is TAGS:
I would like ANY comments or ideas on these stages and on including them in the distribution. Thank you. Jeff
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
I like it but have not tested.
My only comment. You can read the template from anywhere but written output goes to /tmp directory. _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jeff Hennick-3
Hi Jeff,
Seems very useful - let’s add it.
René. On 22 Nov 2020, at 18:26, Jeff Hennick <[hidden email]> wrote:
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
René, Thanks. I am still working on it, but will add when ready....
René, Thanks. I am still working on it, but will add when ready. Thanks to Jason Martin's feedback, I am now using the Tmp directory:
And have added a TITLE option:
All is working in my test system now. Another stage I am working on to complement this is ROW
to convert records -- as from SQLSELECT -- to HTML TABLE
rows This can be done in the SQL SELECT statement, but sometimes we have just the raw data rows. The various optional delimitedStrings are for style or class data to be added to the TR, TD, and TH tags, again while CSS selectors can do this job, sometimes it is nice to be able to get right in the tag. Jeff On 11/23/2020 1:09 PM,
[hidden email] wrote:
Hi Jeff, _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jeff Hennick-3
On 2020-11-22 11:24:50 Jeff Hennick wrote:
> I have written several new stages for my own use that I now propose for > inclusion with the NetRexx package. The primary one is DISPLAY which acts > as CONSOLE for output, but goes to a web browser. This permits all the > nasty things one can display there: different fonts, colors, tables, etc. > that can not be seen in terminal. Here are some test pipes: > pipe (ct1) literal <span style='color:red'>test</span> of color | > display > > Which displays: > test of color > > Another: > pipe (ct1) literal <span style='color:red'>test</span> of color | > display kind html /style='font-weight:bold'/ > > Which displays: > test of color > Another: > pipe (ct1) literal <span style='color:red'>test</span> of color | > display kind notag /style='font-weight:bold'/ > > Which displays: > <span style='color:red'>test</span> of color > > This is the help section of my file, currently: > /** display > > >>--DISPLAY--+----------------------------------------+--+---------------- > >>-----------+--> > > | +-KIND-+ +-TEXT--+ | | +-.-+ > +-html---+ | +-+------+--+-------+--+-----------------+ > +-FILETYPE-+---+-+-string-+-+ +-PRE---+ +-delimitedString-+ > +-HTML--+ > +-TABLE-+ > +-NOTAG-+ > +-NONE--+ > > >--+------------------------+-->< > > | +-PipeDisp--+ | > +-FILENAME-+-----------+-+ > +-QString---+ > > DISPLAY works similar to and as a replacement for CONSOLE for output. > But instead of going to the terminal window, it goes to a HTML file > browser tab. This allows for HTML+CSS tags to control fonts, colors, > and layout. > > To work, these are required outside Pipelines: > - A working HTML browser program > - The operating system to associate the filetype "html" with the browser, > so the Pipelines stage "COMMAND PipeDisp.html" does call the browser and > display the file. > > The DISPLAY stage overwrites the named file, by default PipeDisp.html in > the working directory, then calls the COMMAND stage to display it. > > The KIND option causes the data to be surrounded by html tags. > - The default TEXT or PRE puts on <pre> and </pre>. Most browsers use: > = Fixed width font > = Display all the white spaces: line feeds and multiple spaces > - HTML uses <html> and </html>. Most browsers use: > = Variable width font > = Consolidate strings of white space into a singe space > = All the HTML tags > - TABLE uses <table> and </table> > = Expects the data records to begin with <tr><td> (or <tr><th>) > - NOTAG uses <pre> & </pre>, but first converts all & characters to the > entity & and < characters to < so HTML tags are not processed. > - NONE uses no extra tags. Most browsers use: > = HTML display > > The optional delimitedString is included in the opening tag for the KIND > option. Use non-alphanumeric delimiters to avoid problems with the > following options. > > FILETYPE may be used to change the default "html". This permits use of > other types that MAY be preprocessed if the system, external to Pipelines, > is set up to recognize it, for example, "JSP" or "PHP". > > FILENAME may be used to write and display another file. QString: It is > optional to enclose the name in quotes, but quotes are required if the name > includes spaces. A relative path is based on the working directory. > > Records from the primary input stream are also put out on the primary > output stream, if connected. > */ > > The heart of this stage, after processing the options into the variables > tag and fname is this: callpipe (display_stage debug 0 ) > > *in0: | > fo: fanout | > tag {tag} | > > {fname} ? > cmd {fname} | > fo: | > *out0: > > To support the DISPLAY stage, I also have a new stage TAG: > /** tag > > >>--TAG----string---------------------->< > > Outputs a record: <tag string>, then passes through all records > on its primary input, and finally a record: </tag>. > String may be empty. > > */ > > And to complement this, for when multiple tags might be needed, is TAGS: > /** tags > > >>--TAGS----delimitedString--+----------------------+--->< > > | v-----------------+ | > +--+-delimitedString-+-+ > > Outputs a record for each delimitedString: <delimitedString>, then passes > through all records on its primary input, and finally a record for each, in > reverse order: </first_word_of_delimitedString>. Any delimitedString may be > a single word. > > */ > > I would like ANY comments or ideas on these stages and on including them > in the distribution. Thank you. Jeff Will it follow references to external stylesheets to get its metadata? Imbedding styles is something to be avoided. Leslie -- _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jeff Hennick-3
Thank you,
OpenBSD 6.8 Firefox by default now is limited to ~/Download or /tmp for local urls. You can unset that if needed. _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by jlturriff
Leslie, Thank you for your comment and question. It will display...
Leslie, Thank you for your comment and question. It will display what comes in its input stream, only. Except adding the requested enclosing tags, <pre>, <html>, <table>, or none. It is not designed to make a full, "official," page with <head>, <style>, <script>, etc. That info could be added by prior stages, if needed. (A stage could be written that accepts the data and formats it into a <head> section.) This is conceived as an alternative to "plain CONSOLE" output. For your direct question, it is the browser that would follow any embedded references. (I agree with you on external stylesheets when re-use or
re-purposing is a consideration. For one-off personal uses, I
have no problem with inline. But that is only my opinion.) Hope that helps. Jeff On 11/23/2020 3:02 PM, J Leslie Turriff
wrote:
On 2020-11-22 11:24:50 Jeff Hennick wrote:I would like ANY comments or ideas on these stages and on including them in the distribution. Thank you. JeffWill it follow references to external stylesheets to get its metadata? Imbedding styles is something to be avoided. Leslie _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by Jason Martin
Wow! That leaves out using HTML for system/program/app documentation. And off hand, I can't think of how it makes a safer system to not be able to read files in other directories. But, with your previous prompt, I am now using, as default, the Java defined temp directory, which is likely /tmp . Thanks for the information. Jeff On 11/23/2020 3:05 PM, Jason Martin
wrote:
Thank you, _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
In reply to this post by jlturriff
Leslie, I may have misread your question, or now have widened my thinking on it. I like the idea of adding a STYLE styles.css option that would generate a statement like <link rel="stylesheet" href="styles.css"> . This way the user can have their own preferences as "standard." Thanks! Jeff On 11/23/2020 3:02 PM, J Leslie Turriff
wrote:
Will it follow references to external stylesheets to get its metadata?Imbedding styles is something to be avoided. Leslie _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
On 2020-11-23 15:05:41 Jeff Hennick wrote:
> This Message Is From an External Sender > This message came from outside your organization. > Leslie, > I may have misread your question, or now have widened my thinking on it. > I like the idea of adding a STYLE styles.css option that would generate a > statement like <link rel="stylesheet" href="styles.css"> . This way the > user can have their own preferences as "standard." Thanks! > Jeff > > On 11/23/2020 3:02 PM, J Leslie Turriff wrote: > > Will it follow references to external stylesheets to get its metadata? > Imbedding styles is something to be avoided. > > Leslie Good. In my opinion that would make the stage more user-friendly, not requiring in-line style coding. Leslie -- _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Free forum by Nabble | Edit this page |