QLab Watch Folder

239 views
Skip to first unread message

Taylor Glad

unread,
Dec 17, 2020, 10:06:59 PM12/17/20
to QLab
I scripted a QLab file version updater, or watch folder, or whatever you want to call it.
I shared this in a Facebook group a few months ago, but now that I've tested it out on some performances I thought I'd share it here too.

I haven't come across any bugs since finishing it in August, but being the kind of script that it is, I advise anyone who uses it to be cautious, and be familiar with the explanation I will share under the link here. The biggest factor will be your own particular version naming conventions. Test it thoroughly with your own versioning convention before throwing it on a show!

Files can be found in this box link.


Explanation.
There are 2 varieties of scripts, updating by version numbering (_v1) or by a date string (20201217). For each variety there is a QLab script to update selected, or update all cues in the cue list, as well as a script file to make a watch folder using Apple's Folder Action Scripts.
The script looks at each cue and looks at the directory where the file target is, and looks at the other files in that same folder for a matching name with a newer version or date.
The script does not distinguish between file types, having the thought in mind that it is then easier to use a .png placeholder for a future .mov file.
Making "watch folders" only triggers a universal script every time a file is placed inside certain folders. That's the most important detail to understand, but more information is below.

It is possible to mark a cue in QLab to not be updated by the script (read below).
It also leaves a log in the notes when a cue's target was updates, with the date and time, as well as which specific script did the action.
(It is then possible to use Command+F to search the workspace cue notes for any updates, or specific dates or times)

What kind of version notation is accepted?
The basic requirements are an underscore, lowercase v, then a number like "_v1"
The script supports an inconsistent number of character spaces in the version (like _v00003 to _v4) and it also supports one lower case letter. (_v4a to _v4b)
It also adapts to wherever the version number is located in the title, as long as it starts with "_v" and there is either a space or an underscore after the version number. ("blah_v023c blach blach.png" or "blah blahddy blah_v023c.png")

What kind of date notation is accepted?
The script looks for YYYY-MM-DD-HH-MM format. You can use any character to separate year from month, etc. or use no character separators at all, as long as no more than 2 non-number characters occur in a row before all 12 numbers are found. But you need all 12 numbers. "202012170755" or "2020-+12=)17*&07$%55" are both acceptable.
The script then checks to make sure the set of number is a reasonable date (month is 12 or less, day is 31 or less) but doesn't limit by shorter months (February 31st gets no error).

How the "watch folders" work.
Setting up a Folder Action Script triggers a script to run any time any file is added to that folder, using the frontmost workspace in QLab at that time. The scripting is then identical to the "update all" script, meaning that every single cue's target is then checked for an update, regardless of their cue target being in that watch folder. If files are added to the watch folder while QLab is not open, the script will just bail and not execute anything.
But once you do open QLab, any file added triggering the script will catch up all the other cues to newer versions. Or you could just execute the update all script in QLab on reopening.
If you are using multiple open workspaces, you'll just have to go through the script yourself and adapt it to target a specific workspace, or figure out whatever else you want to do about it. =P

How to make a specific cue exempt from updates by the script
If a cue's note contains "do not update" "don't update" or "no update" anywhere in the notes, that cue's target will not be updated. Capitalization doesn't matter, so a cue is exempt if you write "DO NOT UPDATE", "nO uPdaTe", or even "please don't update, or Kevin is going to fire me."




If I left anything vague, let me know!
If I remember any other important details, I'll add them to the thread, but I think that covers all the concerns I've anticipated/encountered.
Hope this is useful and helpful!

Taylor Glad

unread,
Jul 15, 2021, 9:54:00 PM7/15/21
to QLab
Just for anyone who happens upon this old post...
I've updated this to combine them into 1 script for both version and date syntaxes.

I also fixed it to check for a number after each "_v" so that other uses don't create problems. So now you can use "Vivaldi 4 Seasons_very_violent_violins_v4.3b_viola stem.mp3"

Reply all
Reply to author
Forward
0 new messages