Commit Graph

19 Commits

Author SHA1 Message Date
Georges-Antoine Assi
bc08e05a19 changes from self review 2024-08-11 23:09:58 -04:00
Georges-Antoine Assi
1ea1b326d3 move hashes to rom model 2024-08-11 22:38:22 -04:00
Georges-Antoine Assi
56037070fb only calc hashes exlpicit 2024-08-11 19:36:52 -04:00
Georges-Antoine Assi
7e086cec67 fixes from code review 2024-08-11 19:06:16 -04:00
Georges-Antoine Assi
195b86b573 even more cleanup 2024-08-09 11:46:07 -04:00
Georges-Antoine Assi
f01f5ce5b5 trunk fixes 2024-07-27 16:38:57 -04:00
Georges-Antoine Assi
9386ca9e4a changes from self-review 2024-07-27 16:31:32 -04:00
Georges-Antoine Assi
3a9cef24e0 get it all wokring 2024-07-27 13:30:52 -04:00
Georges-Antoine Assi
db1787dff4 fix trunk issues 2024-07-18 22:03:08 -04:00
Georges-Antoine Assi
77afe55625 add support for extracting content in compressed files 2024-07-18 21:50:24 -04:00
Georges-Antoine Assi
591e41a4d5 start checking for specific file exts 2024-07-18 20:51:48 -04:00
Georges-Antoine Assi
2e91c440e3 Read into mem in chunks 2024-07-16 17:42:25 -04:00
Georges-Antoine Assi
2b2ff875ee Calculate hashes for rom files 2024-07-15 18:27:29 -04:00
Michael Manganiello
f20a9ffe34 fix: Avoid recursive os.walk calls
`os.walk` is a generator that can iteratively navigate from the
specified path, top-bottom. However, most of the calls to `os.walk` in
the project cast the call to `list()`, which makes it traverse the path
and recursively find all nested directories.

This is commonly not needed, as we end up just using a `[0]` index to
only access the root path.

This change adds a few utils that simplifies listing files/directories,
and by default does it non-recursively. Performance gains shouldn't be
noticeable in systems with high-speed storage, but we can avoid the edge
cases of users having too many nested directories, by avoiding unneeded
I/O.
2024-07-13 15:30:04 -03:00
Michael Manganiello
fc53d77a58 misc: Compile constant regular expressions
Improve efficiency on reusable regular expressions, by compiling them.
2024-06-23 00:36:22 -03:00
Georges-Antoine Assi
b2085f87a8 bunch of fixes for trunk 2024-05-21 17:10:11 -04:00
Georges-Antoine Assi
a7cf0d389a run trunk format on all files 2024-05-21 10:18:13 -04:00
Georges-Antoine Assi
3e42f3ab56 also ignore firmware files on scan that match 2024-05-16 23:12:27 -04:00
Georges-Antoine Assi
dc33054ba1 more name refactoring 2024-05-05 16:45:58 -04:00