old_contents: from fabric.api import execute, local, settings, task
  
  
  @task
  def preprocess_header():
      local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')
  
  
  @task
  def test():
      local('nosetests')
  
  
  @task
  def autotest():
      while True:
          local('clear')
          with settings(warn_only=True):
              execute(test)
          local(
              'inotifywait -q -e create -e modify -e delete '
              '--exclude ".*\.(pyc|sw.)" -r spotify/ tests/')
  
  
  @task
  def update_authors():
      # Keep authors in the order of appearance and use awk to filter out dupes
      local(
          "git log --format='- %aN <%aE>' --reverse | awk '!x[$0]++' > AUTHORS")
  
new_contents: from fabric.api import execute, local, settings, task
  
  
  @task
  def preprocess_header():
      local('cpp -nostdinc spotify/api.h > spotify/api.processed.h || true')
  
  
  @task
  def docs():
      local('make -C docs/ html')
  
  
  @task
  def autodocs():
      auto(docs)
  
  
  @task
  def test():
      local('nosetests')
  
  
  @task
  def autotest():
      auto(test)
  
  
  def auto(task):
      while True:
          local('clear')
          with settings(warn_only=True):
              execute(task)
          local(
              'inotifywait -q -e create -e modify -e delete '
              '--exclude ".*\.(pyc|sw.)" -r spotify/ tests/')
  
  
  @task
  def update_authors():
      # Keep authors in the order of appearance and use awk to filter out dupes
      local(
          "git log --format='- %aN <%aE>' --reverse | awk '!x[$0]++' > AUTHORS")
  
subject: Add docs and autodocs tasks