I have updated my Markdown Export plugin with a toolbar button on tiddlers for copying, editing or downloading the tiddler’s contents as Markdown.
Is this what you had in mind, @TW_Tones?
I have updated my Markdown Export plugin with a toolbar button on tiddlers for copying, editing or downloading the tiddler’s contents as Markdown.
Is this what you had in mind, @TW_Tones?
Very good @cdaven works even without the markdown plugin, although I Imagin most people will have that installed as well.
Perhaps the plugin should have a config filter so that on tiddlers, the markdown(load) button, can only display on non-system tiddlers eg [all[current]!is[system]]
, Using this this on a system tiddler could cause failures.
I tend not to use the command line so can’t easily test this.
Do you think it would be difficult to allow copy and download, “as markdown”, all the tiddlers in the story river,
and/or as an option generate a button that would copy/export all tiddlers in markdown, matching a give filter?
<<markdownload-button filter="[all[]tag[mydoc]]">>
### {{!!title}}
.Finaly,
Perhaps one day we could go from Pandoc Markdown to Tiddlywiki wikitext, again opening up an opportunity to go from any Pandoc format to Tiddlywiki.
Sooo sweeet
Pandoc is a command-line tool that depends on other tools e.g. for converting to PDF. But I’m sure there are or could be “wrappers” that run Pandoc on the backend and exposes some features as web pages or http APIs.
No, it shouldn’t be. You can already use the advanced search with a filter and then press the “export tiddlers” button and select Markdown to export multiple tiddlers.
Everything is exported to one file (I don’t think there’s any other way), and the tiddlers are separated in the Markdown code with \newpage
that Pandoc interprets as a page-break.
I created a Python script to split this big downloaded file into one Markdown file per tiddler instead, which could be useful to someone: tiddlywiki-stuff/markdown-export/split-tiddlers.py at main · cdaven/tiddlywiki-stuff · GitHub
This is the actual code from the “download as Markdown button”, which could be used anywhere. You can give it a filter.
<$button class="tc-btn-invisible">
<$action-sendmessage
$message="tm-download-file"
$param="$:/plugins/cdaven/markdown-export/MenuItem"
exportFilter=`[[$(currentTiddler)$]]`
filename=`$(currentTiddler)$.md` />
<span class="tc-btn-text">Download as Markdown</span>
</$button>
I see Perhaps then I can have an additional export on the PageControls for the story, and one in the advanced search filter tab, to export the items listed. I can share back when done.
Really cool, thanks again.
Hello cdaven,
A promising plugin.
One question: is it possible to preserve internal links?
For instance:
[TestPage](https://MY-TIDDLYWIKI.html#TestPage)
[TestPage](./TestPage.md)
BR,
Eskha
So far, I have opted for the simple solution; to remove internal links. This is because you can think of the target of those links in several ways, and I don’t see one solution that would be good enough for most people.
I think some configuration would be in order, but most people always go with the default values anyway. So I chose the simplest possible default.
What do you think of the above?