summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Bachelier <laurent@bachelier.name>2012-11-23 20:35:20 +0100
committerLaurent Bachelier <laurent@bachelier.name>2012-11-23 20:35:20 +0100
commit07867ab7ceb380e94f3ce19f7a008cc1f28b66e7 (patch)
tree9ec46b98b3e2a919232124961cbbde0f2fc5cc1c
parentBetter playlist time, albums time, example (diff)
downloadmpdat-07867ab7ceb380e94f3ce19f7a008cc1f28b66e7.tar.xz
New name
-rwxr-xr-xfeeding_example.py4
-rw-r--r--mpdat/__init__.py1
-rw-r--r--mpdat/cache.py (renamed from mpdrast/cache.py)4
-rw-r--r--mpdat/client.py (renamed from mpdrast/client.py)8
-rw-r--r--mpdat/process.py (renamed from mpdrast/process.py)2
-rw-r--r--mpdrast/__init__.py1
-rwxr-xr-xpltime_example.py4
-rwxr-xr-xpruning_example.py4
8 files changed, 14 insertions, 14 deletions
diff --git a/feeding_example.py b/feeding_example.py
index d9bde2b..59e4f01 100755
--- a/feeding_example.py
+++ b/feeding_example.py
@@ -1,11 +1,11 @@
#!/usr/bin/env python
-from mpdrast import MPDrastClient
+from mpdat import MPDatClient
from os import environ
mpd_host = environ.get("MPD_HOST", "localhost")
mpd_port = environ.get("MPD_PORT", 6600)
-m = MPDrastClient()
+m = MPDatClient()
m.connect_from_env(mpd_host, mpd_port)
# the user can run mpc update before; wait for completion
diff --git a/mpdat/__init__.py b/mpdat/__init__.py
new file mode 100644
index 0000000..35c8cb1
--- /dev/null
+++ b/mpdat/__init__.py
@@ -0,0 +1 @@
+from .client import MPDatClient
diff --git a/mpdrast/cache.py b/mpdat/cache.py
index 67ddc0f..19e83c0 100644
--- a/mpdrast/cache.py
+++ b/mpdat/cache.py
@@ -5,7 +5,7 @@ from os.path import join, expanduser, exists, getmtime, isdir
from os import makedirs
from hashlib import sha1
-USER_DIR = join(expanduser('~'), '.mpdrast')
+USER_DIR = join(expanduser('~'), '.mpdat')
def cache(name):
def decorator(fn):
@@ -47,7 +47,7 @@ def test():
from time import time
# TODO we should clean up after, also… it's kinda ugly
- globals()["USER_DIR"] = mkdtemp(prefix='mpdrast')
+ globals()["USER_DIR"] = mkdtemp(prefix='mpdat')
print "Testing in %s." % USER_DIR
we_should_be_here = False
diff --git a/mpdrast/client.py b/mpdat/client.py
index ff5fbbb..5f9aecf 100644
--- a/mpdrast/client.py
+++ b/mpdat/client.py
@@ -3,10 +3,10 @@ import mpd
import time
import random
-import mpdrast.process as process
-from mpdrast.cache import cache, uhash
+import mpdat.process as process
+from mpdat.cache import cache, uhash
-class MPDrastClient(mpd.MPDClient):
+class MPDatClient(mpd.MPDClient):
def __init__(self):
mpd.MPDClient.__init__(self)
@@ -19,7 +19,7 @@ class MPDrastClient(mpd.MPDClient):
>>> from os import environ
>>> mpd_host = environ.get("MPD_HOST", "localhost")
>>> mpd_port = environ.get("MPD_PORT", 6600)
- >>> m = MPDrastClient()
+ >>> m = MPDatClient()
>>> m.connect_from_env(mpd_host, mpd_port)
>>> m.ping()
"""
diff --git a/mpdrast/process.py b/mpdat/process.py
index da5d13b..3bc26cb 100644
--- a/mpdrast/process.py
+++ b/mpdat/process.py
@@ -1,7 +1,7 @@
from os.path import dirname
"""
-Process MPDrastClient responses
+Process MPDatClient responses
"""
def get_files_and_dirs_from_db(items):
diff --git a/mpdrast/__init__.py b/mpdrast/__init__.py
deleted file mode 100644
index 852604a..0000000
--- a/mpdrast/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-from .client import MPDrastClient
diff --git a/pltime_example.py b/pltime_example.py
index ae0316f..a460de0 100755
--- a/pltime_example.py
+++ b/pltime_example.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-from mpdrast import MPDrastClient
+from mpdat import MPDatClient
from os import environ
import datetime
@@ -14,7 +14,7 @@ NORMAL = '\x1b[22m'
mpd_host = environ.get("MPD_HOST", "localhost")
mpd_port = environ.get("MPD_PORT", 6600)
-m = MPDrastClient()
+m = MPDatClient()
m.connect_from_env(mpd_host, mpd_port)
diff --git a/pruning_example.py b/pruning_example.py
index 93ca7e0..3d61541 100755
--- a/pruning_example.py
+++ b/pruning_example.py
@@ -1,12 +1,12 @@
#!/usr/bin/env python
-from mpdrast import MPDrastClient
+from mpdat import MPDatClient
from os import environ
mpd_host = environ.get("MPD_HOST", "localhost")
mpd_port = environ.get("MPD_PORT", 6600)
-m = MPDrastClient()
+m = MPDatClient()
m.connect_from_env(mpd_host, mpd_port)
# Keep only one album in the playlist