forked from Lainports/opnsense-ports
Taken from: https://github.com/freebsd/freebsd-ports.git Commit id: 5070672073b68be364139bc6b3a89100bd17d331
32 lines
639 B
Text
32 lines
639 B
Text
% This macro demonstrates the use of the post_filter_hook
|
|
% In your .slrnrc, add the line `interpret "/usr/local/share/examples/spellutils/aspell.sl"'
|
|
|
|
%static
|
|
define aspell_file (file)
|
|
{
|
|
variable cmd = "/usr/local/bin/newsbody -qs -k Subject -n '%s' -p /usr/local/bin/aspell -- -c -x %%f";
|
|
() = system (sprintf (cmd, file));
|
|
}
|
|
|
|
|
|
define post_filter_hook (file)
|
|
{
|
|
variable rsp;
|
|
variable cmd;
|
|
|
|
forever
|
|
{
|
|
rsp = get_response ("NnAa",
|
|
"Select Filter? \001None, \001Aspell");
|
|
|
|
switch (rsp)
|
|
{
|
|
case 'a' or case 'A':
|
|
aspell_file (file);
|
|
}
|
|
{
|
|
case 'n' or case 'N':
|
|
return;
|
|
}
|
|
}
|
|
}
|