DirCreatePyOut
DirCreatePyOut helps a desktop user in creating a list of valid sub-directories names using text segments from documents.
This metascript and related script demonstrate the use of an output file (and the OUTC and SOUT parameters) that will contain the list of valid directory names. This file is read by the D&Do and be outputted to the system clipboard.
Description
Overview
DirCreatePyOut accepts untagged text drops. Upon activation, It will modify each dropped text into related valid directory name(s). It will put them into the system clipboard (one name per line).
A dropped text is modified as follows:
- Leading and trailing whitespace characters (space, tab, linefeed, carriage return) are removed
- The remaining whitespace characters are replaced by the hyphen character
- The following characters are replaced by an underscore character: $%&',?!><\/*{}()[]"
Variants
- Default:
Start a list with one name coming from the last drop. To use with one drop only, use the next variant for adding to the list.
- 1-Add To Lst:
Add names coming from drops. The list will grow at each use. To restart the list, use the default variant.
Tagged Drops
There is no tagged drop.
Untagged Drops
Each text drop will be modified, as necessary, for generating a valid directory name.
Clipboard Use
The clipboard is not used as input for any variant. However, the clipboard will contain the list of proposed directory names.
Possible Metascript-Related Messages
- ERR: No Out File Created
Unable to create or write the output file.
Other Considerations
An explicit Clear List command is required if an error is encountered. Otherwise, the list of drops is automatically cleared upon a successful operation.
Script Effects
It creates or update the file specified at its second argument.
Requirements
- Executable:
pythonw
- Script file(s):
tutorial\DirCreatePyOut.py, for all variants.
- IO access:
the tmp\DirCreatePyOut.out file have been created or updated.
Side Effects:
- Clipboard Usage:
Yes, as output
- No other side effect.
Instructions
Creating a sub-directory names
Here are the detailed instructions for creating a list of valid sub-directory names into your system clipboard. You start the list once then you can add to the list as often as you want. The list can grow from session to session until you start the list again.
Start the list as follows:
- Make sure that D&Do title bar display: D&Do: DirCreatePyOut; the default variant is selected.
- Make sure that D&Do pink drop target area displays: BY1
- Using any document browser that accepts text drag (ex. the Internet Explorer, the MS Word, HTML Help viewer, many dialog messages, etc)
- Start with one name:
- Highlight a text fragment that you want to use as a sub-directory name
- Release the mouse; the text should be highlighted
- Click on the highlighted text, drag it to the D&Do drop target
- Click the drop target area
- You should observe that:
- The drop target should display: By1
- The status message display: INF: Exit = 0
- You can paste the system clipboard content into one of your applications (it contains one proposed name only)
Add to the list as follows:
- Make sure that D&Do title bar display: D&Do: DirCreatePyOut 1-Add To Lst; the variant 1 is selected.
- Make sure that D&Do pink drop target area displays: BY1
- Using any document browser that accepts text drag (ex. the Internet Explorer, the MS Word, HTML Help viewer, many dialog messages, etc)
- For each name to create:
- Highlight a text fragment that you want to use as a sub-directory name
- Release the mouse; the text should be highlighted
- Click on the highlighted text, drag it to the D&Do drop target
- Click the drop target area
- You should observe that:
- The drop target should display: DO
- The status message display: INF: Exit = 0
- You can paste the system clipboard content into one of your applications (it contains many proposed names)
This is it.
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-10-13
- Version:
1.0