Jump to content

Terminal

Member
  • Posts

    169
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Terminal

  1. 8 hours ago, vitor said:

    Changes look good! But adding feeds fails:

     

    [20:51:09.763] ERROR: RSS Feed Reader[Run Script] Traceback (most recent call last):
      File "/Users/username/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/8D17D26A-9ECE-4321-ADBA-E4BCE0D3B108", line 22, in <module>
        with open(file_path, "r") as file:
    NameError: name 'file_path' is not defined

     

    Oops ! Forgot a single change. Will push an update shortly. 

  2. On 6/12/2023 at 10:58 AM, vitor said:

    This looks quite fun. I have thought about something like this in the past and I’m glad to see someone else also come up with it.


    Having fully tested the functionality yet, but a few notes:

    • There’s no default Keyword to start the workflow. There should be something (rss seems appropriate).
    • Regarding the checkbox, screen readers read the right side so Enabled won’t be clear. Should be something like New Feeds: [ ] Open feed after adding.
    • Instead of saving to ~/.alfred_feeds, which adds to the user’s home directory, it should add to alfred_workflow_data (be sure to create the directory if it does not exist).
    • There is an extra v in the version. Should be just 0.0.1 (see how it looks near the description at the top).
    • Maybe adding a feed should be a different keyword and/or have a different (colour) icon? Your choice, though, just a suggestion.
    • The name is a bit short and non-descriptive. RSS Feed Reader, as you have in the description, would be better. Then in the description something like Add and Read RSS Feeds.

     

    Everything is addressed in the latest release

     

    • Default keyword switched to `rss`
    • Right side updated for screen readers
    • Directory updated to  `alfred_workflow_data`
    • `v` removed
    • Keyword for adding a feed added `rssa`
    • Name Updated
  3. On 4/5/2023 at 5:22 PM, vitor said:

    Starting from Alfred 5.1 (currently in pre-release), multiple keywords are supported.

    This support still seems haphazard. I see that it is using the common || operator found in many programming languages. But now the keyword field cant use || as a keyword trigger ? Which I used to use for a custom terminal command. Why wasn’t the keyword updated to just support a list interface like list filters or similar. Where you can clearly define many keywords, not have to worry about them being slammed together into a tiny text field, and also not be restricted by character usage. 

  4. RSS Feed Reader

    image.thumb.png.a35a430ba74f19f2234f1de48c2789cf.png

     

    RSS workflow to make viewing RSS feeds pleasurable in Alfred

     

    Submission Questions

    1. I am the Author
    2. None
    3. RSS Feed
    4. None
    5. None
    6. Attached to Repo, Post and Workflow
  5. On 5/18/2023 at 2:02 PM, Charlotte415 said:

    Hi Enghel - were you able to get this to work on your Mac/Alfred/Qnap?
    If so, can you please share what you've learned?
    I would really like to get this up and running on my network - thanks in advance!!

     

    Also - if anyone else would kindly like to chime in - I would be forever in your debt.
    The topic we're looking for help with is located here:
     

    https://piszek.com/2023/03/19/qnap-qsirch-php-api-alfred/
     

    What about this script must be modified?
    How does it work, exactly??
    Thank you in advance!!


    Charlotte



    Basically you need to Copy the PHP then create the Script Filter and then update the HTTP URL,  USERNAME and PASSWORD fields in the Script Filter

  6. 12 minutes ago, vitor said:

    Checking for the number of arguments in several places increases the amount of code and surface area for problems but doesn’t offer a benefit and doesn’t address the situation, it hides the cause. The problem isn’t the number of arguments, it’s that there’s no window to move. And there’s no window specifically because your frontmost app (the Finder) has no open windows at the time. In other words, it’s not about the Desktop. Thus a path here could be to check if a window was successfully obtained and show a helpful error message if not. However, due to type of object returned we only know if we were successful when we try access its properties. Which comes with a performance cost. We could have it into a try clause, but it’s a sizeable piece of code which uses the Objective-C bridge so keeping it simple matters.


    In sum, we we need to return an error in that situation anyway, because it is indeed an error. At best the message could be a bit more instructive, but that’s a tiny improvement for a niche (and understandable) situation which comes at either a cost of code comprehension or execution speed, neither of which are good tradeoffs because you want this to be as fast as possible and maintainable.


    I do have ideas for a revamp of this code to make it faster, and if the plan is workable the messaging would be taken care of in the same swoop. No promises or ETA as more exploration is in order and it requires futzing with some low-level APIs. It’s important that it continues to work, and it does now.

     

    Yes, it just took me a minute to see why it wasn't working. For now, I've added a check in my workflow to ensure there is a top most window :) 

  7. Hello,

     

    I noticed today when I was using my Workflow that leverages various Window Management automation tasks that argv input handling can cause a error in the a Window does not have focus.

    What is happening is that when you click on the Desktop and don't focus a window, and then trigger a workflow that using something like `half-right` or any other present, the `argv` that is passed to the window-bounds.js doesn't have the correct amount of arguments and you end up getting a `../window-bounds.js: execution error: Error: Error: Invalid index. (-1719)`

    The fix is fairly straight forward (in fact I did it locally) and that is to first check argv length at the beginning of run to be >= 3 and then in any of the conditionals that accept 3+ more argv validate the length again before accessing :) 

×
×
  • Create New...