Software Index
Linux Software Programming  

Text::MacroScript

download download home home   report broken
important software information
company name:
Mark Summerfield
license: Freeware
minimum requirements:
functional limitations:
Text::MacroScript description
Text::MacroScript is a macro pre-processor with embedded perl capability.

SYNOPSIS

use Text::MacroScript ;

# new() for macro processing

my $Macro = Text::MacroScript->new ;
while( ) {
print $Macro->expand( $_ ) if $_ ;
}

# Canonical use (the filename improves error messages):
my $Macro = Text::MacroScript->new ;
while( ) {
print $Macro->expand( $_, $ARGV ) if $_ ;
}

# new() for embedded macro processing

my $Macro = Text::MacroScript->new( -embedded => 1 ) ;
# Delimiters default to
# or
my $Macro = Text::MacroScript->new( -opendelim => '[[', -closedelim => ']]' ) ;
while( ) {
print $Macro->expand_delimited( $_, $ARGV ) if $_ ;
}

# Create a macro object and create initial macros/scripts from the file(s)
# given:
my $Macro = Text::MacroScript->new(
-file => [ 'local.macro', '~/.macro/global.macro' ]
) ;

# Create a macro object and create initial macros/scripts from the
# definition(s) given:
my $Macro = Text::MacroScript->new(
-macro => [
[ 'MAX_INT' => '32767' ],
],
-script => [
[ 'DHM2S' =>
[
my $s = (#0*24*60*60)+(#1*60*60)+(#2*60) ;
"#0 days, #1 hrs, #2 mins = $s secs"
],
],
-variable => [ '*MARKER*' => 0 ],
) ;

# We may of course use any combination of the options.

my $Macro = Text::MacroScript->new( -comment => 1 ) ; # Create the %%[] macro.

# define()

$Macro->define( -macro, $macroname, $macrobody ) ;

$Macro->define( -script, $scriptname, $scriptbody ) ;

$Macro->define( -variable, $variablename, $variablebody ) ;

# undefine()

$Macro->undefine( -macro, $macroname ) ;

$Macro->undefine( -script, $scriptname ) ;

$Macro->undefine( -variable, $variablename ) ;

# undefine_all()

$Macro->undefine( -macro ) ;

$Macro->undefine( -script ) ;

$Macro->undefine( -variable ) ;

# list()

@macros = $Macro->list( -macro ) ;
@macros = $Macro->list( -macro, -namesonly ) ;

@scripts = $Macro->list( -script ) ;
@scripts = $Macro->list( -script, -namesonly ) ;

@variables = $Macro->list( -variable ) ;
@variables = $Macro->list( -variable, -namesonly ) ;

# load_file() - always treats the contents as within delimiters if we are
# doing embedded processing.

$Macro->load_file( $filename ) ;

# expand_file() - calls expand_embedded() if we are doing embedded
# processing otherwise calls expand().

$Macro->expand_file( $filename ) ;
@expanded = $Macro->expand_file( $filename ) ;


# expand()

$expanded = $Macro->expand( $unexpanded ) ;
$expanded = $Macro->expand( $unexpanded, $filename ) ;

# expand_embedded()

$expanded = $Macro->expand_embedded( $unexpanded ) ;
$expanded = $Macro->expand_embedded( $unexpanded, $filename ) ;

This bundle also includes the macro and macrodir scripts which allows us to expand macros without having to use/understand Text::MacroScript.pm, although you will have to learn the handful of macro commands available and which are documented here and in macro. macro provides more documentation on the embedded approach.

The macroutil.pl library supplied provides some functions which you may choose to use in HTML work for example.. . C++, Qt, Python, and PyQt, training and consultancy
Similar software
ECMerge Pro (Linux) (Popularity: ) : ECMerge compares and merges local/FTP/SCC text/images/folders, side-by-side or 3-way. It is designed for software engineers, web authors and other professionals who work with multiple revisions of text files or who need to keep multiple folder hierarchies in sync. Two text ...
ECMerge Pro (Solaris) (Popularity: ) : ECMerge compares and merges files and folders, side-by-side or 3-way.
It is designed for software engineers, web authors and other professionals who work with multiple revisions of text files or who need to keep multiple folder hierarchies in sync. Two ...

ECMerge Standard (Solaris) (Popularity: ) : ECMerge compares and merges files and folders, side-by-side.
It is designed for software engineers, web authors and other professionals who work with multiple revisions of text files or who need to keep multiple folder hierarchies in sync. Define favourite comparisons ...

Movie Player Pro ActiveX OCX SDK (Popularity: ) : For Professional Windows Developers who need to provide video/audio media playback function within their business application.

Overlay text and bitmap on video in same time.
Multi-Line Scrolling text on video.
Support Mov, M4a, Mp4, 3gp, Divx, AVI, WMV, MPEG-1,RM(need RM ...

VideoCap Pro Video OCX ActiveX (Popularity: ) : Capture Video from capture card, tv tuner, dv cam, dvd player to AVI or WMV 9, WMV8 file format.
Draw overlay bitmap on live video or save to video file. User define transparent color, alpha value.
Draw overlay time stamp ...

HippoEDIT (Popularity: ) : HippoEDIT is professional Windows Text Editor for programmers and advanced users that speed ups text typing and source code analyzing by using smart and sophisticated features, that helping you be more productive and creative. It is lightweight, fast and highly ...
Text::TermExtract (Popularity: ) : Text::TermExtract is a Perl module to extract terms from text.

SYNOPSIS

use Text::TermExtract;

my $text = { Hey, hey, how's it going? Wanna go to Wendy's
tonight? Wendy's has great sandwiches." };

my $ext = Text::TermExtract->new();

for my $word ( $ext->terms_extract( ...

Scintilla (Popularity: ) : Scintilla is a free source code editing component. Scintilla comes with complete source code and a license that permits use in any free project or commercial product.

As well as features found in standard text editing components, Scintilla includes features especially ...

MYTUI (Popularity: ) : MYTUI is a TUI widget library based on curses. It is written in C and provides many ready-to-use widgets for rapid application development of text user interfaces. It is mainly delivered to develop UNIX-based applications. Basically a curses or ncurses ...
WebSweep for Linux (Popularity: ) : WebSweep is an HTML converter that will take any text file (or related) and it will transform it into a web page ready for web deployment.

WebSweep is an easy-to-use application that also has the possibility to detect and transform all ...

Text::TermExtract (Popularity: ) : Text::TermExtract is a Perl module to extract terms from text.

SYNOPSIS

use Text::TermExtract;

my $text = { Hey, hey, how's it going? Wanna go to Wendy's
tonight? Wendy's has great sandwiches." };

my $ext = Text::TermExtract->new();

for my $word ( $ext->terms_extract( ...

The Photomaniac Media Library (Popularity: ) : The Photomaniac Media Library provides a media management solution for digital photographers.

The Photomaniac Media Library is a media management solution for digital photographers who have to manage large amounts of digital media. Its strength is its native support for RAW ...

User reviews

Write a review:
1 2 3 4 5 6 7 8 9 10
1=poor 10=excellent
Write review*
Your name*
Email*
  (Comments are moderated, and will not appear on this site until the editor has approved them)
 
Rate me
supported os's
stats
downloads 6
version 1.38
size in Kb 31
popularity   
879/1272475
user rating 0/10
our rating 0 Stars
share info
Recommend Text::MacroScript
Report spyware
New Software
Popular Software
Latest Reviews