specter-desktop icon indicating copy to clipboard operation
specter-desktop copied to clipboard

Extension-generation needs adjustements

Open k9ert opened this issue 2 years ago • 3 comments

The extension-generation process is currently assuming you need encrypted userdata. That should get adjusted like this:

  • Add an option to the click annotations like --encrypted-userdata here: https://github.com/cryptoadvance/specter-desktop/blob/master/src/cryptoadvance/specter/cli/cli_ext.py#L39 (including adding it as a param to the method signature)
  • Add a section explaining what it means and that the extension should decide between encrypted/unencrypted here: https://github.com/cryptoadvance/specter-desktop/blob/master/src/cryptoadvance/specter/cli/cli_ext.py#L111-L112
  • Add the variable to the ExtGen instantiation and there ...
  • The service and the controller would needs some adjustments. They are rendered here: https://github.com/cryptoadvance/specter-desktop/blob/master/src/cryptoadvance/specter/cli/cli_ext.py#L150-L160 however, the code for the templates is living here:
    • https://github.com/cryptoadvance/specterext-dummy/blob/master/src/dummyorg/specterext/dummy/service.py#L12
    • https://github.com/cryptoadvance/specterext-dummy/blob/master/src/dummyorg/specterext/dummy/controller.py#L53

Mind the different templating syntax. Those are "metatemplates" as they are creating templates which themself are later templates.

You can test it via using --tmpl-fs-source and checkout the dummy-project somewhere. Also i've created a small section about https://docs.specter.solutions/desktop/extensions/intro/#virtualenv-management

k9ert avatar Nov 04 '22 11:11 k9ert