nickrallison / obsidian-python-scripter

Obsidian Plugin to let the user run custom Python scripts
GNU General Public License v3.0
56 stars 9 forks source link

Arguments for the Scripter #16

Closed Joel-Liju closed 4 days ago

Joel-Liju commented 6 days ago

Hey Sir, First and foremost, amazing plugin, I am having so much fun with this. Especially, it is giving me a bit more flexibility with my workflows.

I was wondering, for the arguments that we are passing in. Obsidian

Is it possible to add a description to each argument, so that, we can see what the argument is supposed to be?

Like in my case, argument 4 takes 0 or 1, and depending on which one it is. It will create a specific file. However, I have to read the python code each time to know which one is which.

If this is not possible, no worries, however, was curious on how easy it would be. I personally haven't looked at the code heavily and would be interested to work on it. If I get the time, however typescript is not my strong suit 😆

Thank you again for your plugin, it is an amazing tool.

nickrallison commented 6 days ago

Thank you for your feedback, unfortunately I'm a bit slammed with school at the moment so I'm unable to do the changes myself. However, if you were inclined to make the changes, I can point you in the direction you'll want to go.

You would probably want to look at line 400 in main.ts and add a description box here:

image

You would want to modify the args class to add a setting field:

image

You would then likely want to modify the modal form creation:

image
Joel-Liju commented 5 days ago

Thank you for the direction, I have opened a PR for this. https://github.com/nickrallison/obsidian-python-scripter/pull/17