Looking for a workflow for notes in markdown

Yes, if you were using a smart template (see Help > Documentation > Automation > Smart Templates).
There are also some installed smart templates available in Data > New from Template > Open Templates Folder.

That breaks the connection between DT and the app. I was talking about the workflow where i use other applications to edit the markdown in DT.

@BLUEFROG is it possible to ‘export’ a markdown document? i.e. i have a markdown which references a PDF (in DT) and 4 images. is there a way to create a folder with the PDF and the 4 images and adjust the links easily?

I think what people really want is textbundle where they can treat a note like a rich note but still write in markdown.

3 Likes

Thanks! Yeah I took a look at the documentation now and the examples and it seems you need serious coding skills to create these? Or am I completely missing something :slight_smile:

I mean can I use the placeholders like %clipboard%: in the .md file and then export it somehow?

Z

it seems you need serious coding skills to create these?

It depends on what you’re doing. Templates can be simple, like exporting a single document or group, or complex. And yes, the complex ones would require scripting.

I mean can I use the placeholders like %clipboard%: in the .md file and then export it somehow?

If you saved a template of a Markdown file with %clipboard% in it, yes it would create the new file with the contents of the clipboard in it. Note this will not magically add image data if there’s an image on the clipboard, but for text it works.


Template and New File

thx so much. Indeed that worked well in the md file itself (which is great)!
I also wondered if that would work to auto create the .md file name itself and tried this

it didn’t work so I assume that you cant really use it this way? :slight_smile:

any clue on how to get the %groupName% I enter when I launch the template to actually fill in the name of the .md file beneath it?

as always really appreciate your generous help!

Z

You would not want to create a group with the %clipboard% placeholder. If there was a ton of text on the clipboard that would lead to poor results.

any clue on how to get the %groupName% I enter when I launch the template to actually fill in the name of the .md file beneath it?

Try this…

  1. Remove the Markdown file from the template.
  2. Create a group with your template, but change the name from `%clipboard%.
  3. Import the Markdown file with the %groupName% placeholder as the name, as shown here.
    You will see the name reflects the name of the existing group.

You’re welcome.

thx

Import the Markdown file with the %groupName% placeholder as the name, as shown here.

I think the image was missing?

if I follow correctly is this what you meant (still docent work for some reason):

thx

Z

And we have a bug!

Looking inside the .dtTemplate file, the placeholders have been converted from % to - on export.

This breaks the placeholders when the template is imported.

After changing the back to % manually, the placeholders work, including the %groupName% one.

@cgrunenberg will have to look at this.

1 Like

thx :)!!

You’re welcome :slight_smile:

It’s actually intentional that the export replaces certain characters to make the filenames compatible to most filesystems and servers. In case of templates I would suggest to simply add the placeholders in the Finder to the name.

thx @cgrunenberg, can you give an example?

Z

See my screen captures above.
The dashes are from the export, but manually changed to percentage signs so they’ll function properly.

Gotcha!
this is perfect!

thx

Z

You’re welcome :slight_smile:

In the context of discussions about storing files externally, it may be worth reminding people that DEVONthink can index external folders. From within DEVONthink, the result looks a lot like an ordinary group. And in particular, the items in the group get x-devonthink-item links, and these can be referenced from (e.g.) markdown documents. The consequence is that you can store images outside of DEVONthink yet access them much as if they were inside DEVONthink.

thx @mhucka, interesting approach. Can you give some example, in particular for the x-devonthink-item links

best

z

also continuing this discussion of storing images in one main folder, came across this post:

my question is how does one then use them in DTTG since the dropbox links will be using a different URL as opposed to the Mac? Is there anyway to deal with that ?

thx

Z