Use case or problem
the ability to execute commands in the termux environment may be useful for plugin developers. some examples of the top of my head:
obsidian-git could directly run the
git command as opposed to using the very limited isomorphic-git, which notably lacks ssh support
reminders plugin could invoke
termux-notification, which is helpful in the case you leave the app but still want to be reminded on time.
a toggle-able setting that allows these commands to be run and requests the necessary permissions (that’s off by default).
as for the implementation:
termux exposes an intent api, which can be called upon by apps that request
capacitor js custom code docs
Current workaround (optional)
Related feature requests (optional)
That might actually allow me to convert Obsidian-OCR from a desktop-only plugin to a cross-platform one. After all, both dependencies required, tesseract and imagemagick, are available in the Termux repo
and that could be considered as a “mainstream” use case, thus strengthening our case here
i’ve decided to take it upon myself to create a capacitor plugin for this exact purpose (capacitor is what obsidian uses under the hood to run on ios/android)
if any obsidian developers would like to take a stab at testing it, please do!
Could you give me a little hint on how to use this? Do I just add it as a dependency to my plugin and run
npx cap sync? And how do I go from there?
unfortunately, it’s not that simple. this needs to be added to the core of obsidian itself by one of the people who actually have access to the source code and the mobile build configurations. i only did this as a proof of concept, and to eliminate a good chunk of the legwork for the developers, which should (in theory) help our case.
Oh, I see.
Sorry for my misunderstanding