[Feature Request] .reg as backend to Registry
As mentioned by @williballenthin in #39
developing a second backend to python-registry that operates over .reg files. So it exposes the familiar RegistryKey/RegistryValue interface, but the underlying data comes from a .reg export.
(For reference this is kind of the inverse of #4)
I think it is worth having a separate issue open for this. (no hurry just wanted it documented) At least it can be used to discuss how this could be implemented to best fit in the project.
The best I can come up with right now is a separate module that Registry imports, and uses depending on the contents of the file?
I think almost all the work would be in a file analogous to RegistryParse.py. Registry.py should be made more generic, where really all it does is define the RegistryKey, RegistryValue, and Registry interfaces, and an entrypoint into file parsing (which as you said, might look at the file header, and pick an appropriate backend).
Let me suggest a course of action, get your feedback, and we can agree on a plan of action (whenever this takes place :-) ).
- [ ] move
RegistryParse.pytoRegistryParseREGF.py - [ ] cleanup
Registry.pyclasses to simply be interfaces- [ ]
Registry - [ ]
RegistryValue - [ ]
RegistryKey
- [ ]
- [ ] implement
Registry*interfaces for REGF parser inRegistryParseREGF.py - [ ] in
Registry.py, during open, check file header, and delegate toRegistryParseREGF.py, or raise unsupported exception - [ ] implement
RegistryParseReg.py, including- [ ] possibly low-level structures (sorta like nk/vk/sk records, if necessary, which I don't think it will be)
- [ ] high-level interfaces declared in
Registry.py
- [ ] in
Registry.py, add possible delegation toRegistryParseReg.pybased on file header