Jump to content

Chris Messina

Member
  • Posts

    451
  • Joined

  • Last visited

  • Days Won

    28

Reputation Activity

  1. Like
    Chris Messina got a reaction from cands in [Workflow] Twitter Toolkit for Alfred   
    Ok, I've published v0.3.2! 
     
    This should please @Bemawr and @Voland and any other Tweetbot users! (Albeit, Tweetbot has a much more limited set of URL schemes to work with). 
     
    🎩  Download the latest.
    Changelog
    [v0.3.2] - 2020-09-06
    Fixed
    Quick fix for missing non-personalized `users` query. [v0.3.1] - 2020-09-06
    Fixed
    Replaced “(from:{var:account})” with “from:{var:account}” (no parens) from app searches. Fixed on errant search that targeted videos rather than all tweets. [v0.3.0] - 2020-09-04
    Added
    Support for Tweetbot URL Schemes by setting tweetbot as platform variable (thanks @bemawr!) (Closes #3) Support for nearby searches: tweets photos videos users keywords to go to: hashtag page topics Alternative keyword ! for notifs Descriptive notes in Workflow OneUpdater (Closes #6) Changed
    Added service and domain variables to make it easier to develop other Toolkits Drastically increased support for Twitter for Mac thanks to new routes included in 8.34 (thanks @nolanobrien!) (Closes #4) Removed
    followees keyword
  2. Like
    Chris Messina reacted to Bemawr in [Workflow] Twitter Toolkit for Alfred   
    No idea how I missed this! Thank you! Great work!
  3. Thanks
    Chris Messina got a reaction from Mr Pennyworth in CleanShot X Workflow   
    Sure — here you go. LMKWYT.
     
     
    I've requested public documentation and the developer seemed willing to provide it!
  4. Like
    Chris Messina reacted to vitor in CleanShot X Workflow   
    @Mr Pennyworth To find URL schemes supported by an app, reading the ${app_path}/Contents/Info.plist file and looking for CFBundleURLSchemes tag if often enough. Or doing /usr/libexec/PlistBuddy -c 'print :CFBundleURLTypes' "${app_path}/Contents/Info.plist".

    But I think you’ll like this more: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump URLSchemeBinding. It shows every available URL scheme (on your machine).

    As to how to use them, that’s the job of the developer’s documentation.
  5. Thanks
    Chris Messina reacted to Vero in Forum suggestion: improve notification styling?   
    @Chris Messina Thanks for the reminder! Been meaning to update this a bajillion times, but when I come to the forum, I just crack on with answering questions and forget every time. I've just updated it to be light grey instead so should be easier to read
  6. Like
    Chris Messina got a reaction from Mr Pennyworth in CleanShot X Workflow   
    Yes exactly! It was the Raycast extension that lead me to create my Workflow. 
     
     
    Also yes! 
     
    I have a Workflow that will extract Asset Catalogs with a hotkey. I use it constantly! Let me know if I should release it.
     
    BTW, I'm in touch w/ the Cleanshot developer. If there are features or improvements you'd like to suggest, let me know! 
     

  7. Like
    Chris Messina got a reaction from iandol in The object/verb modifier   
    As a forum QuickSilver user myself, I would LOVE to see something like this. It was one of the hardest things to give up when I migrated to Alfred.
  8. Like
    Chris Messina got a reaction from Mr Pennyworth in CleanShot X Workflow   
    Ha! I made a much more basic version of this but never released it... nice job! 
     

  9. Like
    Chris Messina reacted to Mr Pennyworth in CleanShot X Workflow   
    CleanShot X Workflow: Download

     
    Requiremens

    Alfred 4 CleanShot X (version 3.5.1 or above)


    Screenshots




    Credits
    This workflow is based on, and a slight improvement of, Raycast’s CleanShot X script commands.
     
    Icon Credits
    Some icons from by srip and freepik from flaticon.
  10. Like
    Chris Messina got a reaction from dfay in Nested Snippets (snippets within snippets)   
    Wow, ok — makes sense now. Thanks! I can see the source of my confusion since the Snippets Manager doesn't really connect to the Workflow Snippet Triggers (i.e. by cross-linking or perhaps by listing them as a special collection in the Snippets Manager).
     
    It would be handy if the Snippets Manager listed Workflow-derived Snippet Triggers!
  11. Like
    Chris Messina reacted to deanishe in Help improving a JSON file prettifier workflow?   
    Your try ... except is in the wrong place: the script will fail on read 99.9% of the time, not write. But in any case, you generally just put it around the entire per-item code:
     
    from __future__ import print_function import json import sys n = 0 # number of files processed for path in sys.argv[1:]: try: with open(path) as fp: data = json.load(fp) with open(path, 'w') as fp: json.dump(data, fp, indent=4, separators=(',', ': ')) n += 1 except Exception as err: # anything written to STDERR goes to Alfred's debugger print('[error] file %s: %s' % (path, err), file=sys.stderr) plural = ('s', '')[n==1] # anything written to STDOUT goes to the next action (i.e. arg/{query}) print('Prettified %d file%s' % (n, plural), end='')  
     
    Variables and arg/{query} are two different matters, and Script Filters and regular Run Script actions are two different things again.
     
    In this case, you don’t really need to use variables, because you only need one output: the notification. So you can just print the notification text because anything you print becomes the next element’s arg/{query}.
     
    Important: If you’re going to get into writing Python, you should stop using /usr/bin/python and use /usr/bin/python3 instead. (You’ll have to use Alfred's External File option for Language and the shebang #!/usr/bin/python3 to do that.) Python 2 is dead and will be gone soon, and Python 3 is easier to use, anyway.
  12. Like
    Chris Messina reacted to deanishe in Help improving a JSON file prettifier workflow?   
    Right yeah, good point: workflows keep running when a Run Script action fails, so your original version also needs some kind of hand-rolled error check before the Write Text File.
     
    But the script is inherently fail safe because it will error out decoding the file and never run the code that overwrites it.
  13. Like
    Chris Messina reacted to shaonianruntu in Unified icon style   
    As shown in the picture above, 1 and 2 represents bookmarks from safari , 3 and 4 are my own defined web search shortcuts, and the others are all the macOS system app.
    In there, 1 and 2  icon style is not suit with the macOS big sur system apps icon style.
     

     
    And also, in this above picture, 1 is alfred defined google images search shortcut, the first result is macOS system app, and the others are bookmarks from safari.
    It can be show from the picture, that 1 and bookmarks icon style are not suit with the macOS big sur system apps icon style.
     
    This problem can be seen in others. 
    Alfred's defined icon style is not suit with big sur icon style, which is I want to update.
     
    In addition, the web bookmark icon now are totally simple and monotonous. I hope you to update it, using the icon of the page itself for web bookmark, just as Safari did, rather than with a uniform bookmark icon.
     
     
  14. Thanks
    Chris Messina reacted to deanishe in Help improving a JSON file prettifier workflow?   
    Your workflow's set up the wrong way for that. A File Action can output an array, and a script can accept multiple arguments (provided you use argv), but most other elements can't handle multiple inputs and will squash them into a single string. Write Text File can only write one file, so if you need to handle multiple files, you have to do it in code. Like this.
  15. Like
    Chris Messina reacted to Andrew in Typo in Write Text File object   
    @Chris Messina thanks! I'll get that fixed
  16. Thanks
    Chris Messina reacted to Vero in Nested Snippets (snippets within snippets)   
    You'll need to set keywords for the Snippet Triggers as these are stripped from the workflow to avoid clashing with your own.
     
    For example, I've set them to these... Just keep in mind the shared prefix in your Snippet Triggers setup, so I've only set them to "tw" and so on, and the \\ prefix is set globally for all my snippet triggers.
     

     
    You've no doubt figured that in @dfay's example, you can set the name and address in the environment variables under the [x] in the top right of the workflow canvas   
     
    You can read more about the snippet triggers object, or see the few scenarios with dynamic content within the snippets as examples too. 
     
    Nested snippets and snippets trigger based workflows generally are really good fun and ever so useful.
  17. Like
    Chris Messina reacted to ruddra in Alfred Notable   
    Alfred: Notable
    An Alfred workflow which allows you to create new markdown files suitable to use with Notable App.
     
    Packal: http://www.packal.org/workflow/notable
    GitHub: https://github.com/ruddra/alfred-notable-workflow
    Prerequisite
    First you need is to download and install the Notable app from the official website. Then download the workflow file and install it in Alfred. But you need to purchase powerpack before running this workflow. By default this workflow will create markdown files in ~/.notable/notes folder. If you want to change it, add an environment variable named notable_folder in the workflow.

    Usage
    Press alt+space(or the shortcut you have selected for alfred). Then type note Name of my note.

     
    Then it should create new markdown file named 2020-07-13-name-of-my-note.md inside noteable direction.
    Template
    By default the markdown file will be generated with a basic template. If you do not want to use a template, then add no_template in environment variable. You can use your custom templates as well. Just add a template.txt file inside notable app's notes directory(where the markdown files are being created) with your favorite markup.
  18. Like
    Chris Messina reacted to Acidham in Alfred Markdown Notes   
    Markdown Notes help to manage Markdown files in a directory with powerful full text search (supports & and |), tag search or search for todos ( - [ ] or * [ ]) . It also allows to quickly create new notes based on custom templates.
     
    I started to write this to replace the ton of Note taking apps that I used a while ago. I spent a lot of time to get this to work and the setup is a bit complex but once you went thru the steps it can indeed replace your note taking app. 
     
    The best MD Editor for this purpose is Typora but any other MD editor works as well. 
     
    Download at Git as usual: https://github.com/Acidham/alfred-markdown-notes/releases/latest
  19. Like
    Chris Messina got a reaction from Jono in Better theme support for dark icons?   
    The Feather Icons are released under MIT license, although there are only 286 compared with SF Symbols's 2400. Are you open to using Feather icons?
     
    Also, Apple states:
     
     
    So as long as Alfred isn't using them in "app icons, logos, or any other trademark-related use", this implies that use in interfaces would be fine, since they "shall be considered to be system-provided images". Given that Alfred already uses many system-provided images, using SF Symbols seems an extension of that existing behavior. For example:
     

     
    Again, my goal/intention is to make it easier for Workflow developers to support Light and Dark Appearances. Of course we can leave it up to each Workflow developer to source their own icons for each appearance mode, and trust each to do a good job selecting consistent icons, but this seems like overhead that many Workflow devs would possibly prefer to avoid, if possible.
     
    I suppose I'm biased to making it easier for people to make Workflows that offer good looking interfaces in both light and dark modes with less effort. Is that also something that you are interested in, or not so much? 
     
  20. Like
    Chris Messina reacted to Jono in It would be awesome to have some updated and more modern icons   
    Yeah, I’ve never liked these. They don’t look too ‘Mac like’, and they’re also looking dated. 
     
    I think it would look much better if they used the SF Symbol icons. They would already cover most of what Alfred needs, and look more in keeping with Big Sur. 
  21. Thanks
    Chris Messina reacted to gingerbeardman in Standard Workflow Object + Alfred-UI for obtaining API tokens   
    I'm a long time Alfred user (next month it will be a decade since my first powerpack puchase; I started with Alfred version 0.8.2).
     
    Even as a workflow creator/power user I consider my use of Alfred quite limited in scope: clipboard history, web searches, a few workflows with keywords, a few workflows with only hotkeys, and of course app launching. 
     
    Anyway, I found out about Raycast yesterday and given that I'm away from my computer right now all I can do is read about it and watch YouTube videos. This is the only thread on Alfred Forum about Raycast (surprising!) so I thought I'd add my thoughts here. I'm excited to see how it fits with my habits, it has the possibility of replacing multiple apps on my Mac. At a minimum the user interface and preferences window look extremely well considered. 
     
    It seems Raycast have done a few things different which has given them traction:
    targeting developers ahead of normal users bundled workflows for popular services onboarding process that empowers users user interface is insanely great all features are free (for now, they say) big team and rapid iteration is apparent everywhere Reading yesterday on twitter a couple of thing caught my eye which I feel summarises the situation nicely:
     
     
    There are many more along this line, with many developers stating that they are switching from Alfred to Raycast citing things that were already possible in Alfred. They were obviously unaware of these things. Example:
     
     
    (of course I replied to say that this is indeed already possible using Alfred)
     
    So I'm wondering how many Alfred users dive into workflows to customise the experience to suit themselves? Apparently not as many as I would have expected! And these users are all developers. Thinking about it, Alfred workflow discovery is actually very difficult for users. 
     
    It might make sense for Alfred to rise to the occasion and surface more things during onboarding to make it known that the gap between Alfred and Raycast may not be as big as some users think. Apologies if it already does as it's been many years since I saw the Alfred onboarding process. 
     
     
    Finally, I have to mention that this thread comes across as quite dismissive of good intentions in a host of ways. I found it really tough to read. This vibe pervades a lot of this forum in my experience. I'd like to see that improve. 
     
    To get back on topic, if workflows are already managing API and tokens themselves in a whole variety of ways, it seems obvious to me that an official way to do that with a unified interface/experience could only be a good thing for users?
  22. Like
    Chris Messina reacted to paulw in Do Not Disturb, Limited   
    @troycurtisjr With help from someone on reddit, I was able to cobble together code that tests for Do Not Disturb status on Big Sur. The plist file ~/Library/Preferences/com.apple.ncprefs contains a plist item dnd_prefs. That item contains a base64-encoded binary plist (bplist). When that is decoded, if DND is enabled, it would look something like this:
     
    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>dndDisplayLock</key> <false/> <key>dndDisplaySleep</key> <false/> <key>dndMirrored</key> <false/> <key>facetimeCanBreakDND</key> <false/> <key>repeatedFacetimeCallsBreaksDND</key> <false/> <key>userPref</key> <dict> <key>date</key> <date>2021-01-15T04:35:29Z</date> <key>enabled</key> <true/> <key>reason</key> <integer>1</integer> </dict> </dict> </plist>  
    The presence of the <key>userPref</key> and the <key>enabled</key> within the adjacent <dict></dict> indicate DND is enabled.
     
    So the following code produces 1 if DND is enabled, and 0 if it is disabled:

     
    #!/bin/zsh dnd_enabled=$(plutil -extract dnd_prefs xml1 -o - ~/Library/Preferences/com.apple.ncprefs.plist | xpath -q -e 'string(//data)' | base64 -D | plutil -convert xml1 - -o - | xpath -q -e 'boolean(//key[text()="userPref"]/following-sibling::dict/key[text()="enabled"])') echo $dnd_enabled  
    Note: there seems to often be a lag time of a few seconds before the result reflects any change to DND.
     
    Feel free to incorporate that in your workflow.
     
  23. Like
    Chris Messina reacted to godbout in Alfred Workflow Updater (Swift)   
    library in Swift to ease the integration of updates from within Alfred.
     
    the API is basically four (3+1, or 2+2 if you prefer) methods:
     
    1. check if an update is available (compares latest version on GitHub release VS the version of your local Workflow):
     
    if let release = Updater.checkUpdate(for: "godbout/AlfredKat") {     // release.version, release.file, release.page available }  
    2. launch the update 
     
    Updater.update(with: release.file)  
    3. notify (useful before launching at it is blocking)
     
    Updater.notify(title: "Alfred Kat", message: "downloading your s... workflow")  
    4. open release page (or anything for that matter)
     
    Updater.open(page: release.page)  
     
    more on GitHub: https://github.com/godbout/AlfredWorkflowUpdater
     
    currently the update will be blocking your Script and the notification icon is the Script Editor one. this should get better in subsequent updates.
     
    enjoy ☀️
     
     
  24. Like
    Chris Messina got a reaction from Shark.Formax in Standard Workflow Object + Alfred-UI for obtaining API tokens   
    Just dropping more evidence of a pattern I'm seeing in cloud-connected software... this time in Linear.app.
     

  25. Like
    Chris Messina got a reaction from Shark.Formax in Standard Workflow Object + Alfred-UI for obtaining API tokens   
    I've been exploring Raycast and one of its benefits is its deeper integration with SAAS like GitHub, Jira, Zoom, G Suite, Asana, and others. 
     
    Given that all of these providers require authentication, I think it could be incredibly powerful if Alfred made it easier for Workflow developers to get API tokens from the most popular providers using a standard Workflow Object (either an Action (i.e. Sign the User In) or Utility (i.e. Get Access Token)).
     
    I realize this would require that Workflow developers would need to get API keys and do some extra leg work, but what I would like to see are Alfred-provided UIs like these:
     

    Once the authentication/authorization flow is complete, the Workflow Object would create an Environment Variable for the retrieved API token.
     
     
     
×
×
  • Create New...