diff --git a/setup.py b/setup.py index f47af59..37a198e 100644 --- a/setup.py +++ b/setup.py @@ -17,9 +17,14 @@ setuptools.setup( "spotipy>=2.4.4", "python-mpd2>=1.0.0" ], - classifiers=[ + classifiers= [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], + entry_points = { + "console_scripts" : [ + "spotsync = spotify_mpd_sync.msplaylist.spotify:run_sync" + ] + } ) diff --git a/spotify_mpd_sync/msplaylist/spotify.py b/spotify_mpd_sync/msplaylist/spotify.py index 9eb6341..732dec9 100644 --- a/spotify_mpd_sync/msplaylist/spotify.py +++ b/spotify_mpd_sync/msplaylist/spotify.py @@ -78,3 +78,8 @@ class Spotify(): print(e) print("Could not add {0}".format(track_id)) continue + + +def run_sync(): + spotify = Spotify() + spotify.persist_playlists()