| Padre-Plugin-Filter documentation | view source | Contained in the Padre-Plugin-Filter distribution. |
[% IN %] and [% OUT %]
for the input and output filenames used in running the filter. Padre::Plugin::Shell::Filter - Unix-like external filters in Padre.
This plug-in enables the use of Unix-like external filtering commands/scripts to transform part or all of the current document.
The output of the filter can either replace the input, be appended to the input, or be inserted into a new document.
Unlike Unix filters, the filter mechanism in this plug-in is designed to use input and output files rather than STDIN and STDOUT.
Filter definitions are stored in a YAML formatted configuration file
in the user's Padre configuration directory (~/.padre).
Each filter is labeled with the name that is to be displayed in the
filter menu. In addition to the name there are four attributes for
each filter definition:
[% IN %] and [% OUT %]
for the input and output filenames used in running the filter.
To provide additional information for the filters, various environment variables are set prior to running the filter. These environment variables are covered in the Padre::Plugin::Shell::Base documentation.
Returns an example configuration. This is the initial configuration that gets created the first time that this plugin is used.
Searches the filter configuration for a filter definition that matches the supplied $filter_name. If a matching filter is found then that filter is run.
When adding entries to the configuration file it appears to be necessary to have an empty line at the end of the file in order for the configuration to properly load. No properly loaded configuration results in no menu for the plug-in.
Gregory Siems <gsiems@gmail.com>
Copyright (C) 2009 by Gregory Siems
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
| Padre-Plugin-Filter documentation | view source | Contained in the Padre-Plugin-Filter distribution. |