From 8c72e63ba4d41c4d9722ddff3c000de314ff66dc Mon Sep 17 00:00:00 2001 From: kaliko Date: Sun, 20 Sep 2015 14:06:42 +0200 Subject: [PATCH] Now use "var-dir" as option name --- data/bash/completion.sh | 4 ++-- data/man/files.xml | 2 +- data/man/mpd-sima.1 | 18 ++++++++++-------- data/man/mpd_sima.1.xml | 12 ++++++------ data/man/mpd_sima.cfg.5 | 8 +++++--- data/man/simadb_cli.1 | 4 ++-- doc/Changelog | 1 + doc/THANKS | 2 ++ sima/utils/config.py | 2 +- sima/utils/startopt.py | 2 +- 10 files changed, 31 insertions(+), 24 deletions(-) diff --git a/data/bash/completion.sh b/data/bash/completion.sh index 0d320ca..2940cb7 100644 --- a/data/bash/completion.sh +++ b/data/bash/completion.sh @@ -33,7 +33,7 @@ _sima() { -S --host \ -P --port \ -h --help --version \ - --var-dir --var_dir \ + --var-dir \ --generate-config \ -d --daemon" @@ -43,7 +43,7 @@ _sima() { fi case "${prev}" in - --var_dir|--var-dir) + --var-dir) _filedir -d ;; -v|--log-level) diff --git a/data/man/files.xml b/data/man/files.xml index 806d5de..5743c5b 100644 --- a/data/man/files.xml +++ b/data/man/files.xml @@ -24,7 +24,7 @@ Usually XDG_DATA_HOME is set to ${HOME}/.local/share and XDG_CONFIG_HOME to ${HOME}/.config.You may override them using - command line option (cf. + command line option and (cf. mpd-sima 1) diff --git a/data/man/mpd-sima.1 b/data/man/mpd-sima.1 index 3e9f6be..c139e79 100644 --- a/data/man/mpd-sima.1 +++ b/data/man/mpd-sima.1 @@ -2,12 +2,12 @@ .\" Title: mpd-sima .\" Author: Jack Kaliko .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 02/12/2015 +.\" Date: 09/20/2015 .\" Manual: mpd-sima 0.14.0 User Manual .\" Source: mpd-sima .\" Language: English .\" -.TH "MPD\-SIMA" "1" "02/12/2015" "mpd-sima" "mpd-sima 0.14.0 User Manual" +.TH "MPD\-SIMA" "1" "09/20/2015" "mpd-sima" "mpd-sima 0.14.0 User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,9 +31,9 @@ mpd-sima \- mpd\-sima will try to maintain some titles ahead in the queue following different policies\&. .SH "SYNOPSIS" .HP \w'\fBmpd\-sima\fR\ 'u -\fBmpd\-sima\fR [\fB\-\-daemon\fR] [\fB\-\-config=\fR\fIconf_file\fR] [\fB\-\-var_dir=\fR\fIvar_directory\fR] [\fB\-\-pid=\fR\fIpid_file\fR] [\fB\-\-log=\fR\fIlog_file\fR] [\fB\-\-log\-level=\fR\fIlog_level\fR] [\fB\-\-host=\fR\fImpd_host\fR] [\fB\-\-mpd_port=\fR\fImpd_port\fR] +\fBmpd\-sima\fR [\fB\-\-daemon\fR] [\fB\-\-config=\fR\fIconf_file\fR] [\fB\-\-var\-dir=\fR\fIvar_directory\fR] [\fB\-\-pid=\fR\fIpid_file\fR] [\fB\-\-log=\fR\fIlog_file\fR] [\fB\-\-log\-level=\fR\fIlog_level\fR] [\fB\-\-host=\fR\fImpd_host\fR] [\fB\-\-mpd_port=\fR\fImpd_port\fR] .HP \w'\fBmpd\-sima\fR\ 'u -\fBmpd\-sima\fR \-\-create\-db [\fB\-\-var_dir=\fR\fIvar_directory\fR] +\fBmpd\-sima\fR \-\-create\-db [\fB\-\-var\-dir=\fR\fIvar_directory\fR] .HP \w'\fBmpd\-sima\fR\ 'u \fBmpd\-sima\fR \-\-generate\-config [\fB\&...\fR] .HP \w'\fBmpd\-sima\fR\ 'u @@ -55,7 +55,7 @@ the section called \(lqENVIRONMENT\(rq\&. .PP Here follows an example on how to launch mpd\-sima as a service on your system, not attach to regular user configuration/database\&. .PP -\fBmpd\-sima \-\-daemon \-\-conf=/etc/mpd_sima\&.cfg \-\-var_dir=/var/cache/mpd\-sima/ \-\-pid=/run/mpd\-sima\&.pid \-\-log=/var/log/mpd\-sima\&.log\fR +\fBmpd\-sima \-\-daemon \-\-conf=/etc/mpd_sima\&.cfg \-\-var\-dir=/var/cache/mpd\-sima/ \-\-pid=/run/mpd\-sima\&.pid \-\-log=/var/log/mpd\-sima\&.log\fR .SS "Launch in user land" .PP Launching mpd\-sima from/whithin your user account is easy, you can simply call @@ -138,7 +138,7 @@ the section called \(lqFILES\(rq\&. .RE .PP -\fB\-\-var_dir=\fR\fB\fIvar_directory\fR\fR +\fB\-\-var\-dir=\fR\fB\fIvar_directory\fR\fR .RS 4 Use the specific path \fIvar_directory\fR @@ -159,7 +159,7 @@ Generate a sample configuration file according to the current configuration\&. Y \fB\-\-create\-db\fR .RS 4 Create the database and exit\&. Uses folder specified with -\fB\-\-var_dir\fR +\fB\-\-var\-dir\fR or default directory\&. .br Default is to use @@ -230,7 +230,9 @@ to ${HOME}/\&.config\&. .br You may override them using command line option -\fB\-\-var_dir\fR +\fB\-\-var\-dir\fR +and +\fB\-\-config\fR (cf\&. \fBmpd-sima\fR(1)) .SH "ENVIRONMENT" diff --git a/data/man/mpd_sima.1.xml b/data/man/mpd_sima.1.xml index 9a36ee5..c0b59d4 100644 --- a/data/man/mpd_sima.1.xml +++ b/data/man/mpd_sima.1.xml @@ -64,7 +64,7 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ &dhpackage; conf_file - var_directory + var_directory pid_file log_file log_level @@ -74,7 +74,7 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ &dhpackage; --create-db - var_directory + var_directory &dhpackage; @@ -114,7 +114,7 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ Launch as a system service (dæmon). Here follows an example on how to launch &dhpackage; as a service on your system, not attach to regular user configuration/database. - &dhpackage; --daemon --conf=/etc/mpd_sima.cfg --var_dir=/var/cache/mpd-sima/ --pid=/run/mpd-sima.pid --log=/var/log/mpd-sima.log + &dhpackage; --daemon --conf=/etc/mpd_sima.cfg --var-dir=/var/cache/mpd-sima/ --pid=/run/mpd-sima.pid --log=/var/log/mpd-sima.log Launch in user land @@ -189,8 +189,8 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ - - + + Use the specific path var_directory to look for (or create) var files (ie. database) instead of looking at the default user data location.Default is to look in $XDG_DATA_HOME/mpd_sima/. Concerning $XDG_DATA_HOME see also @@ -204,7 +204,7 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/ - Create the database and exit. Uses folder specified with or default directory.Default is to use $XDG_DATA_HOME/mpd_sima/. Concerning $XDG_DATA_HOME see also + Create the database and exit. Uses folder specified with or default directory.Default is to use $XDG_DATA_HOME/mpd_sima/. Concerning $XDG_DATA_HOME see also diff --git a/data/man/mpd_sima.cfg.5 b/data/man/mpd_sima.cfg.5 index cd7cf01..d5e0c57 100644 --- a/data/man/mpd_sima.cfg.5 +++ b/data/man/mpd_sima.cfg.5 @@ -2,12 +2,12 @@ .\" Title: mpd_sima.cfg .\" Author: Jack Kaliko .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 02/15/2015 +.\" Date: 09/20/2015 .\" Manual: mpd-sima 0.14.0 User Manual .\" Source: mpd-sima .\" Language: English .\" -.TH "MPD_SIMA\&.CFG" "5" "02/15/2015" "mpd-sima" "mpd-sima 0.14.0 User Manual" +.TH "MPD_SIMA\&.CFG" "5" "09/20/2015" "mpd-sima" "mpd-sima 0.14.0 User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -455,7 +455,9 @@ to ${HOME}/\&.config\&. .br You may override them using command line option -\fB\-\-var_dir\fR +\fB\-\-var\-dir\fR +and +\fB\-\-config\fR (cf\&. \fBmpd-sima\fR(1)) .SH "FEEDBACK/BUGS" diff --git a/data/man/simadb_cli.1 b/data/man/simadb_cli.1 index 19a4fe9..734a2cf 100644 --- a/data/man/simadb_cli.1 +++ b/data/man/simadb_cli.1 @@ -2,12 +2,12 @@ .\" Title: simadb_cli .\" Author: Jack Kaliko .\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 02/08/2015 +.\" Date: 09/20/2015 .\" Manual: mpd-sima 0.14.0 User Manual .\" Source: mpd-sima .\" Language: English .\" -.TH "SIMADB_CLI" "1" "02/08/2015" "mpd-sima" "mpd-sima 0.14.0 User Manual" +.TH "SIMADB_CLI" "1" "09/20/2015" "mpd-sima" "mpd-sima 0.14.0 User Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/Changelog b/doc/Changelog index 87f6b04..03d5ee3 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -7,6 +7,7 @@ MPD_sima v0.14.0 * Fixed default conf file name (back to mpd_sima.cfg) * Fixed http cache for lastFM * Cleanup code (removed users similarities) + * Make "var-dir" option default name instead of "var_dir" -- kaliko jack UNRELEASED diff --git a/doc/THANKS b/doc/THANKS index 322163b..2960c92 100644 --- a/doc/THANKS +++ b/doc/THANKS @@ -1,5 +1,7 @@ THANKS + * Codingteam, the original forge hosting the project. + * Mathieu (a.k.a. MuLiMa), for the projet mpd_dynamic_playlister, initial inspiration of MPD_sima. http://forum.ubuntu-fr.org/viewtopic.php?id=146141 diff --git a/sima/utils/config.py b/sima/utils/config.py index 346bbe7..92d3fb9 100644 --- a/sima/utils/config.py +++ b/sima/utils/config.py @@ -214,7 +214,7 @@ class ConfMan(object): # CONFIG MANAGER CLASS data_dir = join(homedir, '.local', 'share', DIRNAME) else: self.log.critical('Can\'t find a suitable location for data folder (XDG_DATA_HOME)') - self.log.critical('Please use "--var_dir" to set a proper location') + self.log.critical('Please use "--var-dir" to set a proper location') sys.exit(1) if self.startopt.get('conf_file'): diff --git a/sima/utils/startopt.py b/sima/utils/startopt.py index e393304..8646309 100644 --- a/sima/utils/startopt.py +++ b/sima/utils/startopt.py @@ -98,7 +98,7 @@ OPTS = [ 'action': 'store_true', 'dest': 'create_db', 'help': '''Create database and exit, use destination - specified in --var_dir or standard location.'''}, + specified in --var-dir or standard location.'''}, { 'sw':['--queue-mode', '-q'], 'dest': 'queue_mode', -- 2.39.5