Exemplo n.º 1
0
def write_licence(path_file, author,accountable):

	root, ext = splitext(path_file)
	# Create associated license file
        path_license_filename = root + '.lic'
	file = basename(path_file)
	licfid = open(path_license_filename, 'w')
	xml_string = """<?xml version="1.0" encoding="iso-8859-1"?>

  <ga_license_file>
    <metadata>
      <author>%s</author>
    </metadata>
    <datafile>
      <filename>%s</filename>
      <checksum>%s</checksum>
      <publishable>Yes</publishable>
      <accountable>%s</accountable>
      <source>?</source>
      <IP_owner>?</IP_owner>
      <IP_info>?</IP_info>
    </datafile>

  </ga_license_file>
""" %(author, file,str(compute_checksum(path_file)) ,accountable)
        
        licfid.write(xml_string)
	licfid.close()
Exemplo n.º 2
0
def write_licence(path_file, author, accountable):

    # Create associated license file
    path_license_filename = path_file[:-4] + '.lic'
    file = basename(path_file)
    licfid = open(path_license_filename, 'w')
    xml_string = """<?xml version="1.0" encoding="iso-8859-1"?>

  <ga_license_file>
    <metadata>
      <author>%s</author>
    </metadata>
    <datafile>
      <filename>%s</filename>
      <checksum>%s</checksum>
      <publishable>Yes</publishable>
      <accountable>%s</accountable>
      <source>This is implementation_test output from the EQRM model. If GA owns the IP for the input, we own the IP for the output.  See TRIM D2008-56963</source>
      <IP_owner>Geoscience Australia</IP_owner>
      <IP_info>For use with EQRM validation</IP_info>
    </datafile>

  </ga_license_file>
""" % (author, file, str(compute_checksum(path_file)), accountable)

    licfid.write(xml_string)
    licfid.close()