|
| TUNETRACKER SYSTEM IN ACTION - TuneStacker |
TuneStacker from the Command Line
The following information is not for brand new beginners. If you do not have experience using the command line or creating batch file scripts, but would still like to have the functionality described here, please call TuneTracker Systems and ask about our script-writing service, at 920-273-0543.
In all instances below, note that the BeOS command line interface is case sensitive. You MUST use correct upper and lower case letters in your paths, filenames, etc., or you will have file-not-found and path-not-found errors.
RUNNING IT FROM THE COMMAND LINE
While routine generation of single program logs is a breeze using the TuneStacker point-and-click interface, there are situations where you may prefer to automate the unattended generation of multiple logs. It may also be that your situation makes it necessary to generate program logs remotely, from a computer located across town or across the world using TT Anywhere. That's where the TuneStacker command line interface comes into play.
Launch "Terminal," the Be Operating System's BASH shell found in the "apps" folder. If you have recent TuneTracker installation, you can open the terminal with CTRL-ALT-D (NOT CTRL-ALT-DEL!). A window will open, into which you can type commands. Assuming you have your Sample Station installed in the prescribed location, try typing the following two lines, hitting ENTER at the end of each line. Note that if your file paths are different, you will need to adjust the following. Note also that, unlike the DOS shell, the BASH shell is case sensitive, so make certain you use correct upper and lower case in the file and path names. If you prefer, you can cut and paste these lines into the command line window rather than retyping them.
cd /boot/apps/TuneTracker System/TuneStacker
TuneStacker -m /boot/apps/TuneTracker\ System/Templates/Masterlog_Template -p MyFirstLog -v /boot -t /boot/home/TrafficLog -g Title 150
Explanation: In case you have never experienced command line switches (the hyphenated letters you see above such as -m) let's break this down in a nice easy way. Look at the example above, then read descriptions of each part of it below.
TuneStacker (runs the TuneStacker Program)
-m /boot/apps/TuneTracker System/Templates/Masterlog_Template" (specifies the master log you want (note the backslash (\), which is required ahead of any space in your path or filenames)
-p MyFirstLog (specifies the filename of the program log you will generate
-v /boot (indicates which hard drive volume you want searched. If none is specified, TuneStacker will assume you want to search all mounted volumes)
-t /boot/home/TrafficLog (--- TuneTracker Pro only --- specifies the path and filename of the traffic log file you want TuneStacker to integrate into your program log.
-g Title 10 (ProximityGuard to "g against repeats of the same Title within 150 adjacent automation events
Want to get fancier? Add more ProximityGuard protection criteria by just popping extra ones onto the end of the line! For example:
TuneStacker -m /boot/apps/TuneTracker System/Templates/Masterlog_Template -p MyFirstLog -v /boot -v /otherdrive -g Title 150 -g Artist 30 -g Genre 3
Explanation: Using the example above, TuneStacker will use its ProximityGuard feature to protect against having the same song title show up more often than every 50 lines, the same artist more often than every 30 lines, and the same genre more often than every 3 lines.
You can protect by up to five criteria at once (Command Center Only), selecting from these six possibilities: Artist, Album, Title, Comment, Tempo, and Genre. Bear in mind that the more protection you add, the slower log generation will be.
-->
Make certain the protection numbers you use are smaller than the number of cuts available meeting that criteria. For example, you would be ill-advised to ask TuneStacker to use an Artist protection level of 100 if you only have 40 different artists!
Note that there is a second hard drive volume specified as well. You can have TuneStacker search multiple volumes by just adding additional "-v" entries in your command line. Volumes entered in the search must be preceded by a slash (/) as shown above.
SCRIPTING
"Batch file" scripts can be made by simply typing a series of command line commands into a word processor document. Use BeOS' "StyledEdit" (found in the apps folder) to type in a series of commands such as the following. Note that the strange-looking first line must be there in order for the script to run properly:
#!/bin/sh
cd path/TuneStacker
TuneStacker -m /path/MonMasterLog -p /path/Jun_04 -v /boot/ -g name 200 -g artist 30
TuneStacker -m /path/TueMasterLog -p /path/Jun_05 -v /boot/ -g name 200 -g artist 30
TuneStacker -m /path/WedMasterLog -p /path/Jun_06 -v /boot/ -g name 200 -g artist 30
TuneStacker -m /path/ThuMasterLog -p /path/Jun_07 -v /boot/ -g name 200 -g artist 30
TuneStacker -m /path/FriMasterLog -p /path/Jun_08 -v /boot/ -g name 200 -g artist 30
TuneStacker -m /path/SatMasterLog -p /path/Jun_09 -v /boot/ -g name 200 -g artist 30
TuneStacker -m /path/SunMasterLog -p /path/Jun_10 -v /boot/ -g name 200 -g artist 30
Explanation: In the example above, which you are welcome to cut-and-paste and adapt as you see fit, we are assuming a radio station which has enough unique programming from one day to the next that it uses a different program log every day. If there are no programming differences from day to day, the same MasterLog could be used for all of the lines above. In our example, the destination file is named for the day on which it will be used. Again, you can make those filenames anything you like.
Save the script with a memorable name in a memorable place, and "cd" to it in Terminal to run it. All you need to do to run it is to type the name of the script and press ENTER. Take care to use proper upper and lower case letters exactly or your script will not be found. If your paths are right, all will be well. If you don't want to have to "cd" to it each time, place it in this common path location: /boot/home/config/bin
A HANDY REMOTE MANAGEMENT TOOL
A great command line-based FTP tool called "ncftpput" is included in the Extras folder of your TuneTracker installation. It can be incorporated into your scripts to upload logs and other data to the radio station computer. First, assure that the BeOS' FTP server is enabled in Network Preferences on the remote BeOS machine (click the Services tab and enable FTP, specifying a username and password). This is useful if you have a complete mirror of a remote computer's contents on your computer, and opt to generate the program logs locally and automatically transfer them to the remote computer via FTP. Running "ncftpput --help" will give you the syntax, but here's a quick example of it in action:
ncftpput -u username -p password ipaddress remotepath localpath *
Helpful Hint
If you are using TuneTracker Command Center, you can use the # Run command to launch your log generation script automatically! By doing so, you can make generation of big batches of program logs a fully automatic process. For example, you could create a script called "DoWeeklyLogs.sh" and add a line like this to your program log once a week:
# Run /boot/Station/Scripts/DoWeeklyLogs.sh &
Again, remember that we are here to assist with our custom script writing service, should the need arise. Call us at 920-273-0543.
Error Messages
TuneStacker will not give up if there are errors in your master log. It will simply log the problems as notations in your program log. This makes it easy to track down any errors in your master log and correct them.
TuneStacker will also log an alert message if a cut indicated on your master log cannot be found. This is very possible if you have scheduled events for which the cuts are not yet prepared, such as special programming. For example, if you have a "Play" line in your master log for the FridayRoundup.wav, and it's not available when the log is prepared, TuneStacker will still add it to the log, along with a notation that looks like this:
##TuneStacker Warning The following file did not exist when the Program
Log was generated.
Play /boot/radio/news/FridayRoundup.wav
When the log is broadcast, TuneTracker will still play the cut, if it is found at broadcast time. If not, TuneTracker will simply skip the cut and move on to what's next.
Table of Contents
|