DCreator
DCreator helps a desktop user in creating many valid sub-directories using text segments from documents. It avoids the requirement of manually editing directory names in order to be compliant with the operating system and user policy.
Description
Overview
DCreator accepts a "destination" directory drop followed by untagged text drops. Upon activation by clicking the target area, DCreator will modify each dropped text into related valid directory name(s). For each text drop, that valid name is then used for creating a sub-directory under the destination directory. 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 using "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
- 1-Capitalize:
The words of the text are capitalized (1st character is upper-case) then all whitespaces are removed.
- 2-Underscore:
Each whitespaces within the text is replaced by an underscore
- 3-HTTP file:
Remove every characters except those between the last / character and the next period character.
- 4-HTTP www:
Keep only the text between the first double // and the next / character.
Tagged Drops
There is one tagged drop: the "destination" directory drop (identified as "Dest Dir")
Untagged Drops
The untagged text drops are identified as "Text drops". Each text drop will be modified, as necessary, for generating a valid directory name.
Clipboard Use
The clipboard is not used for any variant.
Possible Metascript-Related Messages
- ERR: Nb Args, 2 or 3
The underlying script expects 2 or 3 arguments. This error should never occur.
- ERR: Dir not exist
The destination directory does not exist. This directory might have been deleted (or disconnected) since the time you made the directory drop.
- ERR:
Invalid variant switch
The underlying script expects a specific switch argument (the third argument) and nothing else. This error may occur if you create other variants with invalid argument sets, otherwise it should never occur.
- ERR: Unable to create
The sub-directory cannot be created. May be, you do not have the writing privilege at the destination directory. For some script languages used by the underlying script, it may be due to an attempt at creating a sub-directory with the same name as another existing one, at the same location.
Other Considerations
An explicit Clear List command is not required except when an error occurs.
Script Effects
For any variant, DCreator will create sub-directories.
Requirements
- Executable:
pythonw
- Script file(s):
DCreator.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.
Instructions
Creating sub-directories
Here are the detailed instructions for creating sub-directories with names based from displayed documents.
- Make sure that the proper variant has been selected (look at the D&Do title bar to verify)
- Make sure that D&Do cyan drop target area displays: BY1 ID= Dest Dir
- Using a file browser (ex. the Windows Explorer):
- Make the destination directory visible (expanding directories as necessary)
- Press the mouse button when the cursor is on the destination directory then
- drag the cursor to the D&Do target area then
- release the button.
- Using any document browser that accepts text drag (ex. the Internet Explorer, the MS Word, HTML Help viewer, many dialog messages, etc)
- For every sub-directory to create:
- Make sure that D&Do cyan drop target area displays: Text drops
- Select a text fragment that you want to use as sub-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 selected text,
- drag the cursor to the D&Do target area then
- release the button
- Click the drop target area
- You should observe that:
- New sub-directories have been created under the destination directory
- The drop target should display: BY1 ID= Dest Dir
- The status message display: INF: Exit = 0
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