Skip to content

Latest commit

 

History

History
454 lines (417 loc) · 34.7 KB

quickref.md

File metadata and controls

454 lines (417 loc) · 34.7 KB

Macro() BETA Quick Reference

Functional Groupings

key: built-in (options) required content

HTML Text Styling  
[p content] HTML paragraph
[bq content] HTML blockquote
[b content] HTML bold
[i content] HTML italics
[u content] HTML underline
[color HEX3|HEX6 content] HTML text color
HTML Linking  
[a (tab,)URL(,linkedContent)] HTML link
[urlencode content] URL encoding
[url (sep=|,)(css=CSS,)(tgt=_target,)(nam=Name,)(URLsepLINKED_CONTENT)] Create URL
HTML Images  
[img (imageTitle,)imageURL (linkURL)] HTML image
[limg (target=,)(lpath=,)(wpath=)(title=,)(alt=,)imageName] HTML image name, figures size (uses [lipath],[wepath])
[lipath filePathToImages] path for [locimg]
[wepath webPathToImages] path for [locimg]
HTML Lists  
[ul (istyle=hstyle,)(lstyle=hstyle,)(wrap=style,)(sep=X,)itemContent(XitemContent)] HTML unordered list
[ol (type=X,)(start=N,)(istyle=hstyle,)(lstyle=hstyle,)(wrap=style,)(sep=X,)itemContent(XitemContent)] HTML ordered list
[iful (istyle=hstyle,)(lstyle=hstyle,)(wrap=style,)(sep=X,)itemContent(XitemContent)] HTML unordered list IF > one item
[ifol (istyle=hstyle,)(lstyle=hstyle,)(wrap=style,)(sep=X,)itemContent(XitemContent)] HTML ordered list IF > one item
[t (wrap=style,)(sep=X,)itemContent(XitemContent)] style wrap around item(s)
HTML Tables  
[table (options),content] HTML table (comma is not optional)
[row (options),content] HTML table row (comma is not optional)
[header (options),content] HTML table header cell (comma is not optional)
[cell (options),content] HTML table data cell (comma is not optional)
Variables  
[local varname varContent] local variable definition
Variables  
[raw varname varContent] local variable definition
[global varName varContent] global variable definition
[graw varName varContent] global variable definition
[v varName] local/global variable
[vs varName varContent] local variable definition
[gv varName] global variable
[lv varName] local variable
[vinc (pre=1,)(quiet=1,)varName] increment local(global) variable
[vdec (pre=1,)(quiet=1,)varName] decrement local(global) variable
[load varName fileName] load file into local variable
[gload varName fileName] load file into global variable
[save varName fileName] save file from local variable
[gsave varName fileName] save file from global variable
Data Lists  
[list (sep=X,)listname,itemContent(XitemContent)] create or overwrite a list
[clearl listName] Discards list content
[lcopy sourceList destinationList] copy list to new or existing list
[ltol listName content] convert lines of content to list
[append listName,itemContent] append an item to a list (can create new list)
[lpush listName,itemContent] append an item to a list (can create new list)
[lpop listName,(listIndex)] pop an item out of a list at top, or at listIndex
[lset **listName,****listIndex,**itemContent] Set a list item
[llen listName] returns length of list
[lslice **sliceSpec,****listName,**targetList] slice listName to targetList
[lsplit (sep=^,)(num=N,)listName,content] split content into list
[ljoin listName,(joinTerm)] Join a list with joinTerm(s) between elements
[dlist (fs=styleName,)(ls=styleName,)(wrap=styleName,)(parms=PRE,)(inter=INT,)(ntl=NTL,)(posts=PST,)listName] dump a list
[e **listName,**listIndex] output item from list of length n (listIndex = 0 to n-1)
[lcc **listOne,****listTwo,**listResult] list concatenate
[lsub (ci=1,)(sep=X,)**listName,**content] list of form AsepB, A=B in content
[asort (rev=1,)listName] ASCII alphabetic sort of list, in place
[aisort (rev=1,)listName] ASCII case-insensitive sofr of list, in place
[isort (rev=1,)(sep=X,)listName] sort by leading integer, sep defaults to ","
[lhsort (rev=1,)listName] sort list by leading amateur radio callsign,, any non-alphanumeric sep
[cmap listName] create 1:1 character map
[hmap listName] create 1:1 character map to hex values
[translate (pre=PRE,)(post=POST,)(inter=INTER,)**listName,**content] translate content using character map formatted list
[postparse content] pretty-print Python 2.7 code (use black background)
[pythparse content] pretty-print Python 2.7 code (use black background)
[getc (var=varName,)(high=lang,)(tabsiz=n,)(tabchar=X,)filename] import c or oc source file as aa_macro
Data Dictionaries  
[dict (sep=X,)(keysep=Y,)dictName,****keyYvalue(XkeyYvalue)] create/replace dictionary
[dcopy **sourceDictionary,**destinationDictionary] copy/replace destination with source
[dkeys **sourceDictionary,**destinationList] create a list of keys from source
[dset (keysep=Y,)**dictName,**keyYvalue] create/replace dictionary item
[d (sep=X,)dictName****Xkey(XnotFound)] retrieve a dictionary value using key
General Stack  
[push content] Push an item on to the general stack
[pop] Pop an item off the top of the general stack
[fetch itemIndex] fetch any item from stack - 0 is top of stack
[flush] delete stack contents
Math  
[int value] integer of number
[round (digits=decplaces,)value] rounded value of number
[abs value] absolute value of number
[add (mode=float,)value addend] add two numbers
[sub (mode=float,)value subtrahend] subtract two numbers
[mul (mode=float,)value multiplier] multiply two numbers
[div (mode=float,)value divisor] divide two numbers
[max value1 value2] maximum of two numbers
[min value1 value2] minimum of two numbers
[inc value] add one to value
[dec value] subtract one from value
[random (seed=none,(icount=N,))] generate random from 0.0-1.0
[stage (mode=float,)(digits=N,)start end steps step] subtract one from value
Conditional Content  
[even value content] if value is even, then content
[odd value content] if value is odd, then content
[if (sep=X,)(wrap|style=styleName)value match content] if match, then content
[else (sep=X,)(wrap|style=styleName)value match content] if not match, then content
[ne (sep=X,)**value,**content] if value is empty, then content
[eq (sep=X,)**value,**content] if value is not empty, then content
[ifle **value1,****value2 ,**content] if value1 <= value2, then content
[ifge **value1,****value2 ,**content] if value1 >= value2, then content
Text Processing  
[slice sliceSpec,content] slice content
[alphalead (trail=1,)content] Return leading alpha characters, or trailing content
[alphanumlead (trail=1,)content] Return leading alphanumeric characters, or trailing content
[splitcount value] Maximum number of splits to perform in next [split]
[split **X,**content(Xcontent)] split for use with [parm]
[splash (pre=,)(post=,)(inter=,)(ntl=,)(limit=N,)(style=Style,)(sep=,,)content] splits content, applies style
[parm value] returns results of [split]
[upper content] convert to uppercase
[lower content] convert to lowercase
[soundex (len=N,)content] return soundex value of content
[stripe (charset=chars,)content] strip chars from both ends of line (default = spaces)
[strip content] strip HTML tags out
[roman value] returns lower case roman numeral
[dtohex (digits=N,)value] decimal to hexadecimal conversion
[dtooct (digits=N,)value] decimal to octal conversion
[dtobin (digits=N,)value] decimal to binary conversion
[htodec (digits=N,)value] hexadecimal to decimal conversion
[otodec (digits=N,)value] octal to decimal conversion
[btodec (digits=N,)value] binary to decimal conversion
[crush ,] return packed alphanumerics
[collapse content]
[crop (words=no,)(eol=,)(neol=,)(col=78,)content]
[wwrap (eol=X,)(wrap=style,)(nohtml=1,)**value,**content] word wrap content at column value
[len content] return length of content in characters
[wc content] return length of content in words
[lc content] return length of content in lines
[chr value] return ASCII character of code=value
[ord character] return ASCII code value in decimal
[csep value] comma-separate an integer
[fcsep value] comma-separate a floating point number
[dup value,content] duplicate content after evaluation (also see [repeat])
[eval (style=styleName,)value,content] duplicate content Nx, eval style Nx if provided
[find (sep=X,)stringXcontent] find string in content, sep default = ","
[replace (sep=X,(lf=1,))targetXreplacementXcontent] target replaced with replacement in content
[count (sep=X,)(overlaps=yes,)(casesens=yes,)patternXcontent] count incidences
[caps content] sentence case
[capw content] word case
[capt content] title case
[expand **dictName,**content] dictionary based keyword expansion with leading cap forwarding
[ssort (rev=1,)content] case-sensitive sort of lines
[sisort (rev=1,)content] case-insensitive sort of lines
[issort (rev=1,)content] sort of lines by integer followed by a comma
[hsort (rev=1,)content] sort of lines by amatuer radio callsign followed by non-alphanumeric
[inter **iStr,****L|R,****value,**content] intersperse iStr every value in content
[rjust **width,****padChar,**content] right justify
[ljust **width,****padChar,**content] left justify
[center **width,****padChar,**content] center (neg width indicates pad both sides)
[th integer] st, nd, rd, th...
[nd integer] 1st, 2nd, 3rd, 4th...
[encrypt (mode=1,)(again=1,)(seed=N,)(salt=String,)(icount=N,)(breakat=N,)content] (re)Encrypt content
[decrypt (mode=1,)(seed=N,)(salt=String,)(icount=N,)content] Decrypt content
[br (parms,)(content)] (content) HTML line break (with parms)
Miscellanea  
[sys shellCommand] invoke an operating system command. Output is captured
[date] The date of macro() processing (use CGI for live date in HTML)
[ddelta YYYYMMDD YYYYMMDD] difference between dates in Y M D
[time (mode=12|24,)(sfx=auto|*,)(asfx=,)(psfx=,)] The time of macro() processing (use CGI for live time in HTML)
[datetime] The datetime of macro() processing (use CGI for live date in HTML)
[ampm N] AM or PM from 12 hour number
[term (astyle=CSSSTYLE,)CAPSTERM] if acroclass.py and acrobase.txt present, expand term
[twelve N] 12 hour number from 24
[month (mode=long,)N] Month name from ordinal
[include fileName] include macro() source file
[embrace moduleName] add, extend, or replace macro() functionality
[repeat **value,**content] repeat content, evaluating content each time
[comment content] suppress output. note: non-content operations still process
[back HEX3|HEX6] HTML background text color for HTML 4.01s mode only
[mode 3.2|4.01s] set HTML mode
[hlit (format=1,)content] places LITERAL content in local variable loc_hlit
[vlit (format=1,)variable-name] places LITERAL content in local variable loc_vlit
[slit (format=1,)(wrap=1,)style-name] places LITERAL content in local variable loc_slit
Escapes  
[co] comma
[sp] space
[gt] greater-than
[lt] less-than
[lb] left square bracket
[rb] right square bracket
[ls] left squiggly bracket
[rs] right squiggly bracket
[lf|nl] new line
Styles  
[style (help=helpstring,)(help2=helpstring,)styleName styleContent] local style
[gstyle (help=helpstring,)(help2=helpstring,)styleName styleContent] global style
[helps styleName] return help string for local style
[helpg styleName] return help string for global style
[helps2 styleName] return help string 2 for local style
[helpg2 styleName] return help string 2 for global style
[for styleName,X,Y,Z] iterates number to style
[in styleName,listName] iterates list to style
[switch (csep=X,)(isep=Y,)switchName caseYstylename(XcaseYstyleName)] switch (works with case)
[case (sep=X,)switchName caseXcontent] case (works with switch)
[s (sep=X,)stylename(styleParameters)] invoke style(s), local, if no local, then global
[glos (sep=X,)stylename(styleParameters)] invoke global style(s)
[locs (sep=X,)stylename(styleParameters)] invoke local style(s)
[spage] reset local styles to none
[ghost (source=global|local,)stylename] output style without processing it
[fref lable] forward (or backward) reference
[resolve (hex=1,)**lable,**content] resolve reference
[listg (mode=global] local,)**listName,**content

Alphabetical Order

key: built-in (options) required content

Built-in  
[a (tab,)URL(,linkedContent)] HTML link
[abs value] absolute value of number
[add (mode=float,)value addend] add two numbers
[aisort (rev=1,)listName] ASCII case-insensitive sofr of list, in place
[alphalead (trail=1,)content] Return leading alpha characters, or trailing content
[alphanumlead (trail=1,)content] Return leading alphanumeric characters, or trailing content
[ampm N] AM or PM from 12 hour number
[append listName,itemContent] append an item to a list (can create new list)
[asort (rev=1,)listName] ASCII alphabetic sort of list, in place
[b content] HTML bold
[back HEX3|HEX6] HTML background text color for HTML 4.01s mode only
[bq content] HTML blockquote
[br (parms,)(content)] (content) HTML line break (with parms)
[btodec (digits=N,)value] binary to decimal conversion
[caps content] sentence case
[capt content] title case
[capw content] word case
[case (sep=X,)switchName caseXcontent] case (works with switch)
[cell (options),content] HTML table data cell (comma is not optional)
[center **width,****padChar,**content] center (neg width indicates pad both sides)
[chr value] return ASCII character of code=value
[clearl listName] Discards list content
[cmap listName] create 1:1 character map
[collapse content]
[color HEX3|HEX6 content] HTML text color
[comment content] suppress output. note: non-content operations still process
[count (sep=X,)(overlaps=yes,)(casesens=yes,)patternXcontent] count incidences
[co] comma
[crop (words=no,)(eol=,)(neol=,)(col=78,)content]
[crush ,] return packed alphanumerics
[csep value] comma-separate an integer
[d (sep=X,)dictName****Xkey(XnotFound)] retrieve a dictionary value using key
[datetime] The datetime of macro() processing (use CGI for live date in HTML)
[date] The date of macro() processing (use CGI for live date in HTML)
[dcopy **sourceDictionary,**destinationDictionary] copy/replace destination with source
[ddelta YYYYMMDD YYYYMMDD] difference between dates in Y M D
[dec value] subtract one from value
[decrypt (mode=1,)(seed=N,)(salt=String,)(icount=N,)content] Decrypt content
[dict (sep=X,)(keysep=Y,)dictName,****keyYvalue(XkeyYvalue)] create/replace dictionary
[div (mode=float,)value divisor] divide two numbers
[dkeys **sourceDictionary,**destinationList] create a list of keys from source
[dlist (fs=styleName,)(ls=styleName,)(wrap=styleName,)(parms=PRE,)(inter=INT,)(ntl=NTL,)(posts=PST,)listName] dump a list
[dset (keysep=Y,)**dictName,**keyYvalue] create/replace dictionary item
[dtobin (digits=N,)value] decimal to binary conversion
[dtohex (digits=N,)value] decimal to hexadecimal conversion
[dtooct (digits=N,)value] decimal to octal conversion
[dup value,content] duplicate content after evaluation (also see [repeat])
[e **listName,**listIndex] output item from list of length n (listIndex = 0 to n-1)
[else (sep=X,)(wrap|style=styleName)value match content] if not match, then content
[embrace moduleName] add, extend, or replace macro() functionality
[encrypt (mode=1,)(again=1,)(seed=N,)(salt=String,)(icount=N,)(breakat=N,)content] (re)Encrypt content
[eq (sep=X,)**value,**content] if value is not empty, then content
[eval (style=styleName,)value,content] duplicate content Nx, eval style Nx if provided
[even value content] if value is even, then content
[expand **dictName,**content] dictionary based keyword expansion with leading cap forwarding
[fcsep value] comma-separate a floating point number
[fetch itemIndex] fetch any item from stack - 0 is top of stack
[find (sep=X,)stringXcontent] find string in content, sep default = ","
[flush] delete stack contents
[for styleName,X,Y,Z] iterates number to style
[fref lable] forward (or backward) reference
[getc (var=varName,)(high=lang,)(tabsiz=n,)(tabchar=X,)filename] import c or oc source file as aa_macro
[ghost (source=global|local,)stylename] output style without processing it
[gload varName fileName] load file into global variable
[global varName varContent] global variable definition
[glos (sep=X,)stylename(styleParameters)] invoke global style(s)
[graw varName varContent] global variable definition
[gsave varName fileName] save file from global variable
[gstyle (help=helpstring,)(help2=helpstring,)styleName styleContent] global style
[gt] greater-than
[gv varName] global variable
[header (options),content] HTML table header cell (comma is not optional)
[helpg styleName] return help string for global style
[helpg2 styleName] return help string 2 for global style
[helps styleName] return help string for local style
[helps2 styleName] return help string 2 for local style
[hlit (format=1,)content] places LITERAL content in local variable loc_hlit
[hmap listName] create 1:1 character map to hex values
[hsort (rev=1,)content] sort of lines by amatuer radio callsign followed by non-alphanumeric
[htodec (digits=N,)value] hexadecimal to decimal conversion
[i content] HTML italics
[if (sep=X,)(wrap|style=styleName)value match content] if match, then content
[ifge **value1,****value2 ,**content] if value1 >= value2, then content
[ifle **value1,****value2 ,**content] if value1 <= value2, then content
[ifol (istyle=hstyle,)(lstyle=hstyle,)(wrap=style,)(sep=X,)itemContent(XitemContent)] HTML ordered list IF > one item
[iful (istyle=hstyle,)(lstyle=hstyle,)(wrap=style,)(sep=X,)itemContent(XitemContent)] HTML unordered list IF > one item
[img (imageTitle,)imageURL (linkURL)] HTML image
[in styleName,listName] iterates list to style
[inc value] add one to value
[include fileName] include macro() source file
[int value] integer of number
[inter **iStr,****L|R,****value,**content] intersperse iStr every value in content
[isort (rev=1,)(sep=X,)listName] sort by leading integer, sep defaults to ","
[issort (rev=1,)content] sort of lines by integer followed by a comma
[lb] left square bracket
[lc content] return length of content in lines
[lcc **listOne,****listTwo,**listResult] list concatenate
[lcopy sourceList destinationList] copy list to new or existing list
[len content] return length of content in characters
[lf|nl] new line
[lhsort (rev=1,)listName] sort list by leading amateur radio callsign,, any non-alphanumeric sep
[limg (target=,)(lpath=,)(wpath=)(title=,)(alt=,)imageName] HTML image name, figures size (uses [lipath],[wepath])
[lipath filePathToImages] path for [locimg]
[list (sep=X,)listname,itemContent(XitemContent)] create or overwrite a list
[listg (mode=global] local,)**listName,**content
[ljoin listName,(joinTerm)] Join a list with joinTerm(s) between elements
[ljust **width,****padChar,**content] left justify
[llen listName] returns length of list
[load varName fileName] load file into local variable
[local varname varContent] local variable definition
[locs (sep=X,)stylename(styleParameters)] invoke local style(s)
[lower content] convert to lowercase
[lpop listName,(listIndex)] pop an item out of a list at top, or at listIndex
[lpush listName,itemContent] append an item to a list (can create new list)
[lset **listName,****listIndex,**itemContent] Set a list item
[lslice **sliceSpec,****listName,**targetList] slice listName to targetList
[lsplit (sep=^,)(num=N,)listName,content] split content into list
[lsub (ci=1,)(sep=X,)**listName,**content] list of form AsepB, A=B in content
[ls] left squiggly bracket
[ltol listName content] convert lines of content to list
[lt] less-than
[lv varName] local variable
[max value1 value2] maximum of two numbers
[min value1 value2] minimum of two numbers
[mode 3.2|4.01s] set HTML mode
[month (mode=long,)N] Month name from ordinal
[mul (mode=float,)value multiplier] multiply two numbers
[nd integer] 1st, 2nd, 3rd, 4th...
[ne (sep=X,)**value,**content] if value is empty, then content
[odd value content] if value is odd, then content
[ol (type=X,)(start=N,)(istyle=hstyle,)(lstyle=hstyle,)(wrap=style,)(sep=X,)itemContent(XitemContent)] HTML ordered list
[ord character] return ASCII code value in decimal
[otodec (digits=N,)value] octal to decimal conversion
[p content] HTML paragraph
[parm value] returns results of [split]
[pop] Pop an item off the top of the general stack
[postparse content] pretty-print Python 2.7 code (use black background)
[push content] Push an item on to the general stack
[pythparse content] pretty-print Python 2.7 code (use black background)
[random (seed=none,(icount=N,))] generate random from 0.0-1.0
[raw varname varContent] local variable definition
[rb] right square bracket
[repeat **value,**content] repeat content, evaluating content each time
[replace (sep=X,(lf=1,))targetXreplacementXcontent] target replaced with replacement in content
[resolve (hex=1,)**lable,**content] resolve reference
[rjust **width,****padChar,**content] right justify
[roman value] returns lower case roman numeral
[round (digits=decplaces,)value] rounded value of number
[row (options),content] HTML table row (comma is not optional)
[rs] right squiggly bracket
[s (sep=X,)stylename(styleParameters)] invoke style(s), local, if no local, then global
[save varName fileName] save file from local variable
[sisort (rev=1,)content] case-insensitive sort of lines
[slice sliceSpec,content] slice content
[slit (format=1,)(wrap=1,)style-name] places LITERAL content in local variable loc_slit
[soundex (len=N,)content] return soundex value of content
[spage] reset local styles to none
[splash (pre=,)(post=,)(inter=,)(ntl=,)(limit=N,)(style=Style,)(sep=,,)content] splits content, applies style
[split **X,**content(Xcontent)] split for use with [parm]
[splitcount value] Maximum number of splits to perform in next [split]
[sp] space
[ssort (rev=1,)content] case-sensitive sort of lines
[stage (mode=float,)(digits=N,)start end steps step] subtract one from value
[strip content] strip HTML tags out
[stripe (charset=chars,)content] strip chars from both ends of line (default = spaces)
[style (help=helpstring,)(help2=helpstring,)styleName styleContent] local style
[sub (mode=float,)value subtrahend] subtract two numbers
[switch (csep=X,)(isep=Y,)switchName caseYstylename(XcaseYstyleName)] switch (works with case)
[sys shellCommand] invoke an operating system command. Output is captured
[t (wrap=style,)(sep=X,)itemContent(XitemContent)] style wrap around item(s)
[table (options),content] HTML table (comma is not optional)
[term (astyle=CSSSTYLE,)CAPSTERM] if acroclass.py and acrobase.txt present, expand term
[th integer] st, nd, rd, th...
[time (mode=12|24,)(sfx=auto|*,)(asfx=,)(psfx=,)] The time of macro() processing (use CGI for live time in HTML)
[translate (pre=PRE,)(post=POST,)(inter=INTER,)**listName,**content] translate content using character map formatted list
[twelve N] 12 hour number from 24
[u content] HTML underline
[ul (istyle=hstyle,)(lstyle=hstyle,)(wrap=style,)(sep=X,)itemContent(XitemContent)] HTML unordered list
[upper content] convert to uppercase
[url (sep=|,)(css=CSS,)(tgt=_target,)(nam=Name,)(URLsepLINKED_CONTENT)] Create URL
[urlencode content] URL encoding
[v varName] local/global variable
[vdec (pre=1,)(quiet=1,)varName] decrement local(global) variable
[vinc (pre=1,)(quiet=1,)varName] increment local(global) variable
[vlit (format=1,)variable-name] places LITERAL content in local variable loc_vlit
[vs varName varContent] local variable definition
[wc content] return length of content in words
[wepath webPathToImages] path for [locimg]
[wwrap (eol=X,)(wrap=style,)(nohtml=1,)**value,**content] word wrap content at column value