{#include macro jlog.jim}{#define links=
jam text of this page . . Perl source code of {jamal} . . {jamal} on-line documentation
} Jamal=Just Another Macro Language v{version}

Just Another Macro Language v{version}

. . . . . . . . . . . . . . . . . . . . . . . . not only for HTML

{links}

I edit text files using vi, emacs, NOTEPAD...

I suffer because these files contain redundant text ...

Do you? If yes, {jamal} is for you.

Using {jamal} you can easily maintain text based document sets. You can define macros for text that appear at many places and concentrate on the actual content and have {jamal} update all occurences of the text. Although {jamal} was originally developed for HTML far before CSS and XML was invented it proved to be useful for many other tasks, like maintaining configuration files, web page template system, Makefile variations for different operating system and many other things.
{jamal} is a command line tool, that can be used in any project that maintains text files.
Using {jamal} you will edit jam files. These files include the original text coding mixed with {jamal} macros. After saving you compile the jam files into the final file. The maintained source files are readable and it is easy to visually separate macro text and content.
Using {jamal} you will allways have full control of your text content. {jamal} never generates anything it thinks looks good. You generate the code, {jamal} only helps eliminate repetitive tasks.
Start using {jamal} simple and fast for simple tasks and learn it gradually as your needs grow. Becaming an expert you can even write programs in {jamal}.

Although {jamal} by default uses curly braces to enclose macros, you can easily define different macro start and stop strings if the nature of the text file requires that. For example you can define the macro start string to be <% and the closing string to be %> if you happen to use {jamal} for Perl, C, C#, Java or JavaScript files.

Features in short:

  • Macro definition using arguments, example:
    {#[}#define bgcolor/x=<BODY BGCOLOR=x>{#]}
    Use it as
                   <HTML>
                   <HEAD>
                   </HEAD>
                   {#[}bgcolor/white{#]}
                   ...
    
  • Include code, html, macro files saying {#[}#include file{#]}
  • Create text as result of arithmetic calculation. Example:
    this can be in an included macro file:
                   {#[}#define NextChapter=chap{@[}#+ 1 {#[}Chapter{#]}{#]}.html{#]}
                   ...
    the jam file:
                   {#[}#define Chapter=12{#]}
                   ...
                   <A HREF="{#[}NextChapter{#]}">Next<A>
                   <HTML>
  • Create text in a loop for files in a directory. Example:
                   Text files sorted by date in directory <tt>your_dir</
    tt><p>
                   {#[}#dir/your_dir/-Sd *.txt/{$file$nam} {$file$date}<br>
                   }
  • Create text in loop for numeric or textual values. Example:
                   {#[}#for i/ 1 ... 5 / a[i]=i;{#]}
    to get        {#for i/ 1 ... 5 / a[i]=i;}
    or             {#[}#for i/,1,4,kakukk/ a[i]=i;{#]}
    to get        {#for i/,1,4,kakukk/ a[i]=i;}
    
  • Conditional macros, like {#[}#if/{#[}#= {#[}a{#]} {#[}b{#]}{#]}/equal/ notequal{#]}
  • Insert time and date values automatically with flexible formatting.
  • Define the names of the months or weekdays in your language.
  • Define simple macros on the command line.
  • Define macro files to be included for macros on the command line.
  • and many more...

You are free to use and distribute {jamal} as far as your actions are in line with the GNU General Public Licence. If you maintain web sites using {jamal} you can include a reference text on one or more of the pages that you create on a site using {jamal}. This can be done using the predefined macro {#[}reference{#]}.

{links}
List of all {jamal} files Win95 exe

{reference}