|
Xpounded Book Parser Un-attended Automation
Automatically transforms text source books into xml/dhtml books
This example is comprised of two scripts: bookMonitor.vbs and bookParser.vbs
(This is an example of unattended automation - a commerical quiality concept)
bookMonitor.vbs is a WMI monitor script that once run, stays running in the background
until it is manually stopped (end process from the task manager).
The purpose of
bookMonitor is to silently watch a specified folder (you choose the folder) for any
new file to be added.
Once a file has been added to the monitored folder, bookMonitor.vbs automatically
calls a target script (bookParser.vbs) with the newly added file as an argument.
At this point the file bookParser.vbs will parse the new file into an xml chapter set,
along with building a DHTML reader for the set.
The newly created subfolder and files will be in the target folder you specify along
with a log file that tracks what file was sourced and when.
Setup:
- Choose a folder for both bookMonitor.vbs and bookParser.vbs and copy them to the folder.
The files do not have to be in the same folder.
- Open bookMonitor.vbs in a text editor and
- cahnge the line
monitoredFolder="someFolderPath"
so that someFolderPath is the path to the folder you want to monitor.
- cahnge the line
scriptApplication = "someOtherPath\bookParser.vbs"
so that someOtherPath is the path to the folder you stored bookParser.vbs in.
- Open bookParser.vbs in a text editor and
- change the line
fileFolder1="monitoredFolder"
so that monitoredFolder is the same path to the same monitord folder that you set
in bookMonitor.vbs above
- change the line
fileFolder2="resultFolder"
so that resultFolder is the path to a folder you want your resulting books to be
stored in.
Use: Run bookMonitor.vbs and it will handle the rest
Any time you want to create a book, just drop or paste the source-text file into the monitored folder.
IMPORTANT: I have not added a test to ensure only proper text files will be acted on
i.o.w. as it is written, bookMonitoer will pass any new file along, and bookParser will try
to parse it into a book. It is up to you to make sure only plain-text books are added to
the monitored folder.
Rules for the plain-text books:
- Open the text file and add the follwing line just after the chapters listing (if any)
#-@-#
This line MUST be in the text file
- Add a line with the word "Chapter " followed by a chapter description as a chapter seperator
just before each chapter (if non exists already).
- You can get plain-text books from your favorite source
- The Gutenberg Project
- Doc Savage at Blackmask
- etc...
Save this file as BookMonitor.vbs     Mention Us
 Select All
No HTML to View
IMPORTANT: Save this file as bookParser.vbs
 Select All
| |