Merge number of "Link Title\nURL" Drafts as list of Markdown links

URL Quick capture gathers links in individual drafts of the form “Link Title\nURL”, e.g.

Drafts Community
https://forums.getdrafts.com/

or

Drafts | Where Text Starts
https://getdrafts.com/

Now I have bunch of such drafts I want to merge into a list of Markdown links, e.g.

* [Drafts Community](https://forums.getdrafts.com/)
* [Drafts | Where Text Starts](https://getdrafts.com/)
...

Is there an action for this?

Many thanks for any pointers!

There is a “merge” action per this post. but I think if you want to convert it to Markdown, you may want to play with the way Quick Capture generates the draft in the first place. You can share the structure in the settings like I’ve done here.

And to merge the existing links into a list you’ll have to create an action with the following steps

  1. Get the content from the drafts (From tags or selection)
  2. Read the lines if is the only content on the drafts with (.*)\s(https?://.*) that regular expression you should be able to get the information
  3. Create a new document with the obtained information

If you need any help making the action, ask for help

I have the same Web template as you, @motopascyyy, but Quick Capture still does the line-by-line thing.

Do I miss something in your screenshot?

No, he was showing where you could change it. If you change it to not to be multiline and to not use a Markdown heading or the selection but a list marker instead, you could produce something like this;

* [[[title]]]([[url]])

That should be a bullets Markdown link to the page.

But it seems to me that the Quick Capture Extension action doesn’t use the template at all. It just writes firstly the title and then the URL in the new line.

To this point it was taken you were using the share sheet from Safari, which would use that template. If it is actually an action you are using, that would be something separate and not use the template.

The only “Quick Capture” action I see in the directory is this one.

Can you provide a link to the action you are referring to?

Likewise if you are using something els, such as one of the web capture service ,bookmarklets can you detail that here?

No, no, it’s the “Drafts Quick Capture” action in the Standard Share Sheet on iOS:

With the above template in my settings and the URL for the previous reply loaded, using the “Drafts Quick Capture” option from the share sheet gave me this result.

Markdown bulleted, formatted as a Markdown link with page title and URL, and all on line 1.

Here’s how the settings look.

1 Like

Sorry, doesn’t work for me: I use exactly your template and I still get:

It might be related to that I have iCabMobile set as my default browser. But I checked Firefox as well and it doesn’t work either. Maybe it works only with Safari…

Yes, it only works in Safari. This is noted in the documentation.

Well, that’s why I have to put the action à la @Zrapata’s comment together! :slight_smile: