Action

Open Twitter User Profile

Posted by @jsamlarose, Last update almost 4 years ago

Small helper action. Found myself needing to prune a few Twitter lists recently. Or, to be more accurate: every now and then, I feel that I should prune my Twitter lists to keep them functional and high signal, then I think about doing that through the Twitter interface, and the initiative dies there…

Using Tweetdeck, I exported usernames from a list into a draft, then built this action, which simply opens the user profile for a given @user wherever the cursor is (so one @user per line).

It’s not particularly sophisticated (no regex), just splits the line on the basis of the @ symbol and assumes that the first @value in the line is the username to target, which means you should be able to manage a list of twitter handles as a bulleted task list and/or include an @done(date/time) tag to log date of last review, if you’re so inclined.

Steps

  • script

    // See online documentation for examples
    // https://docs.getdrafts.com/docs/actions/scripting
    
    var lineRefs = editor.getSelectedLineRange()
    var line = editor.getTextInRange(lineRefs[0],lineRefs[1])
    
    line = line.split("@")
    
    draft.setTemplateTag("twHandle",line[1].trim())
  • url

    template
    https://twitter.com/[[twHandle]]
    useSafari
    false
    encodeTags
    true

Options

  • After Success Default
    Notification Error
    Log Level Error
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.