User Tools

Site Tools


action:Filter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
action:Filter [2018/03/26 20:07]
JMichaelTX
action:Filter [2019/08/21 21:36]
JMichaelTX ADD KM9 note for Percent encode URL
Line 11: Line 11:
 The filters are: The filters are:
  
-  ​* Remove Styles. +* Remove Styles ​(ie, make the clipboard plain text – not applicable to variables)
-  * Set line endings to Mac, Unix or Windows/​DOS. +* Set line endings to Mac, Unix or Windows/​DOS. 
-  * Trim Whitespace. +* Trim Whitespace. 
-  * Hard wrap or unwrap paragraphs. +* Hard wrap or unwrap paragraphs. 
-  * Lowercase (all characters),​ Lowercase First (just the first character). +* Lowercase (all characters),​ Lowercase First (just the first character). 
-  * Uppercase (all characters),​ Uppercase First (just the first character). +* Uppercase (all characters),​ Uppercase First (just the first character). 
-  * Capitalize (all words) or Title Case (intelligently uppercase certain first letters). +* Capitalize (all words) or Title Case (intelligently uppercase certain first letters). 
-  * Change quotes to Smart, Dumb or French quotation marks. +* Change quotes to Smart, Dumb or French quotation marks. 
-  * Encode HTML or non-ASCII HTML entities. +* Encode HTML or non-ASCII HTML entities. 
-  * Decode HTML entities. +* Decode HTML entities. 
-  * Generate an HTML list. +* Generate an HTML list. 
-  * Percent Encode or Decode ​for a URL. +* Percent Encode or Decode a URL. 
-  * Quote for ApplescriptJavascript, Shell Script or Swift. +  ​* As of Ver 9.0:  Percent Encode for URL will encode all non-alphanumeric characters. 
-  Get or delete ​the last path component ​or the path extension+* Quote for AppleScriptJavaScript, Shell (bash) ​Scriptor Swift. 
-  * Get the basename of the path (ie the name without directory or extension). +Convert a JSON object string to Compact ​or Pretty format (v9.0+). 
-  * Expand tilde (~) paths, or abbreviate with a tilde. +* Get the filename ​component ​of a path. 
-  * Resolve symlinks, or standardize the path. +* Get parent of a path. 
-  * Delete or bullet (•) control characters. +* Get the basename of the path (ie the name without directory or extension). 
-  * Calculate an expression and return the result, see the Calculations section. +* Get or delete the path extension. 
-  * Process Text Tokens and return the result, see the [[:Tokens|Text Tokens section]]. +* Get the display name of a path (v9.0+). 
-  * Get the value of a named Variable or Named Clipboard. +* Expand tilde (~) paths, or abbreviate with a tilde. 
-  * Count the characters, words or lines and return the result.+* Resolve symlinks, or standardize the path. 
 +* Delete or bullet (•) control characters. 
 +* Calculate an expression and return the result, see the [[manual:Calculations]] section. 
 +* Process Text Tokens and return the result, see the [[manual:​Tokens]] ​section
 +* Get the value of a named Variable or Named Clipboard. 
 +* Count the characters, words or lines and return the result.
  
 Select where the result should go - back to the source or to a clipboard, variable or file. Prior to v8.0 the result was always saved back to the source. Select where the result should go - back to the source or to a clipboard, variable or file. Prior to v8.0 the result was always saved back to the source.
Line 43: Line 48:
  
 is roughly equivalent to the Uppercase filter, for the System Clipboard, except that it only works with ASCII characters. is roughly equivalent to the Uppercase filter, for the System Clipboard, except that it only works with ASCII characters.
 +
 +Note that the definition of what a character, word, or line is is more than a little ambiguous, so if you have strict requirements for your definition you will need to calculate it yourself to ensure you get the answer you require. ​ For example, the line count will return the number of lines, with a minimum of one, which will not necessarily be the same as the number of end-of-line characters, and the number of characters may or may not count multi-plane unicode characters as one character, and we wont even attempt to define what is and isn’t a single word.
  
 ===== See Also ===== ===== See Also =====
  
----- +==== Actions ​====
- +
-=== Actions ===+
  
 +* [[Get File Attribute]]
 +* [[Set File Attribute]]
 * [[:​Actions|See all Actions]] * [[:​Actions|See all Actions]]
- 
----- 
  
 ==== Forum ==== ==== Forum ====
Line 58: Line 63:
 - [[https://​forum.keyboardmaestro.com/​t/​potential-bug-with-titlecase-or-new-user-error/​2235/​3|Potential bug with Titlecase (or new user error)]] - [[https://​forum.keyboardmaestro.com/​t/​potential-bug-with-titlecase-or-new-user-error/​2235/​3|Potential bug with Titlecase (or new user error)]]
 - [[https://​forum.keyboardmaestro.com/​t/​search-and-replace-paragraph-mark-in-clipboard-text/​2310|Search and replace paragraph mark in clipboard text?]] - [[https://​forum.keyboardmaestro.com/​t/​search-and-replace-paragraph-mark-in-clipboard-text/​2310|Search and replace paragraph mark in clipboard text?]]
 +- [[https://​forum.keyboardmaestro.com/​t/​filter-action-line-count-behaviour-is-odd/​11679/​11|Filter Action (Line Count) behaviour is odd]]
 - [[https://​forum.keyboardmaestro.com/​t/​create-a-macro-to-strip-html-tags-from-text/​2918/​5|Create a macro to strip HTML tags from text]] - [[https://​forum.keyboardmaestro.com/​t/​create-a-macro-to-strip-html-tags-from-text/​2918/​5|Create a macro to strip HTML tags from text]]
 - [[https://​forum.keyboardmaestro.com/​t/​replace-special-characters-with-html-entities/​3378/​9|Replace special characters with HTML Entities?]] - [[https://​forum.keyboardmaestro.com/​t/​replace-special-characters-with-html-entities/​3378/​9|Replace special characters with HTML Entities?]]
action/Filter.txt · Last modified: 2022/12/28 18:16 by ccstone