By Davis Hsu. Why is it important to have the Emergency Document automatically updated? The...

11
Automatic Emergency Document Updating Project By Davis Hsu

Transcript of By Davis Hsu. Why is it important to have the Emergency Document automatically updated? The...

Automatic Emergency Document Updating

Project

By Davis Hsu

Why is it important to have the Emergency Document automatically updated?

The Emergency Document provides the important documentation on the systems of ICCS-155 including the emergency procedures.

It is necessary to have the most up to date document prepared for tech staff in the case of emergency.

What does this project do?

• It updates the Emergency Document constantly.

• It generates PDF version of the document for cross platform portability.

• It notifies tech staff whether it is updated successfully.

What does this project consist of?

• Visual Basic

- ConvertTKFile.vb

- GenEmergtables.vb

• Perl

- Genlist.pl

- SendNotice.pl

• Configuration file

• Batch file

Overview of the project

C

P

TK’s Excel File(Data_KVM_port_labels_in

fo1.xls)

Updated Emergency Document

(emergency_procedure_doc_iccs-155_v6.3.docx)Updated Emergency Document PDF file

GenEmergTables.bat

Scheduled task will run the program at a certain time

Config File(Contain all the

output and input file locations)

program

How do these scripts work?

Convert TK File Genlist

GenWordTables

SendNotice

GenEmergTables.bat

Batch File

VB Code Perl Code

VB Code

Perl Code

Config File

Send updated notice email if the modified time of the two files match the current date, failed email notice will be sent otherwise.

TK List

Emergency Document

To be checked by

Group Lists

Take TK’s Excel File and make local .csv File

Take local .csv file and makes alphabetical

server and rack list (.csv)

Takes .csv from Perl output and injects them

into word doc.

Compare local time to the modified time of

the two files

All the .vb and .pl program can be started by the this .bat file

Config file contain all the location of the input and

output files, so all the programs listed here read

config file for configuration

Group lists will be injected to make word tables in emerg doc

The scheduled task start running the whole program at the certain

time

To be checked by

Problems Encountered

• Choice of programming languages

- Intended to find a language that can do all the work (MS Applications + Text Processing)

• Config File

- Avoids hard coding paths into the scripts/programs.

- Resolve the issue of having to re-compile on program changes.

Problems Encountered Con’t

• Scheduled task - Current Directory Function in the scripts

returns the location of the scheduler instead of the location of the script - the scheduler seems to lack the environment to create a Microsoft application object

Alternative Solution

• Edit the XML code within Word document instead of updating the file using MS Office which avoid the use of VB and MS Application.

• Only one programming language (Perl) involved and can be run in UNIX environment.

• Can use UNIX CRON instead of Microsoft Scheduled Task.

• However, it might not work on future versions/updates of Microsoft Office.

Conclusion

Overall, the development of “The Automatic Emergency Document Updating Project” will be used to update the Emergency Document.

In turn, I hope that this will be a stepping stone so that in the near future other co-op students are able to use this project as a reference for further improvement.

THE END

Thank You!