After cutting and pasting the text, "Example cut text" should only be in the bottom box.Ĭut and paste text on an Apple iPhone and iPad Cut text Using the two text fields below, try cutting the text in the first field and pasting it into the second. Press and hold down your finger on the screen where you want to paste and select Paste to paste the text. Highlight the text you want to cut and then press your finger on Cut to cut. Upon letting go, a menu should appear on top-right of the screen (shown to the right) that lets you cut. Press and hold down on any text with your finger and then let go.
After cutting and pasting the text, "Example cut text" should only be in the bottom box.Ĭut and paste text on an Android smartphone and tablet Cutting text Then, paste it ( Ctrl+ V, or Command+ V on Mac) it into the second. Use the two text fields below to cut ( Ctrl+ X, or Command+ X on Mac) the text in the first box. Something must be cut or copied before it can be pasted. If your interested this is the work in progress script, hope you don’t mind I stripped some functions I didn’t need, I’m not a programmer so if I’m doing anything n00bish just let me know.If nothing is in the clipboard nothing can be pasted, and the Paste option is grayed out. Next I’m looking at doing a search term function so I can monitor hashtags. I fixed this using ‘(“utf-8”)’ in the print command. (It seemed to run find in the terminal output but in GeekTool it would print all text up to the unicode character then stop). I’ve been doing some work to get the formatting to align columns, also there was an issue with GeekTool reading the Unicode characters because the default output of python is ASCII. I have GeekTool set to refresh the the script every 5 minutes (300 seconds). Hi, sorry I didn’t enable email notifications so I only just read your reply. Print "+mention.text+" : "+str(mention.id)Īpi.update_status(status=sys.argv, in_reply_to_status_id=sys.argv)
Here’s the full text of the revised script:ĬONSUMER_SECRET = keyring.get_password('CONSUMER_SECRET', 'parezcoydigo')ĪCCESS_KEY = '28424167-jwvywgfEjqcX圎bQU3Y36w2md5SyL6NC5JI5NR2bd'ĪCCESS_SECRET = keyring.get_password('ACCESS_SECRET', 'parezcoydigo')Īuth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)Īuth.set_access_token(ACCESS_KEY, ACCESS_SECRET)īitlyKey=keyring.get_password('bitly', 'parezcoydigo')īit = bitly_api.Connection('parezcoydigo', bitlyKey)Īpi.update_status(sys.argv+data) Simply pass the status ID in the terminal: The name of the person you are replying to is not automatically prepended to the message, so you have to enter that, but regardless the status will be linked from twitter’s perspective. To reply to the status, add the status ID as an argument. So, a status prints in the terminal like trying to decide on a family trip to LA or to DC in With that number, you can reply to or simply retweet a status. On functionality, I added status id numbers to the end of retrieved tweets and mentions. At any rate, the script now calls the Mac keychain to get the secret credentials for authorization for both the twitter and bit.ly APIs.
In fact, it would be easy to simply add the keyring code to the application authorization process described here so that you wouldn’t have to cut and paste anything at all. No need to put them directly in your code. You can exchange the name you gave your twitter app, your user name, and the ACCESS and CONSUMER secret keys for the password, and those keys will be safe.
Using keyring, adding a password or key to the Mac’s keychain is as simple as this line of code: t_password('application name', 'user', 'password'). There is an elegant little python module to do just that: keyring. The simplest way to deal with this on a Mac is to use its built-in keychain. On the security front, it just feels wrong to me to have secret keys lying around in plain text files like an American on vacation in Rio with his wallet hanging out and a $2000 camera around his neck.
Actually, I do like that I can be working, and check the most recent tweets in my stream without the temptation to go through several hours of stuff and end up in link distraction wonderland. But, then again, why bother to check twitter or tweet anything from the command line anyway? Just for fun, of course. Of course, this isn’t a nice gui app, so it’s slightly more complicated than one might be used to. I’ve tweaked it a bit for better security and to add the ability to reply or retweet something from your feed.
Over the weekend I posted a python script to check one’s timeline, mentions, or post an update from the terminal in Mac OS X.