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