Reworking identification

- PARAM.SFO reader (sfo.py)
- Search for param first then use title there to identify
- long_description (setup.py)
- Multiman styling by default
- Don't check crc32 as it is very slow
This commit is contained in:
Nichlas Severinsen 2021-06-06 23:09:33 +02:00
parent f3e8132a37
commit 82bc798677
8 changed files with 267 additions and 13 deletions

View file

@ -55,6 +55,8 @@ if __name__ == '__main__':
datfile = any_dats[0]
warnings = 0
with open(datfile, 'r') as infile:
soup = bs4.BeautifulSoup(infile.read(), features='html5lib')
@ -70,7 +72,7 @@ if __name__ == '__main__':
with open(cwd / ('keys/' + name + '.key'), 'rb') as keyfile:
entry.append(keyfile.read())
except FileNotFoundError:
print('Warning: key not found for ' + name)
warnings += 1
c.execute('INSERT INTO games (name, size, crc32, md5, sha1) VALUES (?, ?, ?, ?, ?)', entry)
continue
@ -82,6 +84,7 @@ if __name__ == '__main__':
shutil.copyfile(db_path, ((cwd.parent / 'libray') / 'data/') / db_path.name)
print('Warning: no keyfiles for %s titles' % str(warnings))