-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Obsidian support #103
Comments
File formats besides .md are not well supported in Obsidian... I suppose markwhen could be in code blocks, like:
but that seems kind of inelegant |
Indeed, I would also point out that code blocks don't support wikilinks which could otherwise be a very interesting combination. Would putting the content in a regular md file with a key in the yaml front matter indicating to the plugin it should be parsed as markwhen files a possible work around ? Regarding the support of other file format in Obsidian, it is true that it is limited but I recall seeing some plugins managing to expand this a little. Here's a few examples I managed to find back :
|
This is I think an important point. I am already feeling some pains that I cannot search globally and find text that are inside a "canvas" nor see backlinks from there. If it was possible to retain such core functionality when using markwhen, that would be for the best I think :) |
Hi @kochrt, I began working on a prototype Obsidian plugin to support rendering of Markwhen syntax using a custom code block (happy to migrate this I'm new to Typescript and your package, so while figuring out how to parse code block content was straightforward, I'm a bit puzzled on the best way to go about taking the parsed Markwhen code and using it to generate HTML to be rendered by Obsidian preview. I noticed the Markwhen CLI tool has a function called Do you have any ideas on how one might best go about converting the parsed Markwhen code to Obsidian-friendly HTML? I'd love to better understand how Markwhen is structured and learn if there's a better approach than the one I described above. Thank you for taking the time to create this library, by the way - it's fantastic. |
Without knowing much about the architecture of obisidian plugins, this is how some other popular plugins do it: For example this is how an Excalidraw drawing looks like when opened as markdown: ---
excalidraw-plugin: parsed
---
==⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠==
%%
# Text Elements
%%
# Drawing
```json
{
"type": "excalidraw",
"version": 2,
"source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/1.8.22",
"elements": [
{
"id": "nsFug5LtUOGiCL_Vk_ibP",
}
],
"appState": {
"theme": "dark",
},
"files": {}
}
```
%% The popular Kanban plugin does the same: ---
kanban-plugin: basic
---
## A Board
- [ ] A card
## Another Board
- [ ] Another card
%% kanban:settings
```
{"kanban-plugin":"basic"}
```
%% Excalidraw uses a custom file extension I'm extremely thrilled to see markwhen in Obsidian eventually, thanks for working at it! |
Maybe there is a way to make things even easier for the ordinary programming noob (like me!), by creating a dataview-like query format, that pulls the necessary dates and data form Metadata in Obsidian notes? I have been hoping for something like this for a long time and did a post in the forum HERE. And - as mentioned there - I did a respective detailed post in the obsidian-dataview forum on github. Maybe there are some ideas in there to contribute to this. |
@quinn-p-mchugh You can do what you're describing and it's actually relatively straightforward (if a bit heavy-handed). The html for the timeline view you can get from @markwhen/timeline (don't mind the readme, I haven't updated it). You can append a script tag in the head with the parsed markwhen, like the CLI does, that will give you the html that you can provide to obsidian to render. I'd say it's a good place to start. |
I agree with this format.
|
@quinn-p-mchugh: I don't see why there has to be another coding language. Why not producing the relevant code for markwhen by the plugin, based on a search, done by the dataview/datacore Plugin? My argument is this: If there is - as there seems to be - a strictly defined markdown-language used by the markwhen parser to describe every event that should be displayed, this code can also be produced by the plugin itself, based on the metadata in predefined fields of an obsidian note. This way the user is enabled to produce any timeline, based on his notes and their content. Even the parallel display of different timelines, based on different tags in the notes would be possible. And every datapoint in the timeline could be a link to a note, explaining it. And the codeblock might look like this:
See also here This would be much easier to use for the average User ... Thanks for considering! |
That would make the plugin completely useless to me, as it takes out all the benefits of markwhen. The whole point of GANTT charts is that events can be dependent on each other (like Event 2 starts after Event 1 is finished). This is easily possible with the markwhen syntax. Why should dataview come into play at all? With a dataview query like you describe, the plugin would have to search for everything that meets the conditions and somehow looks like a date and build a timeline from that? I think that would be a feature request for dataview, but not what I expect from a markwhen plugin. |
Hey @jayambede, thanks for sharing your perspective. This could be done in the following way:
I still think an MVP for a Markwhen Obsidian plugin should be simply rendering Markwhen code inside Obsidian, but I think functionality you're describing would be great to explore in the future. |
@ltroj The idea is to leverage the Dataview API to aggregate note data into JavaScript objects. These objects could then be translated into the same format that's outputted by the Markwhen parser, which could then be rendered into whichever Markwhen view is desired by the user. The major challenges here would be:
|
I wouldn't recommend the triple backtick syntax to try to embed into a markdown document. While code blocks aren't supported in markwhen yet, I think they will be eventually, and even in the meantime backticks are not illegal in markwhen, so you could have difficulty determining where markwhen ends and markdown begins. The expectation is that markwhen documents are their own files (with the As far as the dataview and querying goes, that seems like a separate topic. @jayambede you might consider opening a new issue to discuss dataview/querying in order to generate a timeline view. I've been thinking about something similar myself recently. If something comes out of that discussion maybe it could be looped back into other user interfaces, including an obsidian plugin. |
@ltroj: Oooooh, how silly of me, I totally forgot about the "project management guys"! ;-)
|
@quinn-p-mchugh I do very well understand, though, that a plugin that omits the things I was describing, for the time being is the easier and faster project. And I am grateful that at least someone is up to the challenge. But to me that only is an intermediate goal, for it requires much handywork for each timeline, which is one of the reasons I am not using the existing obsidian-timeline Plugins. Thanks for your hard work!! |
@kochrt
This is the common way to handle this in Obsidian. Moreover, this would certainly work, but (though it makes sense for the kanban plugin) would still pose the question, if you have to "wrap" it anyway in an .md file, why not make the plugin in a way that you can display a timeline in a codeblock limited by backticks in any note? Sorry, if I have overruled your request of opening a new issue with this post, but I just couldn't help it ... I can still do that (though not today), and pull over my part of the discussion for a beginning ... Anyway: Thanks a lot for making this possible!! |
Good point @kochrt - thanks for mentioning. Will have to do some more thinking on this to prevent future conflicts with Markwhen codeblock support.
Fortunately, supporting I do like the idea of supporting In my case, I'd to be able to view Markwhen timelines inside an Obsidian note - whether that's achieved by writing Markwhen code inside a codeblock or an embedded |
Just came across your conversation. If you could get markwhen working in obsidian, it would be incredible awesome!!! 🤯 :D |
Hey folks - quick update here. I haven't really done anything with the prototype Obsidian plugin since early April. Please feel free to fork if you have time to help develop. |
What is the status of the plugin as is? |
@MSBack Just a couple lines of code written. See commit history here. |
I'd like to help with the Obsidian API.
The excalidraw plugin of obsidian could be a good reference. https://github.com/zsviczian/obsidian-excalidraw-plugin |
Thanks @Acylation! Please see these comments some relevant resources and commentary: Specifically:
|
The Dataloom plugin (previously called Notion-like tables) might also be useful as a reference. It adds a .loom filetype (tables), and you can embed and resize them using the `![[some_table.loom]] syntax. |
Thanks for the suggestion @MSBack ! I will check them out. @quinn-p-mchugh Thanks for the info, I will go through the comments carefully. I checked your prototype and decided to create a new one, because your repo is a fork of the sample plugin template (which means your fork is also a template) rather than a plugin repo based on the template. Nevertheless thanks for your efforts on calling the mw package! Also, Obsidian have published the official developer doc mostly based on |
Sounds good to me. Thanks! 👍 In response to some of the thoughts shared above: FWIW, I'm a fan of Obsidian Projects design philosophy. I love that the Excalidraw plugin provides the ability to auto-export drawing files in the standard Excalidraw format, which means that if the Exalidraw plugin dies, I can still use the drawings. I think it'd be worthwhile to adopt a similar sort of philosophy for creating the proposed Markwhen plugin. |
Hey folks, I hope this project hasn't been dropped. I have quickly become a fan of using Markwhen to plan out different trips and having it synchronize with my Obsidian vault would definitely help keep things organized. |
I second that just came here after searching for similar timeline functionality and integration. |
Hey! Is anyone working on this? If yes is there a dedicated repo for the plugin or branch or list of tasks? happy to work on some tasks. |
@crimson-med you may check out my repo here. https://github.com/Acylation/obsidian-markwhen I’m iterating through multiple projects and this is postponed for a while. Unlike the VSCode plugin that provides a webview, Obsidian prefers a standalone component that not yet implemented by markwhen. Current workaround aims to host markwhen locally, and we want to interact with it via iframe or similar methods. Some information are recorded in discord subtopic. Another worry is on the text format. We need to implement our own lsp or register markwhen as plain text to allow markwhen file being recognized or display properly by Obsidian text editor. I’m dealing with my thesis lately and not sure when can I come back to solve some heavy tasks. But please don’t hesitate to reach out if you need help in Obsidian api and repo stuffs. I’m active in these basic affairs. |
@crimson-med also look at kochrt/obsidian-markwhen, I attempted to make some progress but I don't know/remember how successful I was (mostly in MarkwhenView.ts) |
https://github.com/mark-when/obsidian-plugin is the new repo for the obsidian plugin. You can try it out manually by downloading the latest release and dropping the files in your There's a lot that's wrong with it but it gets the basics done. Someone feel free to submit the plugin for review, I haven't done that. Just make sure no one else is trying to submit it before you do. |
I'll do. Before that we need to update the docs, manifests, releases and other repo stuffs. |
I don't have any experience with Obsidian, is https://marcus.se.net/obsidian-plugin-docs/ the best place to get started?
Couple things that would need to be figured out:
The text was updated successfully, but these errors were encountered: