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

Is there an API for other plugins to use? #78

Open
czottmann opened this issue Oct 23, 2024 · 6 comments
Open

Is there an API for other plugins to use? #78

czottmann opened this issue Oct 23, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@czottmann
Copy link

czottmann commented Oct 23, 2024

Hi, I'm the author of Actions For Obsidian and its companion plugin Actions URI. The latter is currently hooking into the core plugin Daily Notes, the community plugin Periodic Notes, via obsidian-daily-notes-interface.

My customers are asking about my app & plugin supporting Journals, but AFAICT, you don't offer a clear API for checking periodic notes or creating them, right?

Thanks!

@srg-kostyrko
Copy link
Owner

yes, right now there is no such api.
I considered adding it in future at some point.
As it looks there is a need for it already - I'll bump it's priority and will start working on it right after v2 release (as it has lots of changes to structure)

please let me know if you have some specific API capabilities in mind

@czottmann
Copy link
Author

@srg-kostyrko Thanks, I appreciate it! Basically, as a dev writing plugins that might interact with Journals, I'd love to see an up-to-date fork of the aforementioned obsidian-daily-notes-interface package that also supports Journals, but I know that this is a stretch 😅

So I'd prefer a npm package like that. Mostly an abstraction that offers a few methods for …

  • checking if Journals is installed/active
  • returning the current daily/weekly/etc. periodic note, and possibly the most recent (i.e., if today's note doesn't exist, get yesterday's)
  • creating a daily/weekly/etc. periodic note

This list is informed by my reduced use cases, of course. Personally, I don't need anything related to calendars or any other types of notes right now. Other devs might need other endpoints, I guess. But overall, I'd prefer it if the API was "just" a standalone npm package, it'd be much easier to handle for other plugin authors like me.

Thank you!

@srg-kostyrko
Copy link
Owner

srg-kostyrko commented Oct 23, 2024

Thanks for the context

One of reasons why extending obsidian-daily-notes-interface would be quite a problem - you can have multiple daily (same for weekly, monthly etc) journals, so there might be several daily notes for same day.
So my question would be - from your use cases what approach would you need for function that returns daily/weekly/etc. note

  • list of all daily notes (with additional journal info)
  • or a way to ask for note from specific journal

Most likely I will add both eventually but I can start with what you need first

@srg-kostyrko srg-kostyrko added the enhancement New feature or request label Oct 23, 2024
@czottmann
Copy link
Author

you can have multiple daily (same for weekly, monthly etc) journals, so there might be several daily notes for same day.

Ah, okay. I was not aware of that, to be honest.

Some more background: I had one or two customers asking for my macOS/iOS app supporting Journals. They use periodic notes, but they are not using the Periodic Note plugin anymore, because they switched to Journals. So I naïvely just figured that Journals follows the same idea (one set of daily/weekly/etc. per vault), but clearly I was wrong! 😅 My app currently does not have a concept of "journals" inside a vault, so there's structural discrepancy between what your plugin is allowing for and what my app does.

Thanks for your explanations! 🙏🏼 I now have a clearer understanding of what I'd need to do to actually add support for Journals to Actions URI (and to Actions For Obsidian), but I won't tackle that now. So, I'm good for the time being.

@Jnolcox
Copy link

Jnolcox commented Nov 1, 2024

How about a function that lists journals to choose from that have journal-selection: daily if there is more than one.

@srg-kostyrko
Copy link
Owner

I would expect just getting note for specific journal as easier approach
but can also add arbitrary filtering - in the end it comes down to how other plugin will use it

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

No branches or pull requests

3 participants