Skip to content

Commit

Permalink
Merge pull request #49 from mistydemeo/pronom-v74
Browse files Browse the repository at this point in the history
Updated PRONOM signature files - v77
  • Loading branch information
carlwilson committed Jul 22, 2014
2 parents 80f9e62 + 61fcf89 commit 6223bf1
Show file tree
Hide file tree
Showing 12 changed files with 108,461 additions and 6 deletions.
2 changes: 2 additions & 0 deletions fido/conf/DROID_SignatureFile-v74.xml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions fido/conf/DROID_SignatureFile-v75.xml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions fido/conf/DROID_SignatureFile-v77.xml

Large diffs are not rendered by default.

35,729 changes: 35,729 additions & 0 deletions fido/conf/formats-v74.xml

Large diffs are not rendered by default.

36,360 changes: 36,360 additions & 0 deletions fido/conf/formats-v75.xml

Large diffs are not rendered by default.

36,359 changes: 36,359 additions & 0 deletions fido/conf/formats-v77.xml

Large diffs are not rendered by default.

Binary file added fido/conf/pronom-xml-v74.zip
Binary file not shown.
Binary file added fido/conf/pronom-xml-v75.zip
Binary file not shown.
Binary file added fido/conf/pronom-xml-v77.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions fido/conf/versions.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<versions>
<pronomVersion>70</pronomVersion>
<pronomSignature>formats-v70.xml</pronomSignature>
<pronomVersion>77</pronomVersion>
<pronomSignature>formats-v77.xml</pronomSignature>
<pronomContainerSignature>container-signature-20130501.xml</pronomContainerSignature>
<fidoExtensionSignature>format_extensions.xml</fidoExtensionSignature>
<updateScript>1.2.2</updateScript>
Expand Down
2 changes: 1 addition & 1 deletion fido/fido.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'conf_dir' : os.path.join(os.path.dirname(__file__), 'conf'),
'printmatch': "OK,%(info.time)s,%(info.puid)s,\"%(info.formatname)s\",\"%(info.signaturename)s\",%(info.filesize)s,\"%(info.filename)s\",\"%(info.mimetype)s\",\"%(info.matchtype)s\"\n",
'printnomatch' : "KO,%(info.time)s,,,,%(info.filesize)s,\"%(info.filename)s\",,\"%(info.matchtype)s\"\n",
'format_files': ['formats-v70.xml', 'format_extensions.xml'],
'format_files': ['formats-v75.xml', 'format_extensions.xml'],
'containersignature_file' : 'container-signature-20130501.xml',
# versions.xml is where fido.py reads version information
# about which xml to load
Expand Down
6 changes: 3 additions & 3 deletions fido/pronomutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def getPronomSignature(type):
else:
sys.stderr.write("getPronomSignature(): unknown type: "+type)
return False
webservice = httplib.HTTP("www.nationalarchives.gov.uk")
webservice = httplib.HTTP("apps.nationalarchives.gov.uk")
webservice.putrequest("POST", "/pronom/service.asmx")
webservice.putheader("Host", "www.nationalarchives.gov.uk")
webservice.putheader("User-Agent", "PRONOM UTILS v{0} (OPF)".format(__pronomutils__['version']))
Expand All @@ -88,7 +88,7 @@ def getPronomSignature(type):
if type == "file":
exp = re.compile("\<SignatureFile\>.*\<\/SignatureFile\>")
sigxml = exp.search(xml.read())
sigtxt = sigxml.group(0)
sigtxt = sigxml.group(0) if sigxml else ''
if len(sigtxt) > 0:
tmpfile = "./tmp_getPronomSignature.xml"
tmp = open(tmpfile,'wb')
Expand All @@ -111,5 +111,5 @@ def getPronomSignature(type):
print sys.stderr.write("getPronomSignature(): unexpected return")
return False
except Exception, e:
print sys.stderr.write("getPronomSignature(): unknown error:",e)
print sys.stderr.write("getPronomSignature(): unknown error: "+str(e))
return False

0 comments on commit 6223bf1

Please sign in to comment.