Is there a URI scheme to share to drafts?

Hi,

I have a chrome extension called ‘Addtoany’. It allows me to send any URL to a number of places online.

There is an option to add services with a custom entry and it asks for URI scheme in the following format:

“URI scheme:
https://www.example.com/share?link=${link}&title=${title}
You can specify ${link} and ${title} placeholders in the service’s URI scheme.”

Is there any way to specify a URI in that way?

Regards Dave

Certainly a local x-callback-url scheme available.

If you need an online API, you might be able to do something with one of the usual web integration services, a webhook (a URL as described), and a link into Reminders. Drafts can import from Reminders. But not sure how practical this latter one would be.

I need the same or similar workflow i use for the rest of my sharing on my OSX machines otherwise i go more crazy than usual.

If i have a custom solution for every function i won’t use it and it get’s forgot.

(It’s bad enough that chrome extensions don’t work on ipad chrome. :slight_smile:)

Neither directions you suggest are a viable solution really are they?

I’ve taken a closer look. The service you reference in the link above is a service for adding link buttons to web sites. The chrome extension I think is this one, and is effectively acting as a middle man in Chrome to allow you to have the equivalent of those buttons on a site without adding them to the site.

The AddToAny service looks to be exclusively designed to integrate with online services. That’s not a huge surprise, and seems logical. However, what you seem to be asking for is to integrate with an application that isn’t an online service using this AddtoAny service. That means you’re trying to do two entirely disconnected things, like trying to get a electric car to run on petrol/gasoline. You can do it, but you have to build something to turn that petrol /gasoline into electricity and pipe it into the car.

So the question of viability comes down to whether or not you can build a bridge from an online service to local app instance. If I had a personal need to, I would absolutely attempt the latter that I described above. I have a Mac mini on 24x7 that I could use to facilitate it.

Looking at the capabilities of AddtoAny, it doesn’t work with any service, just the services it has created links for. As a result I’d probably look at something like using Pocket as a go between to receive the links, then something on the Mac to process them and push them into Drafts via the iCloud import folder.

However, if Chrome wasn’t giving me the native share options I would expect (I don’t use Chrome on the Mac, but I assume that is the underlying issue you are having), I would use a different local method. The simplest would seem to be to copy the content to the clipboard and then use Draft’s global hotkey for capturing the clipboard. You could streamline that further with something like Keyboard Maestro to trigger all of this and clear the last entry from the clipboard history if you wanted to keep that unlittered from such sharing options.

Yes I put a link to the chrome extension in my post so well done, you have the right one.

I save much text for various reasons from web pages via drafts to various other repositories. I not sure where your analogy of motor cars Is leading but let’s put that aside:

Many apps have a uri that acts as an interface for a “web based” version of the app; for example evernote can accept text or mostly anything shared to ones ones account if you have verified the interaction.

What I’m asking here is for drafts to do the same thing via an authorized interface. After all drafts can send to Evernote, wordpress, gDocs, Bear, and any number of other applications.

There is a cloud based repository of all ones Drafts data online that each instance of Drafts you run uses to sync so would an ‘cloud’ based interface be so hard?

I guess this is directed at the Agile Tortoise themselves so I may have to wait for them to skip over this way…

There is a cloud based repository of all ones Drafts data online that each instance of Drafts you run uses to sync so would an ‘cloud’ based interface be so hard?

The short answer, I believe, is yes.

As I understand it, Drafts uses Apple’s CloudKit to sync data across devices. I don’t think Apple provides any API to access CloudKit data from outside of apps, or even for one app to access another app’s CloudKit data. There’s no web or even Files/Finder access to CloudKit data. And, even if there were, the Drafts data is a database, not a list of text files. Making sense of the data requires a Drafts app.

Doing what you ask would require Drafts to implement an entirely separate cloud backend and to create some sort of web app or API to access that data. That is no small task.

There are potential workarounds described above. But, ultimately, it sounds like you might need to use a different tool—perhaps one of the many plaint text/markdown editors that use external files.

Basically @cpac is correct.

Drafts uses your private CloudKit datastore to sync data. We do not have any of your data on any servers anywhere - only Apple does, and it is only stored in the private iCloud storage associated with your Apple ID.

We do not run our own web-based services, backend stores, or APIs.

This choice has a lot of pros (no need to create accounts, no need for you to trust yet another service to store your data securely), but has some downsides as well in flexibility of implementing feature like you describe which would expose your data directly on the web.

Technically, Apple does provide a Javascript API for CloudKit, that is supposed to allow some level of integration with the web, but in my experience it is of very limited usefulness and would not allow for supporting feature like you describe.

I"m not sure what the limitations of Chrome Extensions are - there are many ways to get data into Drafts via local URL schemes, via automatic import and similar.

1 Like