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

Expose summarizer API to be able to be called directly from JS / other plugins #10

Open
rshmhrj opened this issue Mar 27, 2024 · 1 comment

Comments

@rshmhrj
Copy link

rshmhrj commented Mar 27, 2024

ref: https://forum.obsidian.md/t/inter-plugin-communication-expose-api-to-other-plugins/23618

Right now the only way to use this plugin is via the command palette.

It would be nice if we could expose the API so that we can call it from elsewhere.

E.g. I have a Templater snippet where I get youtube video information and at the end, I want to invoke the summarizer.

<%*
let url = await tp.system.clipboard();
var ys = app.plugins.plugins['youtube-summarizer'];
console.log("youtube-summarizer-plugin", ys)
const summary = ys.api.summarize(url)
%>
### Summary
<% summary %>

Aside from my example, this would open up more usage opportunities across other plugins.

@Medullitus
Copy link

Did you make it working? How?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants