Witty
Witty is the template engine for the HareScript language.
Witty integrates seamlessly into the HareScript language, fully supporting its data-centric approach to web scripting and helps eliminate common encoding and programming errors.
Witty API
- BLOB FUNCTION ApplyOverlayToPDF(BLOB inputpdf, BLOB overlaypdf)Overlay one PDF on top of another 
- BLOB FUNCTION ConcatenatePDFs(BLOB ARRAY pdfs)Concatenate PDFs together 
- MACRO EmbedWittyComponent(STRING component, RECORD data)Runs an embedded component 
- RECORD ARRAY FUNCTION ExportPDFToImages(BLOB inpdf)Export each page of the PDF to an image 
- RECORD FUNCTION GenerateBrowserScreenshot(STRING url, RECORD options)
- RECORD FUNCTION GeneratePDF(RECORD data, RECORD options)Generate a PDF from a witty record 
- RECORD FUNCTION GeneratePDFFromURL(STRING link, RECORD options)Generate a PDF from a URL 
- RECORD FUNCTION GetEmailAutocorrection(STRING email)Suggest improvement to given suggestion 
- VARIANT FUNCTION GetWittyVariable(STRING variablename)Get a variable using the witty's lookup rules 
- BOOLEAN FUNCTION IsSupportedMailingType(STRING mimetype)Checks if the type of mailing is supported by GenerateHTMLMail 
- OBJECT FUNCTION LoadWittyLibrary(STRING name, STRING encoding)
- OBJECTTYPE MailAssetCacheBase
- OBJECT FUNCTION PrepareMailWitty(STRING mailwitty, RECORD options)Set up a witty for mailing 
- BOOLEAN FUNCTION QueueMail(STRING origin, STRING ARRAY receivers, STRING sender, RECORD ARRAY mimeheaders, RECORD toppart)This function puts a message in the WebHare mail queue, and send it to the standard mail server 
- INTEGER ARRAY FUNCTION QueueMailInWork(STRING origin, STRING ARRAY receivers, STRING sender, RECORD ARRAY mimeheaders, RECORD toppart, RECORD options)This function puts a message in the WebHare mail queue in the current work, and send it to the standard mail server 
- BOOLEAN FUNCTION QueueSimpleMail(STRING origin, STRING mailfrom, STRING ARRAY mailto, STRING ARRAY mailcc, STRING ARRAY mailbcc, STRING subject, STRING messagetext, RECORD ARRAY attachments, BOOLEAN text_is_html)Simple mail send function 
- MACRO RestructureEmailForCompatibility(OBJECT dom)make changes to the DOM to increase compatibility with email clients such as Outlook 
- OBJECTTYPE WittyExceptionBase class for Witty exceptions 
- OBJECTTYPE WittyMailComposerEmail composer returned by PrepareMailWitty 
- OBJECTTYPE WittyParseExceptionException throw when Witty parsing errors are found 
- OBJECTTYPE WittyRuntimeExceptionException throw when a Witty runtime exception occurs 
- OBJECTTYPE WittyTemplateContains a Witty template