Skip to content

Instantly share code, notes, and snippets.

@philippschmitt
Last active May 9, 2022 19:50
Show Gist options
  • Save philippschmitt/aa656a6a5e8b018a331e to your computer and use it in GitHub Desktop.
Save philippschmitt/aa656a6a5e8b018a331e to your computer and use it in GitHub Desktop.
Dropbox Paper Markdown (.md) Download Bookmarklet

Dropbox Paper Markdown (.md) Download Bookmarklet

I made this bookmarklet to download individual DB Paper documents in Markdown format, which is currently unsupported in Paper.

The interface only supports downloading individual documents in MSWord (.docx) format. While the global download option supports Markdown (.md) files, it doesn't work properly. I frequently find documents missing in the global dump.

Update, 04.06.16: Dropbox finally added the option to select Markdown as download format for individual docs. Which renders my bookmarklet useless, but is great!

Install & Use

  1. Create a new bookmark in your browser. It can be anything, like the page you're viewing currently.
  2. Right-Click the bookmark (in the bookmarks menu or bookmarks bar) and choose to edit the URL. In Safari, this option is called “Edit address”.
  3. Copy and paste the following code into the address field and confirm:
javascript:(function(){var u=window.location.href;u=u.split('#')[0];u=u.split('-');u=u[u.length-1];var d="https://paper.dropbox.com/pad/export?mode=single&format=md&localPadId={id}";d=d.replace('{id}',u);window.location.href=d;})();
  1. Navigate to any document in Paper and click the bookmark. The download should start promptly.

Source

You'll find the minified version as well as the full code below

// Minified:
javascript:(function(){var u=window.location.href;u=u.split('#')[0];u=u.split('-');u=u[u.length-1];var d="https://paper.dropbox.com/pad/export?mode=single&format=md&localPadId={id}";d=d.replace('{id}',u);window.location.href=d;})();

// Raw Version:
javascript:(function(){
	var u = window.location.href;
		u = u.split('#')[0];
		u = u.split('-');
		u = u[u.length-1];
	var d = "https://paper.dropbox.com/pad/export?mode=single&format=md&localPadId={id}";
		d = d.replace('{id}', u);
	window.location.href = d;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment