Add some pro/con in Obsidian vs Tiddlywiki compare site?

Yes, and for a flat directory, this would be quite easy to do. But in any nested structure, it would take some real work to get links right.

How would one do it with a flat folder?

I can probably try to whip something up this evening or tomorrow.

But I have realized that even there, linking will likely be a problem for the quick bit of code I was imagining. Markdown links to other files are usually structured like HTML links: they can be relative or absolute, and they can have fragment identifiers. TW links hijack the fragment identifier for the tiddler (here the imported other file) and don’t allow fragment-level linking. At least they don’t easily, although there may be tricks.

1 Like

That would be incredible!! Happy to test!!

If you’re looking at Obsidian, then you also need to find tags embedded in text. Also, both tags and fields are in a YAML pre-amble at the top.

Outside of those problems, one way to convert is to not convert – just use the official Markdown plugin and add a type field for markdown in the tiddler header.

I just got it mostly done during a boring meeting, but Giganticorp doesn’t allow me to post to the public GitHub, so I will do it tonight. It is merely a proof of concept, though.

All this is certainly doable, and probably not overly hard, assuming something like the marked parser or an adjacent tool has support for YAML front-matter (and one of them must) but for now, I don’t need it because I chose instead at least for now to do this:

I did this using separate .meta files, so the markdown is entirely untouched. But I think it would be cleaner to prepend the meta information to the Markdown file. Ahh well, for a later version.

I did push this script. It should be quite easy to use if you’re familiar with Node. If not, I wrote some directions in the README. I hope they’re enough. If not, just let me know:

It right now converts a flat directory of .md files into a very simplistic TiddlyWiki, using the Markdown plug-in. Its README lists some of the potential fixes that might move this toward being a genuinely useful tool.

Based on the Docsify docs folder, it would create output like this:

https://crosseye.github.io/TW5-demos/2023-03-07a/

2 Likes

Hi, you can continue using markdown, and only convert them if you need tw5 syntax features.

Use https://tw-cpl.netlify.app/#linonetwo%2Fmarkdown-transformer:linonetwo%2Fmarkdown-transformer%20Index plugin for this. It will add a viewTemplate button to convert current markdown tiddler to tw5 syntax.

You can copy code from my plugin GitHub - tiddly-gittly/md-to-tid: Transform markdown to tiddlywiki5 wikitext syntax. Using unifiedjs. I use unifiedjs, so the code is simple.

This technique can also be used to transform tw5 to markdown, so user can move freely between tiddlywiki and Typora or Obsidian.

I’m not particularly planning on taking this further, but I will definitely investigate your code.

I thought it through a bit and came to the conclusion that all of Markdown should convert easily enough to TW… with one exception: links deeper into into document. I don’t see how to support that and l look forward to seeing how you deal with that.

The other direction (TW to MD) presumably will only work in the simple markup cases.

1 Like

I only use md2tw when I use clipper GitHub - webclipper/web-clipper: For Notion,OneNote,Bear,Yuque,Joplin。Clip anything to anywhere to get md file from HTML, and then I transform this clipped website to tid. So I didn’t deal with wikilinks, only external links.