server: Convert com_select() to lopsub.
[paraslash.git] / m4 / lls / server_cmd.suite.m4
index 4a1f9f462497eb26ec1cfd57fd0d153539dbfef7..eda1ba6123178310bf6ac688df8b6bf05f491034 100644 (file)
@@ -52,6 +52,68 @@ aux_info_prefix = Permissions:
                        Print what is being done.
                [/help]
 
+[subcommand check]
+       purpose = run integrity checks on database tables
+       aux_info = AFS_READ
+       [description]
+               If no options are given, all checks are run.
+       [/description]
+       [option aft]
+               short_opt = a
+               summary = run audio file table checks
+               [help]
+                       Report stale paths and invalid image and lyrics ids of the audio
+                       file table.
+               [/help]
+       [option attribute]
+               short_opt = A
+               summary = check for invalid attributes
+               [help]
+                       Report audio files whose attribute bitmask is invalid, i.e., has a bit
+                       set which does not correspond to any attribute of the attribute table.
+               [/help]
+       [option mood]
+               short_opt = m
+               summary = check for invalid mood definitions
+               [help]
+                       Run syntax checks on all moods of the mood table.
+               [/help]
+       [option playlist]
+               short_opt = p
+               summary = find invalid paths in playlists
+               [help]
+                       Check all playlists for paths not contained in the audio file table.
+               [/help]
+
+[subcommand cpsi]
+       purpose = copy selected parts of the audio file selector info
+       non-opts-name = source pattern...
+       aux_info = AFS_READ | AFS_WRITE
+       [description]
+               If no option, or only --verbose is given, all fields of the audio
+               file selector info structure are copied to each row of the audio file
+               table whose path matches at least one of the given patterns. Otherwise,
+               only those fields which correspond to the given options are copied.
+       [/description]
+       [option attribute-bitmap]
+               short_opt = a
+               summary = copy the attribute bitmap
+       [option image-id]
+               short_opt = i
+               summary = copy the image id
+       [option lyrics-id]
+               short_opt = y
+               summary = copy the lyrics id
+       [option lastplayed]
+               short_opt = l
+               summary = copy the lastplayed timestamp
+       [option numplayed]
+               short_opt = n
+               summary = copy the numplayed counter
+       [option verbose]
+               short_opt = v
+               summary = enable verbose mode
+
 [subcommand ff]
        purpose = jump N seconds forward or backward
        synopsis = n[-]
@@ -107,6 +169,45 @@ aux_info_prefix = Permissions:
                n <= 100.
        [/description]
 
+[subcommand lsatt]
+       purpose = list attributes
+       aux_info = AFS_READ
+       [description]
+               Print the list of all defined attributes which match the given
+               pattern. If no pattern is given, the full list is printed.
+       [/description]
+
+       [option id-sort]
+               short_opt = i
+               summary = sort attributes by id
+               [help]
+                       The default is to sort alphabetically by name.
+
+                       Attributes are internally represented as an 64 bit array. The attribute
+                       id is the bit number in this array.
+               [/help]
+       [option long]
+               short_opt = l
+               summary = print long listing
+               [help]
+                       The long listing prints the attribute id in addition to the name of
+                       the attribute. The id is printed as a decimal number and is separated
+                       from the name by a tab character.
+               [/help]
+       [option reverse]
+               short_opt = r
+               summary = reverse sort order
+
+[subcommand mvatt]
+       purpose = rename an attribute
+       synopsis = source dest
+       aux_info = AFS_READ | AFS_WRITE
+       [description]
+               Rename the attribute given by the first argument to the destination
+               given by the second argument. It is an error if the destination
+               attribute exists.
+       [/description]
+
 [subcommand next]
        purpose = close the stream and start to stream the next audio file
        aux_info = VSS_READ | VSS_WRITE
@@ -145,6 +246,52 @@ aux_info_prefix = Permissions:
                Set the 'P' (playing) bit of the vss status flags.
        [/description]
 
+[subcommand rm]
+       purpose = remove rows from the audio file table
+       non-opts-name = pattern...
+       aux_info = AFS_READ | AFS_WRITE
+       [description]
+               Remove all rows of the audio file table which match any of the given
+               patterns. Note that this affects only the database table; the command
+               won't touch your audio files on disk.
+       [/description]
+       [option verbose]
+               short_opt = v
+               summary = print paths of deleted rows
+       [option force]
+               short_opt = f
+               summary = don't complain if nothing was removed
+       [option pathname-match]
+               short_opt = p
+               summary = modify matching behaviour
+               [help]
+                       Match a slash in the path only with a slash in pattern and not by an
+                       asterisk (*) or a question mark (?) metacharacter, nor by a bracket
+                       expression ([]) containing a slash (see fnmatch(3)).
+               [/help]
+
+[subcommand rmatt]
+       purpose = remove attribute(s)
+       non-opts-name = pattern...
+       aux_info = AFS_READ | AFS_WRITE
+       [description]
+               Remove all attributes which match any given pattern. All information
+               about the removed attributes in the audio file table is lost.
+       [/description]
+
+[subcommand select]
+       purpose = activate a mood or a playlist
+       non-opts-name = specifier/name
+       aux_info = AFS_READ | AFS_WRITE
+       [description]
+               The specifier is either 'm' or 'p' to indicate whether a playlist or
+               a mood should be activated. Example:
+
+                       select m/foo
+
+               activates the mood named 'foo'.
+       [/description]
+
 [subcommand sender]
        purpose = control paraslash senders
        synopsis = [sender cmd [arguments]]
@@ -164,6 +311,20 @@ aux_info_prefix = Permissions:
 
        [/description]
 
+[subcommand setatt]
+       purpose = set or unset attributes
+       synopsis = attribute{+|-}... pattern...
+       aux_info = AFS_READ | AFS_WRITE
+       [description]
+               Set ('+') or unset ('-') the given attributes for all audio files
+               matching the given pattern. Example:
+
+                       setatt rock+ punk+ pop- '*foo.mp3'
+
+               sets the 'rock' and the 'punk' attribute and unsets the 'pop' attribute
+               of all files ending with 'foo.mp3'.
+       [/description]
+
 [subcommand si]
        purpose = print server info
        aux_info = NO_PERMISSION_REQUIRED