Add documentation

This commit is contained in:
Timothy Allen 2015-06-15 09:43:46 +02:00
parent 17b9ec73af
commit bf2b793258

View File

@ -1,5 +1,17 @@
#!/usr/bin/env python #!/usr/bin/env python
# Back up the state of MPD (current playlist and so on) #
# Back up the state of MPD (current playlist and so on); this allows you
# to recover when you accidentally clear your playlist.
#
# This uses the python-mpd2 library from <https://pypi.python.org/pypi/python-mpd2>:
# sudo pip3 install python-mpd2
#
# I run it from cron every 20 minutes or so (as user mpd, but you can
# run it as any user, passing in the backup directory with -d):
# cat /etc/cron.d/mpd_backup
# */20 * * * * mpd [ -x /var/lib/mpd/backup_mpd_playlist.py ] && python /var/lib/mpd/backup_mpd_playlist.py
#
# By Timothy Allen <tim@treehouse.org.za>
import ast import ast
import datetime import datetime