Skip to content

Instantly share code, notes, and snippets.

@natchiketa
Last active August 29, 2015 14:24
Show Gist options
  • Save natchiketa/a8057a24d6cd1741b891 to your computer and use it in GitHub Desktop.
Save natchiketa/a8057a24d6cd1741b891 to your computer and use it in GitHub Desktop.
pbjade: convert HTML in clipboard to Jade

Install the package

# You might have to sudo 
npm install -g html2jade

Make sure it's working

Try out the html2jade command. For example, with some HTML in your clipboard, do this in the shell:

pbpaste | html2jade

You should see some Jade output to the terminal.

Add the alias

Add this alias to your shell config (e.g. ~/.bash_profile):

# You can just append it like this
echo "alias pbjade='pbpaste | html2jade | pbcopy'" >> ~/.bash_profile

et voilà! Now just do pbjade in a terminal with HTML in your clipboard, and it shall be Jade-ified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment