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

Curious about why .mw instead of .md #6

Open
terrychenzw opened this issue May 20, 2024 · 7 comments
Open

Curious about why .mw instead of .md #6

terrychenzw opened this issue May 20, 2024 · 7 comments

Comments

@terrychenzw
Copy link

Appreciate your work for bringing this great tool into Obsidian!

It is powerful tool and simple-to-use. I really like it.

I am very curious about why .mw instead of .md?

In Obsidian, .md can be manipulated by lots of plugins. So i think .md is better then .mw.

@brimwats
Copy link

Because Markwhen is a seperate thing; it uses .mw files; it probably predates obsidian?

more: https://markwhen.com

@terrychenzw
Copy link
Author

terrychenzw commented May 23, 2024

As an Obsidian user, I am looking for a timeline plugin for planning and scheduling for a long time. So when you bring markwhen into Obsidian, I really like it and I think it is the best solution for my needs. So I really appreciate your great work on this.

I think .md is more acceptable than .mv in Obsidian(I mean the file type). As we see the most popular and successful community plugin in Obsidian, Excalidraw. Excalidraw is a power sketching tool first and then brought into Obsidian by Zsolt Viczián. The file type of excalidraw file in Obsidian is .md instead of .excalidraw(the original file type of excalidraw file). Using .md can get a lot of features from Obsidian and many other community plugins.

How to parse .md files as excalidraw in Obsidian? The answer is frontmatter. As we see all excalidraw files in obisidian with below frontmatter.

---
excalidraw-plugin: parsed
---

The other popular plugins use the similar way.

kanban plugin:

---
kanban-plugin: basic
---

markmind plugin:

---

mindmap-plugin: basic
---

Above plugins are using .md as the file type in Obsidian.

Markwhen plugin has enormous potential to be popular in Obsidian. So I highly recommond you guys to consider using .md as the file type for markwhen files. (export .mw for using outside Obsidian just like what excalidraw plugin did)

Again, thanks for your great work!

@saeedesmaili
Copy link

On a related note, neither the title nor the content of the .mw files are returned in the obsidian search results (same with Omnisearch plugin, no results when I search for a note I created with mark-when plugin). I wonder if it is because Obsidian doesn't recognize them as notes, but as files. On the other hand, when searching for the notes created by excalidraw, I can find them using Omnisearch plugin, probably because the notes are stored as .md files behind the scene:
image

@ulasfo
Copy link

ulasfo commented Jun 17, 2024

On a related note, neither the title nor the content of the .mw files are returned in the obsidian search results (same with Omnisearch plugin, no results when I search for a note I created with mark-when plugin). I wonder if it is because Obsidian doesn't recognize them as notes, but as files. On the other hand, when searching for the notes created by excalidraw, I can find them using Omnisearch plugin, probably because the notes are stored as .md files behind the scene: image

Well if you were to check the omnisearch plugin you can see that the file population is done via "this.app.vault.getFiles" with an added filter

https://github.com/scambier/obsidian-omnisearch/blob/f6b63537c237d1119f8665e5b12ea6a17b3d447e/src/main.ts#L209-L220

I have checked if the obsidian detects the .mw files same way using the following

files = Array.from(app.vault.getFiles())
files.forEach(file => {if(file.name.split('.').slice(-1)[0].contains('mw')){console.log(file)}})

and getting the confirmation I checked the code over omnisearch for the filter behaviour the and it leads to the following:

https://github.com/scambier/obsidian-omnisearch/blob/f6b63537c237d1119f8665e5b12ea6a17b3d447e/src/notes-indexer.ts#L40-L42

resim

Red marks are unintended, so the solution is either enabling "index paths of unsupported files" which will index paths of any and all files without looking at the extensions, while this will index the path of .mw files, the content will not be indexed and paths of files with other extensions such as .mp4, .jpg etc. will be indexed which might be an unwanted side effect

or adding mw to the additional TEXT files to index.

https://github.com/scambier/obsidian-omnisearch/blob/f6b63537c237d1119f8665e5b12ea6a17b3d447e/src/cache-manager.ts#L111C1-L116C6

with the second option above check will turn true, which will read the contents and upload to the cache

@ulasfo
Copy link

ulasfo commented Jun 17, 2024

I have confirmed that adding mw to the additional TEXT files to index column and reloading the omnisearch plugin does indeed index the contents of the mw files.

I have created a mw file with some content as follows

resim

and with web api turned on I have queried file from web which turned up

resim

@Diego-501
Copy link

Using the .md extension I guess the tasks created in the Gantt could be integrated with the Tasks and Reminder plugins. Combining with these plugins would be very beneficial in my opinion.

@wrgrant
Copy link

wrgrant commented Oct 11, 2024

While it would technically be possible to index .mw files, there is so much expectation in the Obsidian ecosystem around .md as the preferred filetype that as an extremely newcomer I think it would be a smart play for Markwhen to make Obsidian specific file handling as @terrychenzw mentioned.

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

6 participants