FNamer 
FNamer helps a desktop user to get a valid file/directory name into the system clipboard by selecting a text from a document. FNamer is especially useful to Web surfers. It avoids the requirement of manually editing such names in order to be Joliet compliant.
Note: This version is different from FNamerDrag; it can work with document browsers that do not provide the drag feature, such as the Windows Notepad, the DOS box and many dialog fields. Otherwise, FNamerDrag is faster and more convenient. Both metascripts, however, use exactly the same underlying script: FNamer.py.
Motivation
To save a Web page locally in your computer, using the Internet Explorer, you do the Save As menu command. A Save Web Page dialog appears with a default file name. The default value is often inappropriate for your use and liking. You often need to edit it manually.
You might use the System clipboard. You copy a text fragment from that viewed Web page with the intent of using this text as a more appropriate file name. You simply copy that text into the File name field of the Save Web Page dialog. The problem is that such text might contain invalid characters for a file name. Again, you need to edit it manually.
With D&Do however; it is as if you have an intelligent system clipboard. It will validate the proposed file name and correct it for you. If you have to provide validated names for hundreds of Web pages, D&Do can save you hours.
Description
Overview
A text fragment should be captured into the system clipboard. Once the target area is clicked, FNamer will modify the text into a valid Joliet compliant file name. It will then put it into the system clipboard. The variant specifies how the dropped text will be modified.
Variants
- Default:
The text passes through these successive modifications:
- Capitalize each word of the text through "intelligent capitalization", inserting underscore as needed for reducing ambiguities
- Remove the following characters: $%',?!><\/*{}()[]_-
- Replace the following characters | and : by the hyphen -
- Replace specific long words by their abbreviated version
- Append the .htm extension
- 1-Capitalize:
The words of the text are capitalized (1st character is upper-case) then all whitespaces are removed. At the end, the .htm extension is appended.
- 2-Underscore:
Each whitespace within the text is replaced by an underscore. The .htm extension is then appended.
- 3-HTTP file:
The captured text must be a Web address. It takes only the file name from that address and replaces its extension to .htm).
- 4-HTTP www:
The captured text must be a Web address. It takes only its Web Site name.
- 5-Normal as Dir:
The text passes through the same modifications as for the default variant except that no file extension is appended.
- HTTP file no ext:
Same as variant 3 except that no file extension is appended.
Tagged Drops
There is no tagged drop.
Untagged Drops
There is no untagged drop.
Clipboard Use
The clipboard is used as input for any variant. However, the content of the clipboard is changed once the script activity has started; it contains a Joliet compliant file/directory name.
Possible Metascript Messages
- WRN: Too long statement
The dropped statement, once processed, results into a string that is longer than 64 characters
Other Considerations
An explicit Clear List command is not required
Script Effects
Script outputs to the system output only.
Requirements
- Executable:
pythonw
- Script file(s):
FNamer.py for all variants; it must be located under the scripts/py sub-directory.
- IO access:
None
Side Effects:
- Clipboard Usage:
Yes, as input and output
- No other side effect.
See also the Purpose section above.
Tasks:
- Generating a valid HTML file or a valid directory name from a text fragment
- Generating a valid file/directory name from a Web Page Address
Generating a valid HTML file or a valid directory name from a text fragment
- Make sure that you have selected the proper variant (default, 1, 2, 3 or 5 for directory name)
- Make sure that DO is displayed on the gray target area
- Using any document browser that accepts clipboard operations (ex. the Internet Explorer, the MS Word, HTML Help viewer, many dialog messages, etc)
- Highlight a text fragment that you want to use as file or directory name
- do Crtl-C (to copy the highlighted into the system clipboard)
- Click the target area
- You should observe that:
- The drop target should display DO
- The status message displays: INF: Exit = 0
This is it. The system clipboard contains a valid name that can be pasted into a document or any file dialog.
Generating a valid file/directory name from a Web Page Address (URL)
- Make sure that you have selected the proper variant (3 for an html file name, 4 or 5 for a directory name)
- Make sure that DO is displayed on the gray target area
- Using any document browser that accepts clipboard operations (ex. the Internet Explorer, the MS Word, HTML Help viewer, many dialog messages, etc)
- Highlight a text fragment that contains only a complete URL expression
- do Crtl-C (to copy the highlighted into the system clipboard)
- Click the target area
- You should observe that:
- The drop target should display DO
- The status message displays: INF: Exit = 0
This is it. The system clipboard contains a valid name that can be pasted into a document or any file dialog.
Source
Please, add authors and owners for each version of the metascript
Owner(s):
- Company:
Big Feet Software
- License:
Freeware; you may use and modify this metascript and related script files. You cannot claim ownership of their original version.
Author(s):
- Name:
Marcel St-Amant
- Country:
CANADA
- Release Date:
2003-06-13
- Version:
1.0