Filter files: Difference between revisions

From SuperMemo 18 Help
Jump to navigation Jump to search
Initial import
 
Brainious (talk | contribs)
Line 9: Line 9:


Filter files are text files than can be edited manually. They are made of sections such as ''[REPLACE]'', ''[DELIMITERS]'', ''[CUT]'', etc. Each section contains a list of arguments placed in separate lines. For example, the ''[REPLACE]'' section will contain pairs of strings: strings to be replaced and string to be put in place of replaced strings.
Filter files are text files than can be edited manually. They are made of sections such as ''[REPLACE]'', ''[DELIMITERS]'', ''[CUT]'', etc. Each section contains a list of arguments placed in separate lines. For example, the ''[REPLACE]'' section will contain pairs of strings: strings to be replaced and string to be put in place of replaced strings.
* ''specify the complete list of sections available in Filter files (above its stated a short list, that looks more like an example, no the complete list)''
* ''complete list of arguments for each section must be provided as well''


This is an exemplary contents of a filter file:
This is an exemplary contents of a filter file:
Line 17: Line 21:


</blockquote>
</blockquote>
* ''Example has not comments of what each section and parameter will accomplish''


If you open the text registry with '''[[Search menu | Search]] : Texts''', choose '''Apply filter''' on the [[registry menu]] and select such a file, the following changes will be made to texts throughout the collection:  
If you open the text registry with '''[[Search menu | Search]] : Texts''', choose '''Apply filter''' on the [[registry menu]] and select such a file, the following changes will be made to texts throughout the collection:  

Revision as of 10:24, 10 March 2010

Filter files with the extension flt can be used in SuperMemo to globally process texts in the collection. For example, it is more convenient to do multiple replace text operations with filters that to do it manually with Find and replace on the registry menu.

Filter files support the filter file specification from SuperMemo 6 and SuperMemo 7; however, you will mostly want to use them in the following circumstances:

  1. replacing a large number of texts with selected strings in the collection
  2. removing comments and other delimited texts from the collection

Other options are supported for compatibility only and are better accomplished with other functions of the program.

Filter files are text files than can be edited manually. They are made of sections such as [REPLACE], [DELIMITERS], [CUT], etc. Each section contains a list of arguments placed in separate lines. For example, the [REPLACE] section will contain pairs of strings: strings to be replaced and string to be put in place of replaced strings.

  • specify the complete list of sections available in Filter files (above its stated a short list, that looks more like an example, no the complete list)
  • complete list of arguments for each section must be provided as well

This is an exemplary contents of a filter file:

[DELIMITERS]
< > cut
{ } cut
[REPLACE]
histol: histology:
physiol: physiology:
mem: ''
endocr: ''

  • Example has not comments of what each section and parameter will accomplish


If you open the text registry with Search : Texts, choose Apply filter on the registry menu and select such a file, the following changes will be made to texts throughout the collection:

  1. all texts delimited with angle brackets will be removed
  2. all texts delimited with braces will be removed
  3. texts like histol: and physiol: will be replaced with histology: and physiology: respectively
  4. texts like mem: and endocr: will be removed

You can also use filters with Edit : Edit text : Apply filter

Filter files are by defaults stored in the FILTERS subfolder