Jump to content

Search the Community

Showing results for tags 'clipboad'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 5 results

  1. Hi, [Objective] I am trying to build a workflow which gets a DOI link [e.g. https://doi.org/10.1287/orsc.3.3.398] and sets my clipboard to some text from a pulled JSON file. In this case (Orlikowski, 1992). However, I am having a hard time importing the query from Alfred in to the file, and getting it back. I have written the python script, lack the means to use the file. I have made the beginning of the workflow, using regex to focus on the link I need (e.g. 10.1287/orsc.3.3.398) with the regex key - (\/\d{2}.\d{4}\/\w.*), def main(): urlData = "https://api.crossref.org/works/" # the query should be inserted on line 44 urlData += "10.1287/orsc.3.3.398" # Open the URL and read the data webUrl = urllib.request.urlopen(urlData) print ("result code: " + str(webUrl.getcode())) if (webUrl.getcode() == 200): data = webUrl.read() # print out our customized results, but should set this to clipboard print(printResults(data)) else: print ("Received an error from server, cannot retrieve results " + str(webUrl.getcode()))
  2. Hi Everyone! After some time not being able to find any good way of searching for memes and pasting them into anything from MacOS, I've decided to create memepaste. It's super simple, just searches for files within your ~/meme folder and pastes it wherever you want! Here's the github page: https://github.com/gcarrarom/memepaste Releases Page: https://github.com/gcarrarom/memepaste/releases Requirements To get memepaste to work, you will need impbcopy into your /usr/local/bin/ folder. Installing impbcopy This is a good old tool that was created by Alec Jacobson, definitely recommend checking it out from his blog post here You can follow his blog post to install his tool or use the script I provide in this repo, completely up to you! To install impbcopy using my script, just run this command: $(curl https://raw.githubusercontent.com/gcarrarom/memepaste/master/install_pbcopy.sh) Or download the script and run it locally: curl https://raw.githubusercontent.com/gcarrarom/memepaste/master/install_pbcopy.sh --output install_pbcopy.sh chmod +x ./install_pbcopy ./install_pbcopy.sh FAQ "How do I add memes to this?" Just add your memes to your ~/meme folder! It's as simple as that! Make sure to also give a descriptive name to your file, you're going to be searching for memes using it. "why can't you use pbcopy?!?" I'm glad you've asked! If you have ever tried to use pbcopy for images, it's going to reference the file itself on your clipboard and it won't paste it as an image into the chats/documents/<insertYourApplicationHere>. "Where are my memes?!!?" Don't worry, if you don't see anything after typing meme on alfred, that's expected! This workflow uses the regular file filter from Alfred, nothing fancy. Just type something that should be in the file name of your meme. Just make sure it's in the ~/meme folder!
  3. Currently for snippets and for the "Copy to Clipboard" output in workflows we can choose between "Plain Text" and "Richt Text". I would like to see a third option "Paste HTML". Typinator allows exactly this and the good thing is, that it allows me to easily write text including links with titles to Microsoft Teams. For example if the following text is pasted to teams as HTML, the text will use Team's default text format and will include a titled link: Try out <a href="https://www.alfredapp.com">Alfred</a> – a super cool productivity solution for macOS. The only workaround at the moment is to write the required text in Teams with the link, copy and paste it into the snippet and paste it as "Richt Text". Unfortunately this does not support generating dynamic links and further it produces links in Microsoft Teams which do have the standard text color instead of the expected link color.
  4. Hello forum, What's the best practice for a workflow trigger (keyword or script filter) that uses an optional argument with a fallback value? Example 1 (I made this up): I want to more easily yell at people on the internet, so I have a workflow that turns text to caps. My clipboard is "foo". I call caps and expect my script to receive "foo". I call caps wasd and expect my script to receive "wasd". Example 2: Like example 1, but instead of the contents, I want to use hardcoded text. I call caps and expect my script to receive "your mother". ... What's the best practice to do that? This would be the in-script solution. Is there a built-in way to do this? import sys from AppKit import NSPasteboard, NSStringPboardType def getClipboard(): pb = NSPasteboard.generalPasteboard() pbstring = pb.stringForType_(NSStringPboardType) return u"Pastboard string: %s".encode("utf-8") % repr(pbstring) query = sys.argv[1] if len(sys.argv) >= 2 else getClipboard() # query = sys.argv[1] if len(sys.argv) >= 2 else "your mother" #example 2 sys.stdout.write(query.upper())
  5. I want to run a workflow when something is getting copied into the clipboard. If the clipboard content matches a certain pattern I want to open a URL. Is this possible at all? To me it seems I need a keyboard trigger that then inspects the clipboard. Which isn't quite as automated as I wished. cheers, Torsten
×
×
  • Create New...