]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
dbtool -> audio file selector renaming
authorAndre <maan@p133.(none)>
Fri, 10 Mar 2006 18:49:49 +0000 (19:49 +0100)
committerAndre <maan@p133.(none)>
Fri, 10 Mar 2006 18:49:49 +0000 (19:49 +0100)
This updates only Documentation and log messages.

FEATURES
INSTALL
NEWS
README
README.mysql
command.c
server.c

index 17d5051c81647e982e4c713ca09e65b36eb503d0..fbc842904d37bc5880c5458fe2e1ec7a3c117450 100644 (file)
--- a/FEATURES
+++ b/FEATURES
@@ -1,8 +1,8 @@
 Features
 ========
 
 Features
 ========
 
-configurable audio streaming software
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+configurable audio streaming software:
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        para_server streams binary audio data (mp3/ogg files) over
        local or remote networks. It contains two built-in streamers:
        the http streamer and the ortp streamer.
        para_server streams binary audio data (mp3/ogg files) over
        local or remote networks. It contains two built-in streamers:
        the http streamer and the ortp streamer.
@@ -23,8 +23,7 @@ configurable audio streaming software
 
 configurable audio file selectors:
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 configurable audio file selectors:
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-       There are three audio file selectors (aka "database tools")
-       available:
+       There are three audio file selectors available:
 
                - random
                - plm (playlist manager)
 
                - random
                - plm (playlist manager)
diff --git a/INSTALL b/INSTALL
index 9bf20154454ecd0c083ca4555488fcacda176b65..41a45c45a3ad8c72a10ef0d197fc29bcfb18f28f 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -76,28 +76,29 @@ example) and try
 to retrieve the list of available commands and some server info.
 
 
 to retrieve the list of available commands and some server info.
 
 
-Choose your database tool (dbtool)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-You have two options:
+Choose an audio file selector
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+paraslash has three different audio file selectors: random (default),
+plm (the playlist manager) and mysql.
 
 
-       1. Use the mysql dbtool which comes with paraslash and requires
-       mysql.
+       The random selector chooses files randomly from the given
+       directory.
 
 
-       2. If you can not use the mysql dbtool and you just want
-       to quickly make paraslash working, use the random dbtool.
-       The directory which is searched for audio files can be given
-       via the server option --random_dbtool_dir.
+       The playlist selector allows to send a playlist to para_server
+       via the lpl (load playlist) command. para_server will choose
+       files from the loaded playlist in sequential order.
 
 
-       Note, however, that this database tool is really dopey. It
-       scans the given directory on every audio file change and
-       chooses one randomly. There is no further functionality.
+       The mysql selector stores information about your audio
+       files in a mysql database. It is much more involved than
+       the other two selectors and lets you chose files in many
+       interesting ways. If you like to use the mysql selector,
+       read README.mysql and follow the instructions given there.
+       Return to this document when ready.
 
 
-The current database tool can be changed at runtime via
+The current audio file selector can be changed at runtime via
 
 
-       para_client cdt new_dbtool
+       para_client cdt new_selector
 
 
-If you have choosen 1. above, read README.mysql and follow the
-instructions given there.  Return to this document when ready.
 
 
 Start streaming manually
 
 
 Start streaming manually
diff --git a/NEWS b/NEWS
index 0ef3d1b5529ff1ac81c9ec81cf620dc24f66f7d2..ddaca55419e655b4f374fa896b3955bf3d191d6a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,12 +9,12 @@ NEWS
 
        o the new ipc subsystem
 
 
        o the new ipc subsystem
 
-       o new database tool: plm, the playlist manager
+       o new audio file selector: plm, the playlist manager
 
 
-       o para_server: the dopey file selector is now called "random",
-       and it is selected by default.  Use the --selector option to
-       choose another selector at startup, or the cdt command to switch
-       between the supported selectors.
+       o para_server: the dopey selector is now called "random",
+       and is the default selector. Use the --selector option to
+       choose another selector at startup, or the cdt command to
+       switch between the supported selectors.
 
        o X86_64 fixes (thanks to Steffen Klassert)
 
 
        o X86_64 fixes (thanks to Steffen Klassert)
 
diff --git a/README b/README
index b51a8d39cd8ca153c7996f8a6e9dd94f41bd2b03..95410014c33d228b4ea2516ec0117fe846f8a268 100644 (file)
--- a/README
+++ b/README
@@ -24,13 +24,13 @@ It contains the following programs:
        All senders have the same set of commands that allow to
        control the access permissions of the stream.
 
        All senders have the same set of commands that allow to
        control the access permissions of the stream.
 
-       para_server needs a "database tool" to work, mainly to
-       determine which song to stream next. There are three such
-       tools available: random, plm and mysql. The former chooses
-       audio files randomly and plm, the playlist manager, can handle
+       para_server needs an  "audio file selector" to work, mainly to
+       determine which song to stream next. There are three selectors
+       available: random, plm and mysql. The former chooses audio
+       files randomly and plm, the playlist manager, can handle
        playlists. Both are always supported.
 
        playlists. Both are always supported.
 
-       The (optional) mysql database tool connects to a mysql server
+       The (optional) mysql selector connects to a mysql server
        which holds information on your audio files. It has several
        unusual features, see README.mysql for details.
 
        which holds information on your audio files. It has several
        unusual features, see README.mysql for details.
 
@@ -211,9 +211,9 @@ Distribution of paraslash is covered by the GNU GPL. See file COPYING.
 
 LIMITATIONS:
 ~~~~~~~~~~~~
 
 LIMITATIONS:
 ~~~~~~~~~~~~
-The mysql database tool assumes that the basenames of your audio files
-are unique. If this is not the case, don't use this database tool,
-rename your files, or create your own database tool.
+The mysql selector assumes that the basenames of your audio files are
+unique. If this is not the case, don't use this selector, rename your
+files, or create your own one.
 
 THE AUTHOR:
 ~~~~~~~~~~~
 
 THE AUTHOR:
 ~~~~~~~~~~~
index 7af828073e3621385ac3db5cf69e3bb63b491bc7..4bdc43ffce2d7afd843ac13965c2797f09f833f0 100644 (file)
@@ -1,8 +1,8 @@
 README.mysql
 ============
 
 README.mysql
 ============
 
-This file describes how to use the mysql database tool which comes
-with the paraslash package.
+This file describes how to use the mysql audio file selector which
+comes with the paraslash package.
 
 It assumes you have already installed mysql and paraslash as described
 in INSTALL, so read README and INSTALL before proceeding.
 
 It assumes you have already installed mysql and paraslash as described
 in INSTALL, so read README and INSTALL before proceeding.
@@ -41,39 +41,36 @@ effect you'll need to do
 
 Or, restart the server.
 
 
 Or, restart the server.
 
-Switch to the mysql dbtool
-~~~~~~~~~~~~~~~~~~~~~~~~~~
+Switch to the mysql audio file selector
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
-Actually, the mysql database tool should already be selected (just
-ignore the warning about the missing database). To verify that it is
-indeed activated, type
+The command
 
        para_client cdt
 
 
        para_client cdt
 
-which prints the name of the current database tool. If the mysql
-dbtool is not selected, try
+prints the name of the current selector. Try
 
        para_client cdt mysql
 
 
        para_client cdt mysql
 
-If this doesn't work either, it means that some required config options
-were not specified (check the log for more info) or that para_server
-was built without mysql support. Type
+to switch to the mysql selector. If this doesn't work, it means that
+some required config options were not specified (check the log for
+more info) or that para_server was built without mysql support. Type
 
        para_client si
 
 
        para_client si
 
-to find out. If mysql is not mentioned as a supported database tool,
+to find out. If mysql is not mentioned as a supported selector,
 you'll have to recompile.
 
 
 Create a new database
 ~~~~~~~~~~~~~~~~~~~~~
 
 you'll have to recompile.
 
 
 Create a new database
 ~~~~~~~~~~~~~~~~~~~~~
 
-Once the mysql database tool is selected, create the database:
+Once the mysql selector is activated, create the database:
 
        para_client cdb
        para_client cdt mysql
 
 
        para_client cdb
        para_client cdt mysql
 
-The second command forces para_server to re-init the mysql dbtool.
+The second command forces para_server to re-init the mysql selector.
 Check the log. There should not be any warnings or errors.
 
 
 Check the log. There should not be any warnings or errors.
 
 
@@ -91,7 +88,7 @@ The command
 
        para_client ls
 
 
        para_client ls
 
-prints the list of all files known by the mysql dbtool. If the list
+prints the list of all files known by the mysql selector. If the list
 is empty, double check the mysql_audio_file_dir option.
 
 
 is empty, double check the mysql_audio_file_dir option.
 
 
@@ -120,7 +117,7 @@ You should now be able to start streaming with
 Attribute usage
 ~~~~~~~~~~~~~~~
 
 Attribute usage
 ~~~~~~~~~~~~~~~
 
-An attribute is simply a bit which can be set for each sound file
+An attribute is simply a bit which can be set for each audio file
 individually. You may have as many attributes as you like. A new
 attribute "test" is created by
 
 individually. You may have as many attributes as you like. A new
 attribute "test" is created by
 
@@ -130,30 +127,30 @@ and
        para_client laa
 
 lists all available attributes. You can set the "test" attribute for
        para_client laa
 
 lists all available attributes. You can set the "test" attribute for
-the current song by executing
+the current audio file by executing
 
        para_client sa test+
 
 
        para_client sa test+
 
-or for any particular song by
+or for any particular audio file by
 
        para_client sa test+ filename
 
 
        para_client sa test+ filename
 
-You can unset the attribute "test" for the current song with
+Unset the attribute "test" for the current audio file with
 
 
-        para_client sa test-
+       para_client sa test-
 
 
-and you can drop the test attribute entirely from the database with
+and drop the test attribute entirely from the database with
 
        para_client da test
 
 Stream usage
 ~~~~~~~~~~~~
 
 
        para_client da test
 
 Stream usage
 ~~~~~~~~~~~~
 
-A stream is a pair of expressions in terms of attributes and other
-meta data contained in the database. The first, boolian, expression
-determines the set of songs which are permitted in this stream. The
-second, integer, expression determines the order in which permitted
-songs are going to be fed to the audio file sender(s).
+A stream is a pair of expressions in terms of attributes and other data
+contained in the database. The first, boolian, expression determines
+the set of audio files which are admissible in this stream. The second,
+integer, expression determines the order in which admissible files
+are going to be fed to the audio file sender(s).
 
 To create a new stream called "my_stream", put arbitrary many (including
 none) accept or deny lines and one or zero score lines into some
 
 To create a new stream called "my_stream", put arbitrary many (including
 none) accept or deny lines and one or zero score lines into some
@@ -163,7 +160,7 @@ expression. The command
 
        para_client stradd my_stream < tmpfile
 
 
        para_client stradd my_stream < tmpfile
 
-adds the stream "my_stream" to dbtool's stream database.
+adds the stream "my_stream" to the table of streams.
 
 If the stream definition is really short, you may also just pipe it to
 the client rather than using temporary files. Like this:
 
 If the stream definition is really short, you may also just pipe it to
 the client rather than using temporary files. Like this:
@@ -173,9 +170,9 @@ the client rather than using temporary files. Like this:
 
 Example:
 
 
 Example:
 
-        Assume you already have an attribute "test" and you'd like to
-        to restrict the set of songs being played to those having the
-        "test" attribute set. Define a new stream "only_test" by
+       Assume you already have an attribute "test" and you'd like to
+       to restrict the set of songs being played to those having the
+       "test" attribute set. Define a new stream "only_test" by
 
                echo 'accept: IS_SET(test)' | para_client stradd only_test
 
 
                echo 'accept: IS_SET(test)' | para_client stradd only_test
 
@@ -186,7 +183,7 @@ Example:
        only the desired songs are going to be played.
 
 There is no need to keep the temporary files containing the stream
        only the desired songs are going to be played.
 
 There is no need to keep the temporary files containing the stream
-definition since you can always query the database to get it back:
+definition since you can always use the strq command to get it back:
 
        para_client strq only_test
 
 
        para_client strq only_test
 
@@ -279,32 +276,32 @@ definition or as the default scoring rule in the config file) include:
 
        LASTPLAYED()/1440
 
 
        LASTPLAYED()/1440
 
-This means that each song's score is just the number of days that went
-by since this song has been played (one day is 1440 minutes). This
-is fine in many cases since the dbtool then always chooses that
-admissible song, which wasn't played for the longest time.
+This means that the score of an audio file is just the number of days
+that went by since it has been played the last time (one day is 1440
+minutes). In other words, the mysql selector choses that admissible
+file which wasn't played for the longest time.
 
 
-However, one disadvantage of this scoring sheme is that new songs,
+However, one disadvantage of this scoring sheme is that new files,
 once played, are going to be deferred for a possibly very long period
 once played, are going to be deferred for a possibly very long period
-depending on the size of your collection of (admissible) songs. Hence
+depending on the size of your collection of (admissible) files. Hence
 the following scoring rule comes into mind:
 
 the following scoring rule comes into mind:
 
-        score: -NUMPLAYED()
+       score: -NUMPLAYED()
 
 
-since this gives newer songs, i.e. songs to which you haven't listen to
+since this gives newer files, i.e. files to which you haven't listen to
 that often, a higher score than older songs you already know by heart.
 
 You can also use a combination of these two methods:
 
 that often, a higher score than older songs you already know by heart.
 
 You can also use a combination of these two methods:
 
-        score: LASTPLAYED()/1440 - 10 * NUMPLAYED()
+       score: LASTPLAYED()/1440 - 10 * NUMPLAYED()
 
 which subtracts 10 score points for each time paraslash has played
 
 which subtracts 10 score points for each time paraslash has played
-this song.
+this file.
 
 
-Another useful feature for scoring is due to the fact that "true"
-expands to one and "false" to zero. So you can also use the
-IS_SET/IS_N_SET/NAME_LIKE macros in a score line to give
-your favorite band "bar" some extra points:
+Another useful feature for scoring is due to the fact that
+"true" expands to one and "false" to zero. So you can also use the
+IS_SET/IS_N_SET/NAME_LIKE macros in a score line to give your favorite
+band "bar" some extra points:
 
        score: 40 * IS_SET(foo) + 20 * NAME_LIKE(%bar%) + LASTPLAYED()/1440
 
 
        score: 40 * IS_SET(foo) + 20 * NAME_LIKE(%bar%) + LASTPLAYED()/1440
 
@@ -312,9 +309,9 @@ your favorite band "bar" some extra points:
 Pictures
 ~~~~~~~~
 
 Pictures
 ~~~~~~~~
 
-dbtool can also magage images that, when associated with certain songs,
-can be displayed by para_sdl_gui and para_krell when one of these songs
-is playing. It is also possible to just retrieve the current image via
+The mysql selector can also magage images that, when associated
+with one or more audio files, can be displayed by para_sdl_gui and
+para_krell. It is also possible to just retrieve the current image via
 
        para_client pic > filename
 
 
        para_client pic > filename
 
index 3fe6e5db008a6d2cfdc767cbd8e04321ea739391..7a258f2e4c4e9792ff0275e868947b0c1bc0af34 100644 (file)
--- a/command.c
+++ b/command.c
@@ -75,11 +75,11 @@ static struct server_command cmd_struct[] = {
 .name = "cdt",
 .handler = com_cdt,
 .perms = DB_READ | DB_WRITE,
 .name = "cdt",
 .handler = com_cdt,
 .perms = DB_READ | DB_WRITE,
-.description = "change database tool",
-.synopsis = "cdt [name_of_new_dbtool]",
+.description = "change the current audio file selector",
+.synopsis = "cdt [new_selector]",
 .help =
 .help =
-"Deactivate current dbtool and activate name_of_new_dbtool. If no\n"
-"argument was given, print the current database tool.\n"
+"Shutdown the current selector and activate new_selector. If no\n"
+"argument was given, print the name of the current selector.\n"
 },
 
 {
 },
 
 {
@@ -732,7 +732,7 @@ static struct server_command *get_cmd_ptr(char *name, char **handler)
                                *handler = para_strdup("para_server"); /* server commands */
                        return cmd;
                }
                                *handler = para_strdup("para_server"); /* server commands */
                        return cmd;
                }
-       /* not found, look for dbtool commands */
+       /* not found, look for commands supported by the current selector */
        mmd_lock();
        if (handler)
                *handler = make_message("the %s database tool", dblist[mmd->dbt_num].name);
        mmd_lock();
        if (handler)
                *handler = make_message("the %s database tool", dblist[mmd->dbt_num].name);
index 41f1558d44fac653ef3c4d323b725e3fc8ef9cc8..e78b73f4fd222f2f9029b6658f671e9b6906c901 100644 (file)
--- a/server.c
+++ b/server.c
@@ -47,11 +47,11 @@ INIT_SERVER_ERRLISTS;
 /** shut down non-authorized connections after that many seconds */
 #define ALARM_TIMEOUT 10
 
 /** shut down non-authorized connections after that many seconds */
 #define ALARM_TIMEOUT 10
 
-/* these are exported to afs/command/dbtool */
+/* these are exported to afs.c. command.c and to all selectors */
 struct misc_meta_data *mmd;
 /** the configuration of para_server
  *
 struct misc_meta_data *mmd;
 /** the configuration of para_server
  *
- * It also contains the options for all database tools and all supported
+ * It also contains the options for all audio file selectors and all supported
  * senders.
 */
 struct gengetopt_args_info conf;
  * senders.
 */
 struct gengetopt_args_info conf;
@@ -60,7 +60,7 @@ extern void http_send_init(struct sender *);
 extern void ortp_send_init(struct sender *);
 extern struct audio_format afl[];
 
 extern void ortp_send_init(struct sender *);
 extern struct audio_format afl[];
 
-/** the list of supported database tools */
+/** the list of supported audio file selectors */
 struct dbtool dblist[] = {
        {
                .name = "random",
 struct dbtool dblist[] = {
        {
                .name = "random",
@@ -286,7 +286,7 @@ static void init_dbtool(void)
        for (i = 0; dblist[i].name; i++) {
                if (strcmp(dblist[i].name, conf.selector_arg))
                        continue;
        for (i = 0; dblist[i].name; i++) {
                if (strcmp(dblist[i].name, conf.selector_arg))
                        continue;
-               PARA_NOTICE_LOG("initializing %s database tool\n",
+               PARA_NOTICE_LOG("initializing %s audio file selector\n",
                        dblist[i].name);
                ret = dblist[i].init(&dblist[i]);
                if (ret < 0) {
                        dblist[i].name);
                ret = dblist[i].init(&dblist[i]);
                if (ret < 0) {
@@ -296,7 +296,7 @@ static void init_dbtool(void)
                mmd->dbt_num = i;
                return;
        }
                mmd->dbt_num = i;
                return;
        }
-       PARA_WARNING_LOG("%s", "falling back to the random dbtool\n");
+       PARA_WARNING_LOG("%s", "falling back to the random selector\n");
 random:
        mmd->dbt_num = 0;
        dblist[0].init(&dblist[0]); /* always successful */
 random:
        mmd->dbt_num = 0;
        dblist[0].init(&dblist[0]); /* always successful */
@@ -381,7 +381,7 @@ static void handle_dbt_change(void)
                return;
        }
        /* init failed */
                return;
        }
        /* init failed */
-       PARA_ERROR_LOG("%s -- switching to the random dbtool\n", PARA_STRERROR(-ret));
+       PARA_ERROR_LOG("%s -- switching to the random selector\n", PARA_STRERROR(-ret));
        dblist[0].init(&dblist[0]);
        mmd->dbt_num = 0;
 }
        dblist[0].init(&dblist[0]);
        mmd->dbt_num = 0;
 }
@@ -395,8 +395,8 @@ static void handle_sighup(void)
        close_log(logfile); /* gets reopened if necessary by parse_config */
        logfile = NULL;
        parse_config(1); /* reopens log */
        close_log(logfile); /* gets reopened if necessary by parse_config */
        logfile = NULL;
        parse_config(1); /* reopens log */
-       mmd->dbt_change = mmd->dbt_num; /* do not change dbtool */
-       handle_dbt_change(); /* force reloading dbtool */
+       mmd->dbt_change = mmd->dbt_num; /* do not change selector */
+       handle_dbt_change(); /* reload selector */
 }
 
 static void status_refresh(void)
 }
 
 static void status_refresh(void)