Difference between revisions of "Frames"

From Telstar Wiki
Jump to navigation Jump to search
 
(46 intermediate revisions by the same user not shown)
Line 3: Line 3:
The Telstar utility program simply interacts with the Telstar API which is a restful API. This can be used directly by any software making it simple to programitically manage pages and routing information.
The Telstar utility program simply interacts with the Telstar API which is a restful API. This can be used directly by any software making it simple to programitically manage pages and routing information.


The simplest frame that can be viewed on TELSTAR would be defined as follows. This would create a simple information frame with some default content.
Frames are defined in JSON. The simplest frame that can be viewed on TELSTAR would be as follows. This would create a simple information frame with some flashing content. In this example [[Markup]] has been used within the content, however, other content types can be used including edi.tf urls, see below.


     {
     {
Line 11: Line 11:
       },
       },
       "visible": true,
       "visible": true,
      "content": {
        "data": "[D]This is page[F]101a",
        "type": "markup"
      }
     }
     }


[[The Telstar API]] can be used to add this and other frames to the system.


Shown below is a more comple example of a JSON defined frame. With this particular frame, the actual viewdata content has been created using the editor at http://edit.tf, this can be seen in the ''content.data'' and ''content.type'' keys. The example below is a simple information page with some simple routing (see [[Routing]). Pasting the ''content.data'' value into a browser will show the page and allow it to be edited.  
Shown below is a more complete example of a JSON defined frame. With this particular frame, the actual viewdata content has been created using the editor at http://edit.tf, this can be seen in the ''content.data'' and ''content.type'' keys. Both the edit.tf and zxnet (https://zxnet.co.uk/teletext/editor/) editors are supported. The example below is a simple information page with some simple routing (see [[Routing]]). Clicking the ''content.data'' link, or pasteing the value into a browser will show the page and allow it to be edited. It is not necessary to use the http://edit.tf editor, this is just one possible option.
 


     {
     {
Line 30: Line 34:
       "routing-table": [0,1,11,3,400,5,6,7,800,9,0],
       "routing-table": [0,1,11,3,400,5,6,7,800,9,0],
       "cursor": false,
       "cursor": false,
      "author-id": "editf-frame-generator",
      "navmsg-forecolour": "yellow",
      "navmsg-backcolour": "blue",
      "navmsg-highlight": "white"
     }
     }
TELSTAR supports many different types of frame, including ''response frames'' that can capture user data and ''gateway frames'' that provide connectivity to other systems.
It is not necessary to use the http://edit.tf editor, this is just one option.
''Full details of all of the frame types and how to create them is described in the section [[Frames]]''.
== Response Frames and Plugins ==
Response frames are frames that allow a user to enter data to be processed i.e. a frame where a user enters data such as a form. The data from these frames wouldt typically be processed using an external program or script referred to as a plugin. The plugin can be any software that can be executed, all that is required is that the plugin can return a json result. The Telstar system https://glasstty.com weather page is handled in this way.
Plugins are simple to create and deploy within a Telstar container and can be written in any language supported by the platform.
''Further details of the Telstar Plugin framework and how to create them can be found in the section [[Implementing Plugins]].''
== Gateway Frames ==
TBA...


== Adding Frames to the System ==
== Adding Frames to the System ==


Frames can be added to the system using either the Telstar API or by using a plug-in (see [[Implementing Plugins]])
Frames can be added to the system using the [[the Telstar API]].


The Telstar API, in conjunction with the cross platform Telstar Util software, provides a simple method of creating and managing pages.
The Telstar API, in conjunction with the cross platform Telstar Util software, provides a simple method of creating and managing pages.
Line 66: Line 48:
''Further details of the Telstar API can be found in the section [[The Telstar API]].''
''Further details of the Telstar API can be found in the section [[The Telstar API]].''


 
== Adding Content with the Edit.tf editor ==
# Frames in More Detail
 
__*** Please note TELSTAR as an application is still under development and subject to change. ***__
 
## Basic Frame
 
Frames are defined in JSON. The simplest frame that can be viewed on TELSTAR would be as follows.
 
{
"pid": {
"page-no": 101,
"frame-id": "a"
},
"visible": true
}
 
This frame, if posted to the TELSTAR API would result in a simple welcome message being displayed when viewed on TELSTAR using an appropriate videotex client.
 
To hide the frame from view, simply set the *visible key* to false.
 
## Adding Content with the Edit.tf editor


There are several ways to add content to a page. One of the easiest is to create the page in an editor such as http://edit.tf.
There are several ways to add content to a page. One of the easiest is to create the page in an editor such as http://edit.tf.
Line 105: Line 66:
         }     
         }     
     }
     }
   
 
## Adding Content using Markup
== Adding Content using Markup ==


Content can be added directly to the JSON file using a very simple markup. For example consider the following frame definition.
Content can be added directly to the JSON file using a very simple markup. For example consider the following frame definition.
Line 126: Line 87:
         }
         }
     }
     }
   
 
This frame uses markup in the title and the content, The title is specified as [D]ouble height and the three words used in the content are coloured yellow, cyan and magenta respectively.
This frame uses markup in the title and the content, The title is specified as [D]ouble height and the three words used in the content are coloured yellow, cyan and magenta respectively.


The markup definitions are shown below.
Full details of markup can be found in the [[Markup]] section.


    [R] alpha_red
== Complete Frame Description ==
    [G] alpha_green
    [Y] alpha_yellow
    [B] alpha_blue
    [M] alpha_magenta
    [C] alpha_cyan
    [W] alpha_white
    [F] flash
    [S] steady
    [N] normal_height
    [D] double_height
   
## Raw Content


If the content type or title type is specified as raw, the data will be presented within TELSTAR without modification.
The frame below is a standard information page from the TELSTAR system shown in its JSON format. It represents the first frame of page 9. Taking this frame as an example, a description of the fields and their meaning is decribed below.


For example the previous frame in raw format would be defined as follows.
''The full json schema can be found [[Frame Schema|here]].''


    {
    {
        "pid": {
    "pid": {
            "page-no": 101,
    "page-no": 9,
            "frame-id": "a"
    "frame-id": "a"
         },
         },
         "visible": true,
         "visible": true,
        "header-text": "",
        "cost": 0,
        "frame-type": "information",
        "redirect": {
            "page-no": 0,
            "frame-id": ""
        },
        "content": {
            "data": "https://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgc4UCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAxQIIs6PJnRYtKTOjoKkWnUQUIMeLTQIECBAgQIECBAgQIEDRAgp2adSLNQSZ0aegQIECBAgQIECBAgQIECBAgQIECBAgQNkCCPBqRa8GygpxaVaTDi00CBAgQIECBAgQIECBAgQIECBA4QIIc-dUgw6iCJFqQZMymgQIECBAgQIECBAgQIECBAgQIEDlAgmT46CfOQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQMECCZPjoJ8aMgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAFUQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgBVAMUNMQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIAVQDFDTAlMPUQIECBAgQIECBAgQIECBAgQIECBAgQIECAFUAxQ0wJTD1A0EHSQIECBAgQIECBAgQIECBAgQIECBAgQIECANMCUw9QNBB0kCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAPUDQQdJAgQIECBAgQIECBAgQIECAosWLFixYsWLFixYsQIECAHSQIECAosWLFixYsWLFixYsWIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
            "type": "edit.tf'
        },
         "title": {
         "title": {
             "data": "\u001bMWelcome\r\n\r\n",
             "data": "",
             "type": "raw"
             "type": "",
            "merge-data": []
         },
         },
         "content": {
         "routing-table": [
             "data": "\u001bCHello\u001bFTelstar\u001bEWorld",
            90,
             "type": "raw"
            91,
         }
            92,
            93,
            94,
            95,
            96,
            97,
            98,
            990,
            0
        ],
        "cursor": false,
        "connection": {
             "address": "",
            "mode": "",
            "port": 0
        },
        "author-id": "",
        "response-data": {
            "responses": null,
             "response-action": {
                "exec": "",
                "args": null,
                "post-action-frame": {
                    "page-no": 0,
                    "frame-id": ''
                },
                "post-cancel-frame": {
                    "page-no": 0,
                    "frame-id": ""
                }
            }
         },
        "navmessage-select": "[B][n][Y]Select item or[W]*page# : [_+]",
        "navmessage-notfound": "[B][n][Y]Page not Found :[W]"
     }
     }
   
The unicode values specified for colour and double height are the values as specified in the videotex specification.


![FTSE_small.png](https://bitbucket.org/repo/LXaBk6A/images/3173163590-FTSE_small.png)
=== pid ===


## More complete JSON Frame Description
Specifies the page number and frame id for the frame.


The frame below is a standard information page from the TELSTAR system shown in its JSON format. It represents the first frame of page 899. Taking this page as an example, a description of the fields and their meaning is decribed below.
    "pid": {
    "page-no": 9,
    "frame-id": "a"
        },


''The full json schema can be found [[Frame Schema|here]].''
=== visible ===
 
When set to false, the frame will not be accessible and will return the ''not found'' system message to the user if an attempt is made to access it.


{
      "visible": true,
"pid": {
"page-no": 9,
"frame-id": "a"
},
"visible": true,
"header-text": "",
"cost": 0,
"frame-type": "information",
"redirect": {
"page-no": 0,
"frame-id": ""
},
"content": {
"data": "https://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgc4UCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAxQIIs6PJnRYtKTOjoKkWnUQUIMeLTQIECBAgQIECBAgQIEDRAgp2adSLNQSZ0aegQIECBAgQIECBAgQIECBAgQIECBAgQNkCCPBqRa8GygpxaVaTDi00CBAgQIECBAgQIECBAgQIECBA4QIIc-dUgw6iCJFqQZMymgQIECBAgQIECBAgQIECBAgQIEDlAgmT46CfOQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQMECCZPjoJ8aMgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAFUQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgBVAMUNMQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIAVQDFDTAlMPUQIECBAgQIECBAgQIECBAgQIECBAgQIECAFUAxQ0wJTD1A0EHSQIECBAgQIECBAgQIECBAgQIECBAgQIECANMCUw9QNBB0kCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAPUDQQdJAgQIECBAgQIECBAgQIECAosWLFixYsWLFixYsQIECAHSQIECAosWLFixYsWLFixYsWIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
"type": "edit.tf'
},
"title": {
"data": "",
"type": ""
},
"routing-table": [
90,
91,
92,
93,
94,
95,
6,
97,
98,
990,
0
],
"cursor": false,
"connection": {
"address": "",
"mode": "",
"port": 0
},
"author-id": "",
"response-data": {
"responses": null,
"response-action": {
"exec": "",
"args": null,
"post-action-frame": {
"page-no": 0,
"frame-id": ''
},
"post-cancel-frame": {
"page-no": 0,
"frame-id": ""
}
}
},
"navmessage-select": "[B][n][Y]Select item or[W]*page# : [_+]",
"navmessage-notfound": "[B][n][Y]Page not Found :[W]"


## pid
=== header-text ===


    page_no, frame_id
Allows the default header text to be ovwerridden at frame level. If this is left blank the default header will be used, see configuration.


## visible
      "header-text": "[Y]MICRONETn 800 (C)",


      "visible": true,
=== cost ===


## header-text
      "cost": 0,


      "header-text": "[Y]MICRONETn 800 (C)",
=== frame-type ===


## cache-id
The API supports the following frame types ''initial'', ''mainindex'', ''information'', ''exit'', ''gateway'', ''test'' and ''response''.


       "cache-id": "d4f71dbd-5cc0-4214-912e-e0340696291d",
       "frame-type": "information",


## frame-type
* '''initial''': This frame type is used on the start page, see [[Configuration Options]]. Typically only one of these frames would exist within a system.
* '''mainindex''': This frame type is used on the main index page. , see [[Configuration Options]]. Only one of these frames should exist within a system.
* '''information''': This frame type is used for all normal content frames.
* '''exit''': This frame type is used for an exit page, any number of exit pages can be defined. When an exit page is rendered it will close the connection.
* '''gateway''': This page type is used to define a gateway page and is used in conjunction with the connection element (see below).
* '''test''': This page type indicates a test page and prevents navigation and system messages from being shown. this is typically used for frames that need to use the whole display such as 'test cards' etc.
* '''telesoftware''': Telesoftware frames (see [[Telesoftware]]).
* '''response''': This frame type is used for response frames. See [[Implementing Response Frames]].
* '''system''': Reserved for use internally.
* '''exception''': Reserved for use internally.


The API supports the following frame types *initial*, *mainindex*, *information*, *exit*, *gateway*, *test*, *response*.
=== redirect ===
If set it simply means that the user is redirected to the specified frame. This can be a useful alternative form of navigation to the routing table.


      "frame-type": "information",
        "redirect": {
            "page-no": 9,
            "frame-id": "a"
        },


### initial
The following is an example of a complete redirect page.


This frame type is used on the start page. The start page is specified within the *telstar.json* config file. The default page number is *99a*. Typically only one of these frames would exist within a system.
    {
        "PID": {
            "page-no": 2,
            "frame-id": "a"
        },
        "redirect": {
            "page-no": 11,
            "frame-id": "a"
        },
        "visible": true
    }


### mainindex
=== content ===


This frame type is used on the main index page. The main index page is specified within the *telstar.json* config file. The default page number is *0a*. Only one of these frames should exist within a system.
These elements define the content. The example below shows the content.type to be an edit.tf url. The available types are shown below.


### information
        "content": {
            "data": "https://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgc4UCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAxQIIs6PJnRYtKTOjoKkWnUQUIMeLTQIECBAgQIECBAgQIEDRAgp2adSLNQSZ0aegQIECBAgQIECBAgQIECBAgQIECBAgQNkCCPBqRa8GygpxaVaTDi00CBAgQIECBAgQIECBAgQIECBA4QIIc-dUgw6iCJFqQZMymgQIECBAgQIECBAgQIECBAgQIEDlAgmT46CfOQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQMECCZPjoJ8aMgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAFUQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgBVAMUNMQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIAVQDFDTAlMPUQIECBAgQIECBAgQIECBAgQIECBAgQIECAFUAxQ0wJTD1A0EHSQIECBAgQIECBAgQIECBAgQIECBAgQIECANMCUw9QNBB0kCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAPUDQQdJAgQIECBAgQIECBAgQIECAosWLFixYsWLFixYsQIECAHSQIECAosWLFixYsWLFixYsWIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
            "type": "edit.tf'
        },


This frame type is used for all normal content frames.   
Content types:


### exit
* '''zxnet''': If set, then the content will be treated as an zxnet editor url. This is converted to RawV before being rendered.
* '''edit.tf''': If set, then the content will be treated as an edit.tf url. This is converted to RawV before being rendered.
* '''markup''': If set, then the content will be treated as ''markup'' content. Full details of ''markup'' can be found in the section [[Markup]]
* '''rawV''': If set, then the content will be treated as raw videotex data. This is 7bit (00-7F) videotex format with control chars between 00-1F and escaped codes for alpha and graphic attributes. Ideally rows should have any trailing spaces removed and replaced with with a CR/LF combination. This will be rendered as is.
* '''rawT''': If set, then the content will be treated as raw teletex data. This is a 24 x 40 block of 7 bits chars (960 chars) in Teletext format (range 00-7F). This format is used internally when manipulating page data. It will be converted to RawV before being rendered.


This frame type is used for an exit page, any number of exit pages can be defined. When an exit page is rendered it will close the connection.
=== title ===


### gateway
This sets the title of the page. In many cases this may be left blank with all of the content specified in the ''content'' section (see above) however, the ''title'' section gives additional flexibility when creating frames.


This page type is used to define a gateway page and is used in conjunction with the connection element (see below).
Values for ''title-type'' are the same as defined for the content section, however, if the type ''edit-tf'' is used then only the first four (default) lines of the edit.tf defined page are used.  


### test
Separating title from content in this way allows logos and header sections to be created for the title whilst using markup for the main content or visa-versa.


This page type indicates a test page and prevents navigation and system messages from being shown. this is typically used for frames that need to use the whole display such as 'test cards' etc.
==== Example 1 ====


### response
In thi example the fields are blank meaning that only the data in the ''content'' section is displayed.


This frame type is used in conjunction with the *response-fields element (see below) for response frames. See [Response Frames](response_frames.md).
        "title": {
            "data": "",
            "type": "",
            "merge-data": []
        },


## content
==== Example 2 ====


__Description to be added...__
In this example, the top 4 lines of the edit.tf content is displayed at the top of the page.


      "content":
        "title": {
            "data": "https://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAvobotqBX__oECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIC_9AgQIEGv-gQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgL_0Cj4kQav6BAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAuq64P6Dx__oECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
            "type": "edit.tf",
            "merge-data": []
        },


## title
To take the top 5 lines, the ''type'' field can be extended as follows.


__Description to be added...__
            "type": "edit.tf,5"


      "title": {
Note that this extended form of ''type'' only applies to edit.tf types.
        "data": "",
        "type": ""
      },


## routing-table
==== Example 3 ====


__Description to be added...__
The merge data field can be used to add ''layers'' of markup data to the title area. For example the example above shows the Guardian logo. To add some alphagraphics text to this, an additional layer could be used e.g.


      "routing-table": [
        "title": {
            "data": "https://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAvobotqBX__oECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIC_9AgQIEGv-gQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgL_0Cj4kQav6BAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAuq64P6Dx__oECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
            "type": "edit.tf,5",
            "merge-data": [
                "[w[            UK News]]"
            ]
        },


        8000,
Note that any number of layers can be added, however, the merge layer must be defined as markup.
        8001,
        8002,
        8003,
        8004,
        8005,
        8006,
        8007,
        8008,
        8009,
        800
      ],


## cursor
=== routing table ===


This element determines whether a cursor is shown on the page. Typically a cursor would only be shown on response frames.
The routing table defines which pages are navigated to when a user presses a key whilst viewing the frame. The table has 11 entries with the first 10 representing the keys 0-9, the final entry refers to the ''hash'' (return) key.


      "cursor": false,
The example below shows the default routing table for frame 9a. If the user is viewing this frame and presses 1 the frame 91a will be loaded, assuming it exists. Pressing the ''hash'' (return) key will take the user back to frame 0a, the main index.


## connection
        "routing-table": [
            90,
            91,
            92,
            93,
            94,
            95,
            96,
            97,
            98,
            99,
            0
        ],


This elements specifies the connection object used for gateway pages.
=== cursor ===


      "connection": {
This element determines whether a cursor is shown on the page. Typically a cursor would only be shown on response frames.
        "address": "",
        "mode": "",
        "port": 0
      },


### address and port
        "cursor": false,
       
=== connection ===


This represent the endpoint of the system being accessed.
This elements specifies the connection object used for gateway pages.


### mode
        "connection": {
            "address": "fish.ccl4.org",
            "mode": "viewdata",
            "port": 23
        },


This determines how the system is accessed, the options are.
The values for ''address and port'' represent the endpoint of the system being accessed and the value for ''mode'' determines how the system is accessed, the options are:


     viewdata
     viewdata
     full_duplex
     full_duplex
     full_duplex_no_echo
     full_duplex_no_echo
## author-id


This is an optional field that can be used to indicate eith the author of the page or other source.


      "author-id": "editf-frame-generator",
=== author-id ===


## response-fields
This is an optional field that can be used to indicate the author of the page or other source.


These fields relate to the fields used in a *response-frame*, a response frame is a frame where a user is asked to enter information. The Telstar system weather page is one such frame where the user is asked to enter a city.
        "author-id": "john",


For information frames the value can be left blank as shown below or simply ommited altogether.
=== response-data ===


    "response-fields": [],
These fields should be used when the frame type is set to be a ''response-frame''.


The following JSON snippet is taken from the TELSTAR system repsonse frame and shows a single field.  
There are two main sections, ''response-data'' and ''response-action''. Below is an example of a response frame used for the Telstar weather page. The frame is created in the normal way using ''markup'' or ''edit.tf''. In this example the text ''Town/Cty'' has been positioned near the centre of the page. Immediately to the right of this is a field for the user to enter either a Town or City, the ''response-data'' section defines that field. Once the user submits the frame the section ''response-action'' determines what happens. In the example here a binary file (''telstar-openweather-linux-amd64''), stored in the containers volume directory is executed with a single argument (''myopenweatherapikey''). Note that the ''post-action-frame'' is set to 290b, in this example frame 290b is dynamically generated by the binary file ''telstar-openweather-linux-amd64'' and contains the weather forecast.


     "response-fields": [
Full details of how to implement response frames are detailed in the section [[Implementing Response Frames]].
      {
     "response-data": {
         "label": "City/Town : ",
         "response-fields": [
        "vpos": 8,
            {
        "hpos": 4,
                "vpos": 8,
        "required": true,
                "hpos": 4,
        "length": 16,
                "required": true,
        "type": "alpha",
                "length": 16,
        "auto_submit": true,
                "type": "alphanumeric",
        "value": "",
                "auto-submit": false,
        "valid": false,
                "password": false
        "password": false
            }
      }
        ],
    ]
        "response-action": {
### label
            "exec": "/opt/telstar/volume/telstar-openweather-linux-amd64",
 
            "args": [
The *label* element will be displayed alongside the data entry area.
                "myopenweatherapikey"
 
            ],
 
            "post-action-frame": {
### vpos, hpos
                "page-no": 290,
 
                "frame-id": "c"
These specify where the field is displayed on the page.
            }
   
        }
### required
    },
 
If set to *true*, it will not be possible to continue past the page until some data is entered.
 
### length
 
Refers to the length of the data field. See *auto_submit* below
 
### type
 
This element defines what characters can be entered into the field the options are
*numeric*, *alpha* and *alphanumeric*.
 
### auto_submit
 
If, when enter data into the field, a user reaches the *length* (see above), the page will auto submit if this value is set to true.
 
### value
 
The value will contain the entered data when the response frame is processed. See plugins.
 
### valid


=== navmessage-select ===


### password
Allows the ''navigation'' system message to be customised at frame level. In most cases this can be left blank in order that the system default is used instead, see [[Configuration Options]].


Set to tru will ensure that the entered data is not echoed back to the user. Asterisks are sent instead.
        "navmessage-select": "[B][n][Y]Select item or[W]*page# : [_+]",


### navmsg-forecolour, navmsg-backcolour and navmsg-highlight
=== navmessage-notfound ===


These elements represent the colours of the navigation message on ro 23 of the frame, these are optional values and will default to Yellow, Blue and White respectively.
Allows the ''not found'' system message to be customised at frame level. In most cases this can be left blank in order that the system default is used instead, see [[Configuration Options]].


    "navmsg-forecolour": "yellow",
        "navmessage-notfound": "[B][n][Y]Page not Found :[W]"
    "navmsg-backcolour": "blue",
    "navmsg-highlight": "white",

Latest revision as of 14:51, 17 May 2022

As is typical with interactive videotex systems, pages are numbered from 0 to 999999999 and consist of one or more frames with the suffix a-z, for example the first frame for page 200 would be 200a, the second 200b and so on (see Routing) for more details). These frames are stored within TELSTAR's database as JSON objects (see https://www.json.org/) and uploaded to Telstar using a simple command line utility.

The Telstar utility program simply interacts with the Telstar API which is a restful API. This can be used directly by any software making it simple to programitically manage pages and routing information.

Frames are defined in JSON. The simplest frame that can be viewed on TELSTAR would be as follows. This would create a simple information frame with some flashing content. In this example Markup has been used within the content, however, other content types can be used including edi.tf urls, see below.

   {
     "pid": {
       "page-no": 101,
       "frame-id": "a"
     },
     "visible": true,
     "content": {
       "data": "[D]This is page[F]101a",
        "type": "markup"
     }
   }


Shown below is a more complete example of a JSON defined frame. With this particular frame, the actual viewdata content has been created using the editor at http://edit.tf, this can be seen in the content.data and content.type keys. Both the edit.tf and zxnet (https://zxnet.co.uk/teletext/editor/) editors are supported. The example below is a simple information page with some simple routing (see Routing). Clicking the content.data link, or pasteing the value into a browser will show the page and allow it to be edited. It is not necessary to use the http://edit.tf editor, this is just one possible option.


   {
     "pid": {
       "page-no": 0,
       "frame-id": "a"
     },
     "visible": true,
     "frame-type": "information",
     "content": {
       "data": "http://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQMMKAbNw6dyCTuyZfCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgKJEiRIkSJEiRIkSJEiRIkSJEiRIkSJEiRIkSJEiRIkSJEiRAxQR4s6LSgzEEmdUi0otOogkzo0-lNg1JM-cCg8unNYgQIASBBj67OnXllWIMu7pl5dMOndty7uixBoy4dnTQsQIECBAgBIEHfLh2dNCDDuyINmnNl59POzKuQIECBAgQIECBAgQIECBAyQTotemggzoiCvFg1JEWkCnYemnfuw7EGHdkQIECBAgQIASBBp3dMvLdh6ad-7DsQbsvfmgw7siDvlw9NGXkuQIECBAgQM0EKrTkzotOmgkzo0-lNg1JM-cCh79vDDu8oMO7IgQIECAEgQYuvPTuy8-aDdl781wM6EjVKcVBMw9MvPogoctOPLzQIEDRBHn1otKdNizqiCTOjT6U2DUkz5wKlvw5OaxByw6dixAgBIEGHdkQUMPLZpw7cu7ouQIECBAgQIECBAgQIECBAgQIECBA2QR4NSLXg2UFOLSrSYcWmCnWKkWYsQVIsWNBsLEEOHMaIASBBh3ZEHTRlQQ9-zfz54diCHh7ZUGHJ2y7unXllXIECBAgQN0EifMkxINmmCqcsPbLsQYd2RBI37NOTD5QbsvfmuQIECBA4CHQc2TDpT50WogcMGCAScgoOnLTi69MqDpvQdNGnmgQIAaBBzy8u2nHlQd9PTQgqZdmXnvzdO-HllQYd2RBt38sq5AgQOQ0yfHQT40ZYgp2adSLNQSZ0aegTIKkWnUQUIMeLTQIECAokSJEiRIkSJEiRIkSJEiRIkSJEiRIkSJEiRIkSJEiRIkSJEFeLBqSItJBGn0osODTqIBIM6EQIEFDDnyoFTJywvoECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
       "type": "edit.tf"
     },
     "routing-table": [0,1,11,3,400,5,6,7,800,9,0],
     "cursor": false,
   }

Adding Frames to the System

Frames can be added to the system using the the Telstar API.

The Telstar API, in conjunction with the cross platform Telstar Util software, provides a simple method of creating and managing pages.

The API can be used to retrieve and update frames and configuring routing. The API is a restful API that uses the GET, PUT, POST and DELETE HTTP methods and as such can be used from any application.

Data is passed to and from the API in JSON format, making the system very simple to use in any programming language. The whole API could be used without any programming at all by using a command line utility such as CURL.

Further details of the Telstar API can be found in the section The Telstar API.

Adding Content with the Edit.tf editor

There are several ways to add content to a page. One of the easiest is to create the page in an editor such as http://edit.tf.

The JSON file would look something like the one showm below. Note that the content type is set to editf and the content data contains the edit.tf url.

   {
       "pid": {
           "page-no": 101,
           "frame-id": "a"
       },
       "visible": true,
       "frame-type": "information",
       "content": {
           "data": "http://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICn_OmTJkSJApUqVKlSpUlcHApiTJkyZEiRIkyZMmTIkSJFmKf3JX58____RBg-fPnzog__2iBBo-fNX9qgQcOHDh8-fGiAp_zFf______2v7_____7X___oEGr__Qa0ur_________QoCn9ywK__6D__a__7dH__tf___1QIv_9AiQIkaPX_bo0aMpiKf_-Yr__oP_9r__tUH_-1____9og__yjnz5cldX9qUc-fPkp__uSv_-g__2v_-1Qf_7X__aIv____KZv_dIV__2pTN___yn__mK___z__a____5__tf_9qgVf__8o5_vWJX__alHP___Kf_7kr____6dBr_____-h__2qBBr__ymbPnSFf69CUzf__8pnz5iq9ejRoECBWvXr0KBGjQYOHBHz4cECBAgwcCily7__yqDhw4ePnzogQeP7RAg0fPiBB___9X___QYPH___-sCmb__KoP________3B__tUCDV__tUH___1f36XB-_______KOf_8qgRo__9B__v9X___QINX___Qav__B8-NNX_-jR___8pm__ymYrq______h_odX9qg1f___7q__9X_-h1f_5TBgwYM37__KOSur-_Ro0Pr_8_f_qDV_b___r__1f_6D___lFKlSpUu__8pmK_v7VAgwf______tNX9r______V__oP__-gQaPnwpm__yqDB__tUCD__QIEG___1f2qL____9X_-g____z5-__ymb__KoNX_-lQKl6VAgQav6_V__oNf___1f2qBX_____9-hKOf_8qgVJ0JRw4cOPLkqiQoESNGgVL0aFEjQoECJGjRoymDNm__ymTJkzZv3_____-3bt27du3Thw8efPnz58-fPnz58-fP___QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
           "type": "edit.tf"
       }    
   }

Adding Content using Markup

Content can be added directly to the JSON file using a very simple markup. For example consider the following frame definition.

   {
       "pid": {
           "page-no": 101,
           "frame-id": "a"
       },
       "visible": true,
       "frame-type": "information",
       "title": {
           "data": "[D]Welcome\r\n\r\n",
           "type": "markup"
       },
       "content": {
           "data": "[Y]Hello[C]Telstar[M]World",
           "type": "markup"
       }
   }

This frame uses markup in the title and the content, The title is specified as [D]ouble height and the three words used in the content are coloured yellow, cyan and magenta respectively.

Full details of markup can be found in the Markup section.

Complete Frame Description

The frame below is a standard information page from the TELSTAR system shown in its JSON format. It represents the first frame of page 9. Taking this frame as an example, a description of the fields and their meaning is decribed below.

The full json schema can be found here.

    {
   	"pid": {
   		"page-no": 9,
   		"frame-id": "a"
       },
       "visible": true,
       "header-text": "",
       "cost": 0,
       "frame-type": "information",
       "redirect": {
           "page-no": 0,
           "frame-id": ""
       },
       "content": {
           "data": "https://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgc4UCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAxQIIs6PJnRYtKTOjoKkWnUQUIMeLTQIECBAgQIECBAgQIEDRAgp2adSLNQSZ0aegQIECBAgQIECBAgQIECBAgQIECBAgQNkCCPBqRa8GygpxaVaTDi00CBAgQIECBAgQIECBAgQIECBA4QIIc-dUgw6iCJFqQZMymgQIECBAgQIECBAgQIECBAgQIEDlAgmT46CfOQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQMECCZPjoJ8aMgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAFUQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgBVAMUNMQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIAVQDFDTAlMPUQIECBAgQIECBAgQIECBAgQIECBAgQIECAFUAxQ0wJTD1A0EHSQIECBAgQIECBAgQIECBAgQIECBAgQIECANMCUw9QNBB0kCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAPUDQQdJAgQIECBAgQIECBAgQIECAosWLFixYsWLFixYsQIECAHSQIECAosWLFixYsWLFixYsWIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
           "type": "edit.tf'
       },
       "title": {
           "data": "",
           "type": "",
           "merge-data": []
       },
       "routing-table": [
           90,
           91,
           92,
           93,
           94,
           95,
           96,
           97,
           98,
           990,
           0
       ],
       "cursor": false,
       "connection": {
           "address": "",
           "mode": "",
           "port": 0
       },
       "author-id": "",
       "response-data": {
           "responses": null,
           "response-action": {
               "exec": "",
               "args": null,
               "post-action-frame": {
                   "page-no": 0,
                   "frame-id": 
               },
               "post-cancel-frame": {
                   "page-no": 0,
                   "frame-id": ""
               }
           }
       },
       "navmessage-select": "[B][n][Y]Select item or[W]*page# : [_+]",
       "navmessage-notfound": "[B][n][Y]Page not Found :[W]"
   }

pid

Specifies the page number and frame id for the frame.

   	"pid": {
   		"page-no": 9,
   		"frame-id": "a"
       },

visible

When set to false, the frame will not be accessible and will return the not found system message to the user if an attempt is made to access it.

     "visible": true,

header-text

Allows the default header text to be ovwerridden at frame level. If this is left blank the default header will be used, see configuration.

     "header-text": "[Y]MICRONETn 800 (C)",

cost

     "cost": 0,

frame-type

The API supports the following frame types initial, mainindex, information, exit, gateway, test and response.

     "frame-type": "information",
  • initial: This frame type is used on the start page, see Configuration Options. Typically only one of these frames would exist within a system.
  • mainindex: This frame type is used on the main index page. , see Configuration Options. Only one of these frames should exist within a system.
  • information: This frame type is used for all normal content frames.
  • exit: This frame type is used for an exit page, any number of exit pages can be defined. When an exit page is rendered it will close the connection.
  • gateway: This page type is used to define a gateway page and is used in conjunction with the connection element (see below).
  • test: This page type indicates a test page and prevents navigation and system messages from being shown. this is typically used for frames that need to use the whole display such as 'test cards' etc.
  • telesoftware: Telesoftware frames (see Telesoftware).
  • response: This frame type is used for response frames. See Implementing Response Frames.
  • system: Reserved for use internally.
  • exception: Reserved for use internally.

redirect

If set it simply means that the user is redirected to the specified frame. This can be a useful alternative form of navigation to the routing table.

       "redirect": {
           "page-no": 9,
           "frame-id": "a"
       },

The following is an example of a complete redirect page.

   {
       "PID": {
           "page-no": 2,
           "frame-id": "a"
       },
       "redirect": {
           "page-no": 11,
           "frame-id": "a"
       },
       "visible": true
   }

content

These elements define the content. The example below shows the content.type to be an edit.tf url. The available types are shown below.

       "content": {
           "data": "https://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgc4UCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAxQIIs6PJnRYtKTOjoKkWnUQUIMeLTQIECBAgQIECBAgQIEDRAgp2adSLNQSZ0aegQIECBAgQIECBAgQIECBAgQIECBAgQNkCCPBqRa8GygpxaVaTDi00CBAgQIECBAgQIECBAgQIECBA4QIIc-dUgw6iCJFqQZMymgQIECBAgQIECBAgQIECBAgQIEDlAgmT46CfOQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQMECCZPjoJ8aMgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQICixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYsWLFixYgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAFUQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgBVAMUNMQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIAVQDFDTAlMPUQIECBAgQIECBAgQIECBAgQIECBAgQIECAFUAxQ0wJTD1A0EHSQIECBAgQIECBAgQIECBAgQIECBAgQIECANMCUw9QNBB0kCBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAPUDQQdJAgQIECBAgQIECBAgQIECAosWLFixYsWLFixYsQIECAHSQIECAosWLFixYsWLFixYsWIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
           "type": "edit.tf'
       },

Content types:

  • zxnet: If set, then the content will be treated as an zxnet editor url. This is converted to RawV before being rendered.
  • edit.tf: If set, then the content will be treated as an edit.tf url. This is converted to RawV before being rendered.
  • markup: If set, then the content will be treated as markup content. Full details of markup can be found in the section Markup
  • rawV: If set, then the content will be treated as raw videotex data. This is 7bit (00-7F) videotex format with control chars between 00-1F and escaped codes for alpha and graphic attributes. Ideally rows should have any trailing spaces removed and replaced with with a CR/LF combination. This will be rendered as is.
  • rawT: If set, then the content will be treated as raw teletex data. This is a 24 x 40 block of 7 bits chars (960 chars) in Teletext format (range 00-7F). This format is used internally when manipulating page data. It will be converted to RawV before being rendered.

title

This sets the title of the page. In many cases this may be left blank with all of the content specified in the content section (see above) however, the title section gives additional flexibility when creating frames.

Values for title-type are the same as defined for the content section, however, if the type edit-tf is used then only the first four (default) lines of the edit.tf defined page are used.

Separating title from content in this way allows logos and header sections to be created for the title whilst using markup for the main content or visa-versa.

Example 1

In thi example the fields are blank meaning that only the data in the content section is displayed.

       "title": {
           "data": "",
           "type": "",
           "merge-data": []
       },

Example 2

In this example, the top 4 lines of the edit.tf content is displayed at the top of the page.

       "title": {
           "data": "https://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAvobotqBX__oECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIC_9AgQIEGv-gQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgL_0Cj4kQav6BAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAuq64P6Dx__oECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
           "type": "edit.tf",
           "merge-data": []
       },

To take the top 5 lines, the type field can be extended as follows.

           "type": "edit.tf,5"

Note that this extended form of type only applies to edit.tf types.

Example 3

The merge data field can be used to add layers of markup data to the title area. For example the example above shows the Guardian logo. To add some alphagraphics text to this, an additional layer could be used e.g.

       "title": {
           "data": "https://edit.tf/#0:QIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAvobotqBX__oECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIC_9AgQIEGv-gQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgL_0Cj4kQav6BAgQIECBAgQIECBAgQIECBAgQIECBAgQIECAuq64P6Dx__oECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECBAgQIECA",
           "type": "edit.tf,5",
           "merge-data": [
               "[w[             UK News]]"
           ]
       },

Note that any number of layers can be added, however, the merge layer must be defined as markup.

routing table

The routing table defines which pages are navigated to when a user presses a key whilst viewing the frame. The table has 11 entries with the first 10 representing the keys 0-9, the final entry refers to the hash (return) key.

The example below shows the default routing table for frame 9a. If the user is viewing this frame and presses 1 the frame 91a will be loaded, assuming it exists. Pressing the hash (return) key will take the user back to frame 0a, the main index.

       "routing-table": [
           90,
           91,
           92,
           93,
           94,
           95,
           96,
           97,
           98,
           99,
           0
       ],

cursor

This element determines whether a cursor is shown on the page. Typically a cursor would only be shown on response frames.

       "cursor": false,
       

connection

This elements specifies the connection object used for gateway pages.

       "connection": {
           "address": "fish.ccl4.org",
           "mode": "viewdata",
           "port": 23
       },

The values for address and port represent the endpoint of the system being accessed and the value for mode determines how the system is accessed, the options are:

   viewdata
   full_duplex
   full_duplex_no_echo


author-id

This is an optional field that can be used to indicate the author of the page or other source.

       "author-id": "john",

response-data

These fields should be used when the frame type is set to be a response-frame.

There are two main sections, response-data and response-action. Below is an example of a response frame used for the Telstar weather page. The frame is created in the normal way using markup or edit.tf. In this example the text Town/Cty has been positioned near the centre of the page. Immediately to the right of this is a field for the user to enter either a Town or City, the response-data section defines that field. Once the user submits the frame the section response-action determines what happens. In the example here a binary file (telstar-openweather-linux-amd64), stored in the containers volume directory is executed with a single argument (myopenweatherapikey). Note that the post-action-frame is set to 290b, in this example frame 290b is dynamically generated by the binary file telstar-openweather-linux-amd64 and contains the weather forecast.

Full details of how to implement response frames are detailed in the section Implementing Response Frames.

   "response-data": {
       "response-fields": [
           {
               "vpos": 8,
               "hpos": 4,
               "required": true,
               "length": 16,
               "type": "alphanumeric",
               "auto-submit": false,
               "password": false
           }
       ],
       "response-action": {
           "exec": "/opt/telstar/volume/telstar-openweather-linux-amd64",
           "args": [
               "myopenweatherapikey"
           ],
           "post-action-frame": {
               "page-no": 290,
               "frame-id": "c"
           }
       }
   },

navmessage-select

Allows the navigation system message to be customised at frame level. In most cases this can be left blank in order that the system default is used instead, see Configuration Options.

       "navmessage-select": "[B][n][Y]Select item or[W]*page# : [_+]",

navmessage-notfound

Allows the not found system message to be customised at frame level. In most cases this can be left blank in order that the system default is used instead, see Configuration Options.

       "navmessage-notfound": "[B][n][Y]Page not Found :[W]"