Alfred Clipboard Teleporter

An Alfred workflow to copy the most recent image from Alfred clipboard into a folder hosted by a local webserver. This workflow is particular to one of my daily routines. You might want to evolve this workflow to your custom needs or reuse parts of it to automate your daily life!

Pre-requisites

  1. Install https://www.alfredapp.com/
  2. Enable Alfred workflows
  3. Enable clipboard history for Images on Alfred
  4. OPTIONAL - Install Web Server for Chrome. You will copy the image from the clipboard to a folder managed by this webserver

Some more setup instructions

👇️ Following steps should be run after the workflow is installed

  1. Install Pillow module for Python 2.7. This takes care of converting *.tiff file to *.jpeg

    Alfred currently works with Python 2.7 only. So, I installed the Python module using in the following way and into the workflow folder

    1. Once the workflow is created, navigate to the workflow folder in Finder
    2. Use the script python2 -m pip install --target=. Pillow to install the package
    3. Once installed, the folder structure would look like
  2. Set up the followig environment variables
    1. db_name should be clipboard.alfdb
    2. db_path should be Library/Application Support/Alfred/Databases
    3. dest_dir should be the target folder to place your image

Running the Workflow

  1. I have the workflow set up to be triggered on receiving \\pi keystroke or a hotkey
  2. When the workflow is triggered, it will copy the most recent image from Alfred's clipboard and copy it to the dest_dir