FNamerDrag
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 editing manually such names in order to be Joliet compliant.
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
Once a text fragment is dropped, FNamerDrag 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 "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 dropped 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 dropped 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
Only one untagged text drop is accepted.
Clipboard Use
The clipboard is not 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 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 nothing is displayed on the green target area
- Using any document browser that accepts text drag (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 (using a text highlighting drag movement)
- Release the mouse; the text should be highlighted
- Press the mouse button when the cursor is on the highlighted text, drag the cursor to the D&Do target area then release the button
- You should observe that:
- The drop target should display nothing
- 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 nothing is displayed on the green target area
- Using any document browser that accepts text drag (ex. the Internet Explorer, the MS Word, HTML Help viewer, many dialog messages, etc)
- If the URL is from an Address field, drag an URL and drop it into the target area
- Otherwise:
- Highlight a text fragment that contains only a complete URL expression (using a text highlighting drag movement)
- Release the mouse; the text should be highlighted
- Press the mouse button when the cursor is on the highlighted text, drag the cursor to the D&Do target area then release the button
- You should observe that:
- The drop target should display nothing
- 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