Skip to main content

substitute_printfile

Function substitute_printfile 

Source
pub fn substitute_printfile(template: &str, data: &PrintfileData<'_>) -> String
Expand description

Perform original hypermail printfile()-style %x substitution on a template string.

Supported escapes:

  • %%%
  • \n → newline, \t → tab
  • %~ → output directory
  • %a → other-archives URL
  • %b → about-archive URL
  • %c → charset <meta> tag
  • %D → date <meta name="Date"> tag (message pages only)
  • %e → author email address
  • %f → filename
  • %g → current date/time string
  • %G → two-letter language code
  • %h → hypermail homepage URL
  • %i → Message-ID
  • %l → archive label
  • %m → mailto address
  • %p → program name
  • %s → subject (HTML-escaped)
  • %S → subject <meta name="Subject"> tag (message pages only)
  • %A → author <meta name="Author"> tag (message pages only)
  • %t → relative path to top-level index
  • %v → version string
  • %u → expanded version link <a href=...>progname version</a>