Processing text files with a t-module [t-…]

You can use a text-processing module to integrate text files of a type that is not among those understood by the Aneamal Translator natively. Officially supported t-modules can be found in the t-module inventory.

How to

See Integrating files for general information on how files are integrated into a webpage made with Aneamal. Use a file token of the form [t-…] to process a file with a t-module.

You must first install the t-module to be able to use it. Most modules are installed simply by uploading a folder into your aneamal directory. The t-module’s folder name must begin with t- and is exactly the name that you use in the file token, [t-…].

t-modules work with embedded files as well as linked files like in the example below. Linked files can be partially loaded. You can add a caption directly below the linked or embedded file. You can also add a clue after a colon inside the file token. Mind that a t-module may have certain requirements concerning the clue.

Example

In the example, a linked file greetings.php is processed by the PHPH module which applies syntax highlighting to PHP code.

[t-phph]->/stuff/greetings.php
<?php // Friendly Program

function (float $x): float {
    return  
55920
    
$x * (1511993221/9240
    
$x * (3305798911/16800
    
$x * (4935697783/37800
    
$x * (19531322383/362880
    
$x * (5302320091/362880
    
$x * (3626521/1350
    
$x * (50886691/151200
    
$x * (3424009/120960
    
$x * (184949/120960
    
$x * (43469/907200
    
$x * (6607/9979200
    
)))))))))));
}

for (
$n 1$n 13; ++$n) {
    print 
chr(round(f($n)));
}

// The End

For developers

The output of t-modules depends entirely on the used module. Developers can program their own t-module using the module API.

See also