Browse Source

Add an entry point script for commandline usage

pull/3/head
Wesley Kerfoot 5 years ago
parent
commit
3e550348be
  1. 7
      setup.py
  2. 5
      spotify_mpd_sync/msplaylist/spotify.py

7
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"
]
}
)

5
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()

Loading…
Cancel
Save