Changeset 296

Show
Ignore:
Timestamp:
02/20/03 11:51:17 (6 years ago)
Author:
deveiant
Message:

- Fixed some vestiges of jobserver code that snuck in when backporting the

improvements made to the Vericept table loader.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/sql/createTables.pl

    r256 r296  
    1 #!/usr/bin/perl 
     1#!/usr/bin/perl -w 
     2########################################################################### 
    23 
    34=head1 NAME 
    45 
    5 iceboxShout - a perl icecast encoder, vaguely similar to shout(1) 
     6createTables - Upload a SQL database schema that's been split into multiple files 
    67 
    78=head1 SYNOPSIS 
    89 
    9     iceboxShout [OPTIONS] <queueid> 
    10     iceboxShout --listtype 
    11     iceboxShout --help 
    12  
    13 =head1 OPTIONS 
    14  
    15 =over 4 
    16  
    17 =item -b, --bitrate=<bitrate> 
    18  
    19 Set the bitrate of the stream in kbps. 
    20  
    21 =item -B, --buffer=<bytes> 
    22  
    23 Set the size of the FIFO stream buffer. 
    24  
    25 =item -c, --configfile=<file> 
    26  
    27 The path to the Icebox config file. Defaults to /usr/local/apache/httpd/icebox.conf. 
    28  
    29 =item -d, --debug 
    30  
    31 Print debugging information in addition to regular progress messages. Mutually 
    32 exclusive with the -f option. 
    33  
    34 =item -e, --desc=<desc> 
    35  
    36 Set the stream description. 
    37  
    38 =item -f, --fork 
    39  
    40 Fork into the background (become daemon). 
    41  
    42 =item -g, --genre=<genre> 
    43  
    44 Set the stream genre. 
    45  
    46 =item -h, --help 
    47  
    48 Output a usage message. 
    49  
    50 =item -l, --listtype[=<type>[:<args>]] 
    51  
    52 Specify what playlist type to stream, and (optionally) what arguments to use for 
    53 configuring it. If the argument contains spaces or shell special characters, you 
    54 must either escape them or quote the entire argument list so your shell doesn't 
    55 muck with it. 
    56  
    57 See the documentation for the playlist classes for more information on what 
    58 arguments playlists can have. 
    59  
    60 B<Examples> 
    61  
    62   -l "Genres:minEntries=50;genres=Techno-Industrial,Electronic,Drum & Bass" 
    63   -l ArtistSets:setSize=5;minEntries=20 
    64   -l ArtistSets 
    65   --listtype=Randomized:memoryDepth=60;minEntries=10 
    66  
    67 If this option is given without any arguments, a list of available playlist 
    68 types is output. 
    69  
    70 =item -L, --logfile=<file> 
    71  
    72 Output log messages to the specified I<file>. 
    73  
    74 =item -m, --mount=<name> 
    75  
    76 Set the mountpoint of the stream. 
    77  
    78 =item -n, --name=<streamname> 
    79  
    80 Set the stream name. 
    81  
    82 =item -p, --port=<portnumber> 
    83  
    84 Set the port to use when connecting to the icecast server. 
    85  
    86 =item -P, --password=<word> 
    87  
    88 Set the password to use when connecting to Icecast. 
    89  
    90 =item -s, --server=<host> 
    91  
    92 Set the hostname of the icecast server. 
    93  
    94 =item -u, --url=<streamUrl> 
    95  
    96 Set the url of the stream's homepage. 
    97  
    98 =back 
     10  $ createTables.pl 
    9911 
    10012=head1 DESCRIPTION 
    10113 
    102 IceboxShout streams MP3 files listed in an Icebox::Queue to an Icecast server 
    103 after optionally downsampling them with lame(1). 
     14This program uploads SQL database schema that have been split into multiple 
     15files and then #included together. 
    10416 
    10517=head1 REQUIRES 
     
    10719(Token) 
    10820 
    109 =head1 AUTHOR / PERSON TO BLAME 
    110  
    111 Michael Granger E<lt>ged@FaerieMUD.org<gt> 
    112  
    113 Copyright (c) 2000,2001 The FaerieMUD Consortium. All rights reserved. 
    114  
    115 This program is Open Source software. You may use, modify, and/or 
    116 redistribute this software under the terms of the Perl Artistic 
    117 License. (See http://language.perl.com/misc/Artistic.html) 
     21=head1 AUTHOR 
     22 
     23Michael Granger E<lt>devEiant@devEiate.orgE<gt> 
     24 
     25Copyright (c) 1999-2002 Michael Granger. All rights reserved. 
     26 
     27This program is free software; you can redistribute it and/or modify it under 
     28the terms of the GNU General Public License as published by the Free Software 
     29Foundation; either version 2 of the License, or (at your option) any later 
     30version. 
     31 
     32This program is distributed in the hope that it will be useful, but WITHOUT ANY 
     33WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
     34PARTICULAR PURPOSE.  See the GNU General Public License for more details. 
     35 
     36You should have received a copy of the GNU General Public License along with 
     37this program; if not, write to the Free Software Foundation, Inc., 59 Temple 
     38Place, Suite 330, Boston, MA 02111-1307 USA 
    11839 
    11940=cut 
    12041 
     42########################################################################### 
    12143package createTables; 
    12244use strict; 
     
    14466 
    14567$Debug = TRUE; 
    146 $RootSchema = 'JobServer.sql'; 
    147 $Database = 'jobserver'; # <- This should really be parsed from the schema 
     68$RootSchema = 'Icebox.sql'; 
     69$Database = 'icebox'; # <- This should really be parsed from the schema 
    14870 
    14971 
     
    16183    # Get a readline terminal and fetch its list of features 
    16284    $prompter = new Term::Prompter; 
    163     $prompter->header( "JobServer table loader." ); 
     85    $prompter->header( "$Database table loader." ); 
    16486 
    16587    # Get the subdir this is running in, and make sure the root schema is there