Send To Drafts
21 Nov 2017Summary
- Send text from Windows to Drafts app. Drafts is an iOS app.
Drafts. Where Text Starts.
Drafts lets you turn text into action – it’s a quick notebook, handy editor, and writing automation tool, all in one.
– from the website
Features
- Sends Windows clipboard text to Drafts by way of Dropbox.
- Sends PowerShell command line output to Drafts.
Setup
- Download or clone this repo to your ~/Documents/WindowsPowerShell/Modules folder.
- Add import-module Send-ToDrafts in your $PROFILE.
- Create the Drafts folder at ~/Dropbox/Drafts.
- From the Drafts Action Directory install Dropbox to Drafts.
Usage
Send-DosToDrafts cmdlet
- This cmdlet works with PowerShell commands entered as command line arguments or other PowerShell commands piped to Send-DosToDrafts.
- Running as a command line argument:
# Outputs the command results to the current window and creates a text file with the output in ~/Dropbox/Drafts
Send-DosToDrafts Get-ChildItem
- Running as piped commands:
# Outputs the command results to the current window and creates a text file with the output in ~/Dropbox/Drafts
Get-ChildItem | Send-DosToDrafts
Send-ClipboardToDrafts cmdlet
- Copy text to clipboard & run Send-ClipboardToDrafts.
- I made a Windows shortcut that runs Send-ClipboardToDrafts in a minimized PowerShell window. That provides a quick icon to click. In the future I may develop a C# app for the system tray.
Notes
- WindowsToDrafts on GitHub. This repo has the source for the Drafts app Action.
- Other notes and references for the module.