Skip to content

AndreyPavlenko/chorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This script reads a VDR channels.conf form standard input or file and orders                                                                                                                                                     
channels according to the specified template. Template is a text file with grep                                                                                                                                                  
patterns (one per line) matching VDR channels from the the input. Please refer                                                                                                                                                   
to the grep documentation for the pattern details.                                                                                                                                                                               
                                                                                                                                                                                                                                 
Lines starting with hash (#) are treated as comments. Lines starting with colon                                                                                                                                                  
(:) are treated as group names. Lines ending with backslash (\) are joined with                                                                                                                                                  
the next line. The backslash acts as escape character and must be escaped in                                                                                                                                                     
the patterns.                                                                                                                                                                                                                    
                                                                                                                                                                                                                                 
Lines starting with '$' character are treated as:                                                                                                                                                                                
                                                                                                                                                                                                                                 
    '$e <script>'       Evaluate the script and append the script's output to                                                                                                                                                    
                        the channels output stream.                                                                                                                                                                              
                                                                                                                                                                                                                                 
    '$t <script>'       Evaluate the script and process the script's output as                                                                                                                                                   
                        channels template. This can be used for dynamic templates                                                                                                                                                
                        generation.                                                                                                                                                                                              
                                                                                                                                                                                                                                 
    '$<args> <pattern>' Match channels with the specified pattern and grep                                                                                                                                                       
                        arguments.                                                                                                                                                                                               
                                                                                                                                                                                                                                 
    '$r <regex>'        Remove the matched channels from the input to prevent                                                                                                                                                    
                        subsequent matching with different patterns. The r option                                                                                                                                                
                        may be mixed with the grep args.                                                                                                                                                                         
                                                                                                                                                                                                                                 
Usage: chorder [options] [template]

OPTIONS:
   -x <expr>    Regular expression mathing channels that should be excluded.
   -X <file>    File with channel exclude expressions (one per line).
   -f <decl>    This option allows to override a channel's fields.
                <decl> - semicolon separated fields declaration expressed in 
                Perl language. The following example overrides the CA field if 
                the channel's provider is HTB+:
                -f '$f10 = ($f2 eq 'HTB+') ? '500,5601' : $f10'
   -F <file>    File with channel field override expressions (one per line).
   -i <file>    Read the specified input file instead of stdin.
   -o <file>    Write to the specified output file instead of stdout.
   -d <file>    Write debug messages to the specified file instead of sterr.
   -t <file>    Template file.
   -v           Verbose mode - print debug information.
   -h           Print help.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages