Jump to content

GoOz

Member
  • Posts

    29
  • Joined

  • Last visited

Posts posted by GoOz

  1. 1 hour ago, avk_tp said:

     

    Hey hey!

     

    Good eye on the Alfred 2 folder issue - I've now updated the relevant lines to use the Alfred 3+ naming conventions. But I think the real problem may actually lie elsewhere, as now I'm getting the same issue you originally had (i.e. with the null return). Not sure what has changed... don't suppose you have any other ideas? :) 


    Sorry I have no clue either. Last time it was "fixed" when I uninstalled and reinstalled the workflow. Didn't try it yet.
    But I'm pretty sure it's not related to the request or the WordReference's API itself.

    EDIT: I just uninstalled/reinstalled it and the path is now fixed but I still get `Script with argument '(null)' finished` 😢

  2. Hey @avk_tp

     

    It's me again :D

     

    I have the same issue, again.

    As Alfred 4 came out,  I decided to clean a little bit, uninstalled Alfred and installed the new version. It turns out I still get the same error for the missing "Alfred 2" folder. I took a look in your code and found this line. I'm starting to think that this is the issue. I also get the `Script with argument '(null)' finished` but one thing at a time. :)

    What do you think?

  3. 11 hours ago, avk_tp said:

    Hey @GoOz,

     

    Hmmm, I'm not sure... I can't recreate the issue, as my WR workflow continues to work fine (though I'm on Alfred 3, not 2). Given that the missing Workflow Data folder that initially caused the error message is not unique to this workflow, however, I think my inclination would be to first try a reinstall and see if things get sorted that way. 


    Oddly, I'm on Alfred 3 as well (3.7.1 to be exact) 😐

    I tried to reinstall on top of it but It wouldn't fix the issue. I just tried to remove the workflow and reinstall it again and… now it works! ☜(゚ヮ゚☜)

    Don't know why I didn't think of that before. Sorry for the bother.

  4. Hey there, @avk_tp

    I'm one of the lucky few who had a API key before WR closed it.

    So until recently it worked perfectly, but today I have a weird issue.
    First I had an error saying it could mkdir inside…

    /Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/

    …that this folder didn't exist.
    So I made the missing folder "Workflow Data" myself and then the workflow was able to write a "wordreference" folder inside but now, it's still not working.
    In the debugging console I have

    [2018-12-18 16:10:32][input.scriptfilter] Queuing argument 'house'
    [2018-12-18 16:10:32][input.scriptfilter] Script with argument '(null)' finished

    Don't know what's going on but I tested the API and it's manually responding so it's not that.

    If you have any clue, it would very much appreciated. :)
     

  5. So if i understood this correctly, if i use a external script, in my case Gifify, i can't make it silent ?

     

    What i would like to do is select a movie file > run Gifify with notifications of what going on but without opening the terminal. That can't be done, right?

  6. I thought i'd give it a try and there is my first workflow.

    Nothing big here but here it is.

     

    Translate a given DOS path (file or folder) to a UNIX path and reveal it with Finder

    For the times when your coworkers give you DOS path to files on your network and you want to get there quickly, use this.

     

    Advice

    For an easier use, mounted volumes must have the same name on both PC and Mac computers on your network.

     

    Usage

    Type the keyword "path" then type the DOS path you want to convert.

     

    screenshot.png

     

    It will open Finder to file:///Volumes/C/Share/specs

     

    Features

    • The new converted UNIX path will be pasted in your clipboard.

     

    Links

    Homepage

    Download worflow

  7. Damn, you're good.

     

    Well in my example, if i add -n, it does work.

     

    But oddly, as i explained in the original topic, it wouldn't work if i translate with a sed.

     

    I had echo -n "{query}" | sed -e 's/://g;s/\\/\//g;s/^\(.*\)$/file:\/\/\/Volumes\/\1/' and the output had still the newline.

    The query before sed hasn't the newline and after it has it.

     

    I finally got it with a tr -d '\n'

     

    Took me a week to figure it out.

     

    Anyway, i can't find how to flag the topic as resolved, i guess you do that, right?

  8. Bug reproduced at both home and work.

     

    Configs :

    @home:

    OSX: 10.7

    Alfred: v2.0.1 build 173

     

    @work:

    OSX: 10.6

    Alfred: v2.0.1 build 173

     

    Origin

    This topic

     

    Step to reproduce

    NB: I did a brand new workflow to be sure it was clean of any extra hidden space or carriage return.

     

    Basically it looks like this:

    test_workflow_2.png

     

    • A keyword object with arg to pass the {query}
    • Run Script object uses /bin/bash and simply does an echo "foobar"
    • Output 1 displays the {query}
    • Output 2 displays display the text in the text field (e.g. foobar)
    • Output 3 displays the {query} passed by the script.

     

    When i trigger the workflow with "foobar" as an argument, this is what i got :

    notifs.png

     

    As you can see the {query} passed by the script has an extra space at the bottom.

     

    As harmless as it seems, it's not :)
    Can't properly use the {query} in a bash script because of this.

     

    Do you confirm?

  9. This seems fairly straight-forward. Assuming you pass a path into the workflow via the keyword? Stupid question but does the path passed to it happen to have a ' in the path? Tried wrapping the {query} in double quotes instead?

     

    So… i've been investigating. Tried many things to spot the filthy glitch.

    I finally realised that the output has an extra carriage return,  just before the closing quote i guess, which could explain why my command open with firefox doesn't work.

     

    To be sure i made a test by adding another notification output :

    test_workflow.png

    Nb: In the first script i just put an "echo "foobar""

     

    The first notification has a {query} in the input Text.

    The second has "foobar" in the input Text.

     

    And this is what i got: 

    notifications.png

     

    You can see that the first one has an extra space.

    Do you think it's a bug and if so, i should post it in the bug section of this forum, right ?

  10. Well if you find out a fix... please share it 

    I think i got something. The easiest i could find.

    It appears that, in the notification object, when you don't specify anything, the echo goes in the first place it can find, in this case the title.

    Simply, type {query} in the text slot and now you're good.

    Well, it's not bold text, but stil better that truncated text :3

  11. I'm actually going to try and put together a few example workflows of how to chain several things together. They may require a little more work than what you want for this project though. Not sure how far down this rabbit hole you want to venture.

    Well, it's still interesting & could give me others ideas even it doesn't really fit to my purpose on this one.

    I looked at several others workflows to understand "howtos" and never really found out what i needed.

    Everything is good to know. :)

  12. Sure.

     

    FYI, i ran some more tests.
    Alfred does find Aurora. If i don't specify any arguments, the script opens Aurora. So It's not what i think it was.

    I'm wondering if the {query} is really passed correctly though.

     

    Anyway, here are the screenshots.

     

    Here is my workflow:

    workflow.png

    Note that the output object "Post Notification" if for testing purpose only.

     

    Then i have a first Script (don't know if it's useful or not for you) that translate a DOS path (the {query}) into a Unix path:

    first_script.png

     

     

    And finally the script that open (well, *should* open) the translated {query} into my browser Aurora:

    second_script.png

     

    Hope it helps. :)

  13. Ok so Aurora is installed in "Users/myprofile/Applications/Aurora.app"

     

    i tried in iterm

    open -a /Users/myprofile/Applications/Aurora.app
    

    it works but don't work anymore if i add the ~

     

    Still won't work in Run script object with or without the ~

     

    Just out of curiosity, i added an script with a "pwd" command and it gave me that output :

    "/Users/myprofile/Dropbox/configs/Alfred2/Alfred.alfredpreferences/workflows/user.workflow.IDXXX"

     

    I don't know if it actually makes sense or not, but i'm a little bit confused and lost :D
     

×
×
  • Create New...