From 24993cd99b847733894f57fd004ed52b5390244a Mon Sep 17 00:00:00 2001 From: kaliko Date: Wed, 12 Feb 2014 00:52:30 +0100 Subject: [PATCH] Add copyright headers & clean-up --- sima/client.py | 20 +++++++++++++++++++- sima/core.py | 18 ++++++++++++++++++ sima/info.py | 2 +- sima/launch.py | 18 ++++++++++++++++++ sima/lib/logger.py | 2 +- sima/lib/player.py | 18 ++++++++++++++++++ sima/lib/simafm.py | 6 +++--- sima/lib/{webservice.py => webserv.py} | 18 ++++++++++++++++++ sima/plugins/contrib/placeholder.py | 21 +++++++++++++++++++-- sima/plugins/core/history.py | 18 ++++++++++++++++++ sima/plugins/core/mpdoptions.py | 18 ++++++++++++++++++ sima/plugins/internal/crop.py | 18 ++++++++++++++++++ sima/plugins/internal/echonest.py | 20 +++++++++++++++++++- sima/plugins/internal/lastfm.py | 20 +++++++++++++++++++- sima/plugins/internal/randomfallback.py | 18 ++++++++++++++++++ sima/utils/config.py | 3 +-- sima/utils/leven.py | 1 - sima/utils/startopt.py | 2 +- 18 files changed, 227 insertions(+), 14 deletions(-) rename sima/lib/{webservice.py => webserv.py} (94%) diff --git a/sima/client.py b/sima/client.py index 6cd3802..ff6ca38 100644 --- a/sima/client.py +++ b/sima/client.py @@ -1,4 +1,22 @@ -# -* coding: utf-8 -*- +# -*- coding: utf-8 -*- +# Copyright (c) 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# """MPD client for Sima This client is built above python-musicpd a fork of python-mpd diff --git a/sima/core.py b/sima/core.py index 8e075b0..d7a6136 100644 --- a/sima/core.py +++ b/sima/core.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2009, 2010, 2011, 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# """Core Object dealing with plugins and player client """ diff --git a/sima/info.py b/sima/info.py index 3b6d369..5bf5084 100644 --- a/sima/info.py +++ b/sima/info.py @@ -11,7 +11,7 @@ queue is getting short. """ -__version__ = '0.12.0pr2' +__version__ = '0.12.0pr4' __author__ = 'kaliko jack' __email__ = 'kaliko@azylum.org' __url__ = 'git://git.kaliko.me/sima.git' diff --git a/sima/launch.py b/sima/launch.py index 24802bf..a25b313 100644 --- a/sima/launch.py +++ b/sima/launch.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# """Sima """ diff --git a/sima/lib/logger.py b/sima/lib/logger.py index 05c675e..a4ed23d 100644 --- a/sima/lib/logger.py +++ b/sima/lib/logger.py @@ -29,7 +29,7 @@ import sys LOG_FORMATS = { - logging.DEBUG: '{asctime} {filename: >11}:{lineno: <3} {levelname: <5}: {message}', + logging.DEBUG: '{asctime} {filename: >11}:{lineno: <3} {levelname: <7}: {message}', logging.INFO: '{asctime} {levelname: <7}: {message}', #logging.DEBUG: '{asctime} {filename}:{lineno}({funcName}) ' #'{levelname}: {message}', diff --git a/sima/lib/player.py b/sima/lib/player.py index 751e464..ddba0a9 100644 --- a/sima/lib/player.py +++ b/sima/lib/player.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2009-2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# # TODO: # Add decorator to filter through history? diff --git a/sima/lib/simafm.py b/sima/lib/simafm.py index 04ee37b..18625a6 100644 --- a/sima/lib/simafm.py +++ b/sima/lib/simafm.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2014 Jack Kaliko +# Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Jack Kaliko # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -21,7 +21,7 @@ Consume EchoNest web service """ -__version__ = '0.0.1' +__version__ = '0.5.0' __author__ = 'Jack Kaliko' @@ -38,7 +38,7 @@ if len(LFM.get('apikey')) == 43: # simple hack allowing imp.reload # Some definitions WAIT_BETWEEN_REQUESTS = timedelta(0, 1) -SOCKET_TIMEOUT = 4 +SOCKET_TIMEOUT = 6 class SimaFM(): diff --git a/sima/lib/webservice.py b/sima/lib/webserv.py similarity index 94% rename from sima/lib/webservice.py rename to sima/lib/webserv.py index 0937bde..cc4b2b5 100644 --- a/sima/lib/webservice.py +++ b/sima/lib/webserv.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# """ Fetching similar artists from last.fm web services """ diff --git a/sima/plugins/contrib/placeholder.py b/sima/plugins/contrib/placeholder.py index 60e34b5..f70474b 100644 --- a/sima/plugins/contrib/placeholder.py +++ b/sima/plugins/contrib/placeholder.py @@ -1,9 +1,26 @@ # -*- coding: utf-8 -*- -"""Crops playlist +# Copyright (c) 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# +"""PlaceHolder """ # standard library import -#from select import select # third parties components diff --git a/sima/plugins/core/history.py b/sima/plugins/core/history.py index 67414a8..b791053 100644 --- a/sima/plugins/core/history.py +++ b/sima/plugins/core/history.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# """Add playing tracks to history """ diff --git a/sima/plugins/core/mpdoptions.py b/sima/plugins/core/mpdoptions.py index be47a40..1c4f852 100644 --- a/sima/plugins/core/mpdoptions.py +++ b/sima/plugins/core/mpdoptions.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# """ Deal with MPD options ‑ idle and repeat mode """ diff --git a/sima/plugins/internal/crop.py b/sima/plugins/internal/crop.py index 2ecbfc1..1f8ab2c 100644 --- a/sima/plugins/internal/crop.py +++ b/sima/plugins/internal/crop.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# """Crops playlist """ diff --git a/sima/plugins/internal/echonest.py b/sima/plugins/internal/echonest.py index 74dd2b8..7d4c0e0 100644 --- a/sima/plugins/internal/echonest.py +++ b/sima/plugins/internal/echonest.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# """ Fetching similar artists from echonest web services """ @@ -9,7 +27,7 @@ Fetching similar artists from echonest web services # local import from ...lib.simaecho import SimaEch -from ...lib.webservice import WebService +from ...lib.webserv import WebService class EchoNest(WebService): diff --git a/sima/plugins/internal/lastfm.py b/sima/plugins/internal/lastfm.py index b4f56c2..2e6fca6 100644 --- a/sima/plugins/internal/lastfm.py +++ b/sima/plugins/internal/lastfm.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# """ Fetching similar artists from last.fm web services """ @@ -9,7 +27,7 @@ Fetching similar artists from last.fm web services # local import from ...lib.simafm import SimaFM -from ...lib.webservice import WebService +from ...lib.webserv import WebService class Lastfm(WebService): diff --git a/sima/plugins/internal/randomfallback.py b/sima/plugins/internal/randomfallback.py index 07201c0..12673de 100644 --- a/sima/plugins/internal/randomfallback.py +++ b/sima/plugins/internal/randomfallback.py @@ -1,4 +1,22 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2013, 2014 Jack Kaliko +# +# This file is part of sima +# +# sima is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sima is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sima. If not, see . +# +# """ Fetching similar artists from last.fm web services """ diff --git a/sima/utils/config.py b/sima/utils/config.py index 99fb322..c425642 100644 --- a/sima/utils/config.py +++ b/sima/utils/config.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- - -# Copyright (c) 2009, 2010, 2011, 2013 Jack Kaliko +# Copyright (c) 2009, 2010, 2011, 2013, 2014 Jack Kaliko # # This file is part of sima # diff --git a/sima/utils/leven.py b/sima/utils/leven.py index adc48f7..9b269df 100644 --- a/sima/utils/leven.py +++ b/sima/utils/leven.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- - # Copyright (c) 2009, 2010, 2013 Jack Kaliko # # This file is part of sima diff --git a/sima/utils/startopt.py b/sima/utils/startopt.py index 04df3b4..33e89b1 100644 --- a/sima/utils/startopt.py +++ b/sima/utils/startopt.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2009, 2010, 2011, 2012, 2013 Jack Kaliko +# Copyright (c) 2009, 2010, 2011, 2012, 2013, 2014 Jack Kaliko # # This file is part of sima # -- 2.39.5