Jump to content

Clipboard snippets on iOS (iPhone/iPad)? Remote?


Recommended Posts

Hello! Is there a way to access Clipboard snippets that I have on my Mac from my iPad? I bought the Alfred Remote but couldn't find that functionality.

 

I'm answering on my mail frequently on the iPad and I use snippets a lot for that matter on my Mac.

 

Thank you!

Link to comment

Hello! Is there a way to access Clipboard snippets that I have on my Mac from my iPad? I bought the Alfred Remote but couldn't find that functionality.

 

I'm answering on my mail frequently on the iPad and I use snippets a lot for that matter on my Mac.

 

Thank you!

 

Hi there, could you please fill in your Powerpack email address in your forum profile before asking Powerpack-related questions? We'll then be happy to help you out :) If you're not sure how, drop us an email on info@alfredapp com and I'll add the details for you.

 

Cheers,

Vero

Link to comment

Not sure why you need it (KGB background check? :)  just kidding) but I just did it.

 

So is there any way to sync it with my iPad? I'm going on a business trip for a couple of weeks where I could only access my mail with the iPad without my Mac.

 

Thank you!

Edited by Cobraman
Link to comment

Not sure why you need it (KGB background check? :)  just kidding) but I just did it.

 

So is there any way to sync it with my iPad? I'm going on a business trip for a couple of weeks where I could only access my mail with the iPad without my Mac.

 

Thank you!

 

Thanks for confirming your details. :)

 

It's not possible to sync your clipboard entries as a whole to Remote at this point. However, for the snippets you use most frequently, I would suggest creating a page of clipboard snippet objects with these.

 

To do this, follow the steps here and choose "Insert snippet" to use an existing text snippet:

http://support.alfredapp.com/remote:clipboard

Link to comment

Thank you for the suggestion! 

 

So if I create this page my snippets will be available on the iPad?

 

The snippets will be available on your Remote in the same way as any other Remote-triggered action, by which I mean, it will paste the snipped text to the frontmost app on your Mac.

 

Just in case I misunderstood your original objective, it's worth clarifying that Remote works as a counterpart to your Mac, and performs actions on the Mac it's connected to, not on your iPad/iPhone itself. 

 

In this particular case, the snippet doesn't exist on your iPad itself - it's simply a trigger for an action on your Mac.

 

Hope this answers your question more clearly :)

 

Cheers,

Vero

Link to comment

Thank you for the explanation!

 

My original question was how to access Clipboard snippets on the iPad. And not on the Mac.

Is it possible?

 

Thank you

 

Sorry that I went down the wrong path with my answer. In short, no it isn't possible to access the snippets themselves on the iPad, as that's completely different to what Remote does (perform actions on the Mac).

 

You might want to take a look at TextExpander for what you have in mind :)

Link to comment

Thank you! :) I even found a better one - TypeSnippets. It allows to have snippets with labels and icons and insert them into text after previewing, not just the shortcuts.

 

Would be happy to see this functionality in Alfred Remote! It would be cool if Remote had much deeper integration with iPad/iPhone, not just Mac (I spent about an hour copying and pasting all the snippets I had from Alfred into TypeSnippets...).

 

Thanks again for the support!

Edited by Cobraman
Link to comment
  • 1 year later...
  • 1 year later...
On 3/18/2017 at 7:16 AM, bed said:

This isn't as nice as an integrated iOS keyboard, or even dedicated app... but I wanted access to my Alfred snippets (which I sync with Dropbox) on iOS too.... so I made a Workflow for it, which you can see and grab over at http://abednarz.net/alfred-dropbox-snippets.html:)

Hey Bed, just stumbled upon your link while searching for a way to access my Alfred snippets from my iPhone.

Unfortunately it's not working on my iOS 12, would you mind to help me troubleshooting?

I have installed your workflow,

set the correct path, enabled access to my Dropbox,

but it only displayed "snippets (0 KB)" and after touching this > "File not found" (or similar, I have it in German)

Any idea?

Thank you ?

Link to comment

I believe this is a problem with iOS 12 Shortcuts and Dropbox.  See https://talk.automators.fm/t/shortcuts-and-dropbox/1917

 

If you have TextExpander and TE Touch (last non-subscription versions) it's possible to use Hazel and AppleScript to do a one-way sync of snippets from Alfred to TE on the Mac and then use TE Touch on iOS.  At least it works for me - I can provide docs and scripts if there's interest.

Edited by dfay
Link to comment
  • 1 year later...
On 10/26/2018 at 12:15 PM, dfay said:

I believe this is a problem with iOS 12 Shortcuts and Dropbox.  See https://talk.automators.fm/t/shortcuts-and-dropbox/1917

 

If you have TextExpander and TE Touch (last non-subscription versions) it's possible to use Hazel and AppleScript to do a one-way sync of snippets from Alfred to TE on the Mac and then use TE Touch on iOS.  At least it works for me - I can provide docs and scripts if there's interest.

Hi Dfay,  I would love the script / docs for this (I'm a bit of newbie on scripts but used one of your python scripts for bulk import of snippets which was a life saver).  Also,  I have TextExpander (legacy) but cannot find TE Touch- is there another name?   Thanks again

 

Link to comment

TextExpander (legacy) is what they renamed TE Touch to be.

 

Here's the setup in Hazel:

 

this assumes anything you don't want to sync is tagged notForTE

 

Rule 1. for your Alfred snippets folder:

rules1.thumb.png.8ca9607ae9a4102ef5519c78762bb0a6.png

 

Rule 2. (same location)

rules2.thumb.png.f81524f6474fdc99d8d691f1f14c73a9.png

with the embedded script set to the first line here (I also sync to Copied, but I'll just cover TE for now) -- replacing the squiggles with the correct path to the script below:

rules3.thumb.png.9489fd74aab9bc4f915e30e6dc401f77.png

 

AlftoTE.py

 

you'll need to specify the TE group where you want the synced snippets to appear and add the uuid to the script.

I just created a new TE group for sync purposes, then went to

 

Settings.textexpandersettings > Show Package Contents 

and found the new group file there.

 

The uuid is just the group file

 

e.g. group_E65531A8-88BA-4619-B5D1-B954AC3DC0FF_4733813705.xml

 

without the group_ at the beginning and the .xml at the end 

 

e.g. E65531A8-88BA-4619-B5D1-B954AC3DC0FF_4733813705

#!/usr/bin/python

import argparse
# from plistlib import readPlist, writePlist - no longer writing TE plists directly
import json
import os
import uuid
from datetime import datetime

# UUID for target group for new snippets in TextExpander
teTargetGroup = "your uuid goes here"

def get_te(abbreviation=None, plain_text=None, label=None):
	return {
		'abbreviation': abbreviation,
		'abbreviationMode': 0,
		'creationDate': datetime.now(),
		'label': label,
		'modificationDate': datetime.now(),
		'plainText': plain_text,
		'snippetType': 0,
		'uuidString': str(uuid.uuid4()).upper()
	}

def a2te_replacements(s):
	s['snippet']=s['snippet'].replace('{clipboard}','%clipboard')
	s['snippet']=s['snippet'].replace('{cursor}','%|')	
	# in theory this should be extensible to handle date formats and date math...
	return s	

def transform(direction, source):
	if direction == 'AlftoTE':
		source = source['alfredsnippet']
		source = a2te_replacements(source)
		return get_te(abbreviation=source['keyword'], plain_text=source['snippet'], label=source['name'])
	else:
		raise Exception('Unsupported direction')

if __name__ == '__main__':
	parser = argparse.ArgumentParser(description='Alfred-Expander Sync')
	parser.add_argument('direction', choices=['AlftoTE'], default='AlftoTE')
	parser.add_argument('--alf', default=None, help='Alfred json snippet')
	args = parser.parse_args()

	source = args.alf
	with open(source, 'rb') as source_fp:
		source_json = json.load(source_fp)
	s = transform(args.direction, source_json)
	
	# use TE AppleScript rather than modify plist directly

	cmd = """osascript -e 'tell application "TextExpander"
		set g to every group whose ID is \"""" + teTargetGroup + """\"
		tell item 1 of g
			make new snippet with properties {plain text expansion:"""+"\""+s['plainText']+"\","+"abbreviation:"+"\""+s['abbreviation']+"\",label:\""+s['label']+"\"}"+"""
			end tell
	end tell'"""

os.system(cmd)

Incidentally the argument parser is completely unnecessary since there's only one option, but it's a legacy from having used this to get started:

https://github.com/markphilpot/sync_expanders

 

Edited by dfay
Link to comment
  • 3 weeks later...
8 hours ago, rjventrone said:

I know this is an old post but I would love this functionality on the iPad. I have a ton of snippets on my already my Mac and would love for them to work on the iPad as well.

 

It's not possible, unfortunately. iOS doesn't provide the necessary APIs for 3rd-party snippet expansion. For system-wide snippets, you're only option is native iOS snippets. Beyond that, you're limited to apps that have their own snippet-expansion function, or apps that explicitly support a 3rd-party SDK, such as TextExpander's SDK.

Edited by deanishe
Link to comment
  • 11 months later...
On 3/17/2017 at 11:16 PM, bed said:

This isn't as nice as an integrated iOS keyboard, or even dedicated app... but I wanted access to my Alfred snippets (which I sync with Dropbox) on iOS too.... so I made a Workflow for it, which you can see and grab over at http://abednarz.net/alfred-dropbox-snippets.html:)

@bed Do you have an updated link? I'd love to use this, but your link is for the old Workflow app.

 

Edit: Nevermind, the link did work after all!

Edited by paulw
update
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...