spongeblink Posted August 7, 2023 Share Posted August 7, 2023 I made a workflow that takes an argument, makes a request to the web, navigate through it, get link to some files, and stream them on my Mac. But for some file I'm experiencing trouble that despite the Script Filter and Terminal.app using the exact same Python, to execute the exact same script, with the exact same argument, the result is different, I cannot stream files from that category. I assume that the argument has some special character that Alfred processed differently than it in Terminal.app, but I just can't figure out why and how to fix or avoid this. This is how I ran it in Terminal.app (zsh), python3 /Users/myusernam/Documents/Dropbox\ -\ Maestral/Alfred\ Preferences/Alfred.alfredpreferences/workflows/user.workflow.B8A4F870-10C1-4428-8F3E-235D38E1CEE9/src_py/req_json.py "RJ01036180&&新感覚バイノーラル『 テレバーチャルヘッド』を体感しよう!" This is how I invoked it in Alfred: asmr RJ01036180&&新感覚バイノーラル『 テレバーチャルヘッド』を体感しよう! How I set the Script Filter in Alfred: Any help will be appreciated! Link to comment
spongeblink Posted August 7, 2023 Author Share Posted August 7, 2023 I have also tried quoting the argument with ' instead of " . Tried taking the input as {query}: but no luck! Link to comment
spongeblink Posted August 7, 2023 Author Share Posted August 7, 2023 The problem seemed to be that the character バ and ド using two different patterns to encode, when the file name server gave me got placed in Alfred, the pattern changes and got passed in the script using another pattern, so when I do a second match, python sees them as they different string. explained here:https://qiita.com/gretchi/items/13c0825282415e2e360d Link to comment
vitor Posted August 7, 2023 Share Posted August 7, 2023 That is due to NSTask decomposition. Normalising it is the way to go. spongeblink 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now