docs: def zip(what, archive_zip='', risk_file=''):
      """
      Zip into an archive one or two job.ini files with all related files
      """
      if os.path.isdir(what):
          oqzip.zip_all(what)
      elif what.endswith('.xml') and '<logicTree' in open(what).read(512):
          # hack to see if the NRML file is of kind logicTree
          oqzip.zip_source_model(what, archive_zip)
      elif what.endswith('.xml') and '<exposureModel' in open(what).read(512):
          # hack to see if the NRML file is of kind exposureModel
          oqzip.zip_exposure(what, archive_zip)
      elif what.endswith('.ini'):  # a job.ini
          oqzip.zip_job(what, archive_zip, risk_file)
      else:
          sys.exit('Cannot zip %s' % what)