Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yasha extensions from Python module #33

Open
kblomqvist opened this issue Oct 9, 2017 · 2 comments
Open

Yasha extensions from Python module #33

kblomqvist opened this issue Oct 9, 2017 · 2 comments
Assignees
Labels

Comments

@kblomqvist
Copy link
Owner

kblomqvist commented Oct 9, 2017

I have been thinking how one could write plugin-like extensions for Yasha, which can be pip installed and taken into use with minimal effort.

So maybe -e / --extensions should be able take Python module name as an input and load the module. In this case -e should support multiple inputs.

To enable CMSIS-SVD (#17) parser:

pip install yasha_cmsis
yasha -e cmsis -v peripherals.svd -o peripherals.h peripherals.h.j2

To enable Latex (#31):

pip install yasha_latex
yasha -e latex -o thesis.tex thesis.j2
@kblomqvist
Copy link
Owner Author

The module would also add itself into PATH so that one can import referenced templates easily.

{% include "latex/macros.j2" %}

@kblomqvist
Copy link
Owner Author

Maybe introduce -m option

yasha -m latex -o thesis.tex thesis.j2

@kblomqvist kblomqvist added this to the 5.0 milestone May 1, 2018
@kblomqvist kblomqvist self-assigned this May 1, 2018
@kblomqvist kblomqvist removed this from the 5.0 milestone Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant