(Lua) - Show Report in HTML

Open Source software contributions and discussions that supplement or extend the Palette / Light Palette software
Post Reply
User avatar
AlanMartello
Posts: 500
Joined: Thu Oct 11, 2007 9:00 pm
Primary Venue / Use: Other
Where I Am: Pittsburgh, Pennsylvania USA
Location: Pittsburgh, Pennsylvania

(Lua) - Show Report in HTML

Post by AlanMartello » Fri Jun 20, 2008 6:12 pm

With many thanks to John and Robert, attached is palette_log.lua, a (hopefully) easy to use lua logging extension.

It supports logging as text or html (with basic formatting), optionally can include the date/time and can optionally log to the history window as well. The html can also be setup to auto-refresh in the browser.

Here is an example of the text output

Code: Select all

Show Description
Created at 06/20/08 18:05:40
----------------------------------------------
New Theater Company
----------------------------------------------
06/20/08 18:05:40 - Dress Rehearsal Start
----------------------------------------------
06/20/08 18:05:42 - Cue 2  executed
06/20/08 18:05:45 - Cue 5  executed
----------------------------------------------
06/20/08 18:05:46 - Dress Rehearsal End
----------------------------------------------
I will post the show file after the next beta release as it is not in a format that is usable by the old software.
The lua code should work fine (although make sure you put an entire path to the log file -- this has been fixed in the next release).
Attachments
palette_log.lua
Version 1.00 Place in same folder as show file
(9.65 KiB) Downloaded 87 times
log_test.html
HTML version of log
(404 Bytes) Downloaded 72 times
log_test.txt
Text version of log
(467 Bytes) Downloaded 65 times

User avatar
RobertBell
Posts: 2421
Joined: Fri Oct 12, 2007 1:11 pm
Primary Venue / Use: Other
Where I Am: Horizon Control Inc
Location: On the dark side just north of Toronto
Contact:

Re: Lua - palette_log.lua

Post by RobertBell » Fri Jun 20, 2008 10:01 pm

Very cool. I live using os.date('%X') rather than os.date() - %X only shows the time (you don't need the date each and every time a cue is executed)
Robert Bell - Product Manager - Horizon Control Inc.

User avatar
JohnGrimshaw
Posts: 1233
Joined: Tue Oct 16, 2007 12:51 pm
Primary Venue / Use: Other
Where I Am: International Man of Mystery
Location: Sydney, Australia
Contact:

Re: Lua - palette_log.lua

Post by JohnGrimshaw » Sat Jun 21, 2008 6:59 pm

Very nicely written code (see - I am a novice at this!).

Thanks Allan
...and for more entertainment industry trivia and useless facts, just ask:
John Grimshaw
Managing Director
Stage Fast Pty Ltd

User avatar
RobertBell
Posts: 2421
Joined: Fri Oct 12, 2007 1:11 pm
Primary Venue / Use: Other
Where I Am: Horizon Control Inc
Location: On the dark side just north of Toronto
Contact:

Re: Lua - palette_log.lua

Post by RobertBell » Fri Aug 29, 2008 1:23 am

My time at Tale of Two Cities on Broadway helped refine this code even more. We now have stop watches so stage management can rest a little easier. Attached is an example of a log report and the LUA code you should put in your show directory. What is not shown is the index.html page which is just a series of dates (Friday's show with link, Saturday's mat. with link etc.).

Here is a snipette of the comments in the lua file

Code: Select all

---------------------------------------------
USAGE EXAMPLES
---------------------------------------------

-- this call should not be automated - should only be called when you want to clear the logs
KillIndex() 

-- Call this before calling any other logging macros - I put it in Cue 0.5 - House to half - then follow it with StartShow()
StartTodaysLog('Tale of Two Cities')

-- This is called when house goes to half
StartShow()

-- This is a called in when the curtain is raised (must put in text argument)
StartAct('Act 1')

-- call as many of these as you like - only one works in succession to the other
StartScene('blah1')

-- last cue of the scene (might be start of another or you may want to wait for next cue to call StartScene('asdf') again
EndScene()
StartScene('blah2')
EndScene()
EndAct()
StartInterval()
EndInterval()
StartAct('Act 2')
StartScene('blah3')
-- if you want a new scene's start to end the last scene - call with true argument
StartScene('blah4',true)
EndScene()
EndAct()
LogThisCue(true) -- this can be called at any time
EndShow()
Attachments
palette_log.lua
lua code for logging show reports
(16.07 KiB) Downloaded 94 times
Tuesday_August_26_19_07.pdf
Tale example log file as pdf vs. html
(13.11 KiB) Downloaded 83 times
Robert Bell - Product Manager - Horizon Control Inc.

Post Reply