I'm back again with an alternative and complementary approach to 
script debugging tools. This time it's a simple "release version" 
maker that strips off debug code -- and creates a readme file from 
embedded comments.
The screenshot shows DevRelease.powerpro applied to itself.
It's stable but I didn't do a whole lot of testing.

>From the readme file:

Readme file for DEVRELEASE.POWERPRO generated on 20050905 at 180623 
by DevRelease.powerpro version 20050905

DevRelease.powerpro
Simple preprocessor to create the "release" version of a script.

FEATURES:
---------
- Creates Readme file
- Create Notes file
- Strips off debug code (or any other code)
- Removes comments
- Creates package folder
- No side effects on non-release version of a script

INSTALLATION:
Copy DevRelease.powerpro into one of your script folders.

Win9x isn't supported because the script uses cmd.exe
(should work if you replace cmd.exe with command.com on Win9x - 
untested)

Required plugins:
- File.dll

INSTRUCTIONS:
-------------

The main idea is to embed special comment tags in your development 
script.
Each tag tells DevRelease.powerpro what to do, for instance, the ;:
tag at the beginning of a line (columns 1 and 2 exactly) tells
DevRelease.powerpro that the remainder of the line should be included
in the Readme file.

To generate the "release version" of your scripts, 
say "MyScript.powerpro",
simply run .DevRelease("MyScript.powerpro","path-to-release-folder")

The following files are created in folder "path-to-release-folder":
- MyScript.powerpro (stripped version)
- readme.txt
- notes.txt
- MyScript-full.powerpro (original version, unstripped)

"path-to-release-folder" can be omitted or null, in which case
the above files are created in a new folder named "MyScript-DATE-
TIME"
inside the folder that contains "MyScript.powerpro" (not 
scriptfolder).
NAME is in the format YYYYMMDD (date), TIME is HHMMSS (time).

This script is best used from the command line, either as
  powerpro.exe .DevRelease("MyScript.powerpro")   (*)
or as
  ppbang.exe .DevRelease("MyScript.powerpro")     (*)

(*)Notice that if you don't specify "path-to-release-folder"
   DevRelease.powerpro tries to "guess" a folder stem for you 
according
   to the following rules:
   - use the folder implicit in "MyScript.powerpro" if a folder path
     can be extracted, i.e., "c:\PowerPro Scripts\MyScript.powerpro"
     generates "c:\PowerPro Scripts\"
   - else use the START folder of the active window (currentdir) if 
it
     contains "MyScript.powerpro"
   - else use powerpro's START folder (not its INSTALLATION folder) 
if it
     contains "MyScript.powerpro"

Notice also that specifying "path-to-release-folder" may overwrite a
previous package; in all other cases, since a folder STEM is created,
no overwriting should be possible.

TAG REFERENCE:
--------------
EOL means 'end of current line'

Readme tags:
";: " columns 1-3 : copy columns 4-EOL to file Readme.txt
";: ~~~" columns 1-6 : write a section end line in Readme.txt

Notes tags:
;i " columns 1-3 : copy columns 4-EOL to file Notes.txt
";i ~~~" columns 1-6 : write a section end line in Notes.txt

Strip tags:
";x+" columns 1-3 : strip off all following lines until one that 
begins
      with ;x-" is found
";x-" columns 1-3 : disable the ";x-" tag
";xNUM" where num is a variable-length integer number : strip off 
        the next NUM lines, example ";x10" strips off 10 lines
";x" : a shorthand for ";x1"

COMMENT REMOVAL:
----------------
To be implemented

VERSION HISTORY:
----------------
         ! major improvement
         + added feature
         * improved/changed feature
         - bug fix
20050905   First version - uploaded to yahoo group


>   File        : /Scripts/DevRelease-20050905.zip 
>   Uploaded by : sgp 
>   Description : DevRelease.powerpro creates a "release package" of 
a script - looks at embedded comments to strip off debug code and 
create documentation files - before/after screenshot 
http://groups.yahoo.com/group/power-
pro/files/0_TEMP_/Screenshot6.png 
> 
> You can access this file at the URL:
> http://groups.yahoo.com/group/power-pro/files/Scripts/DevRelease-
20050905.zip 
> 
> To learn more about file sharing for your group, please visit:
> http://help.yahoo.com/help/us/groups/files
> 
> Regards,
> 
> sgp




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to