Jump to content

evanfuchs

Member
  • Posts

    100
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by evanfuchs

  1. I've run into an issue with the Clipboard History Viewer. If I hit Return on an item in the viewer, the item is pasted into the foreground app as expected. However, if I Command-C an item in the viewer (to avoid pasting it), rather than copying the item back to the clipboard, it copies "/Users/<username>/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/mr.pennyworth.gif/selected.gif" Disabling the workflow has no effect, but killall AlfredGifBrowser restores the expected behavior until I run the workflow again.
  2. That's perfect. Thank you. I didn't know that's how you pass the argument 😬 I had also tried changing the script filter to "with input as query" and passing the file name in the Alfred window, but I got an error either way. This was super helpful. Thanks
  3. Can't tell you how many times I tried this. At one point I got the thesaurus partially imported with a bunch of errors, then I tried to manually complete it in the workflow, until I ran up again the db entries. I deleted everything and tried once more, then it installed. As I mentioned earlier, I only had one dictionary (New Oxford American Dictionary) in the "default" folder: Terminology (Did not import this) here: /Users/<username>/Library/Dictionaries/ And this might be helpful. I found the Thesaurus and other dictionaries here: /System/Library/AssetsV2/PreinstalledAssetsV2/InstallWithOs/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/ Thanks again for all your help!
  4. Thanks @dfay - I did try that, and I get another error. I cant post this as code so here is a screenshot of the debugger. I am running the the script filter with a space followed by the file name like this: Fuzzy List Filter list.csv Is that correct?
  5. That makes sense. When I change theFile = "list.csv" to theFile = sys.argv[1] I get an error NameError: name 'sys' is not defined whenever I try to provide any argument. As I said, I don't know what I am doing but I am trying
  6. I know this can be done by iterating through multiple csv files in the original script, but I don't know how to do that. Trying to help myself and anyone who might stumble across this, this works: Add another csv file (list2.csv) to the workflow directory Duplicate fuzzylist.py (fuzzylist2.py), and change the following line: Change theFile="list.csv" to theFile="list2.csv" Duplicate the Script Filter Object and change the reference to fuzzylist.py to fuzzylist2.py in its script.
  7. Odd. I have several Dictionaries (Thesaurus, Wikipedia, Terminology) enabled as shown in Dictionary.app Preferences, which work fine in the app, but there is only the one in '/System/Library/AssetsV2/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/' The "Open Dictionaries Folder" under File menu takes me to /Users/xxx/Library/Dictionaries/, where I have Terminology. Anyway I feel like I've taken a lot of your time! Thanks for getting me going and for sharing the workflow.
  8. Yep. Changed the theme. All good. On another note, as I mentioned earlier, the only had one dictionary option. Should I have seen others, including thesaurus? Thanks!
  9. Yes. Thanks for sticking with me. I had started over so I ran the first import command to tmp, then run it again with '/Users/<your username here>/Library/Application Support/Alfred/Workflow Data/mr.pennyworth.betterDicts' I ended up with two keys. Removed one of them and I can get to the lookup, but it's botched: Oh this is what I ran with my username: killall alfred-dict-server; killall BetterDict; ./BetterDict.app/Contents/MacOS/BetterDict import '/System/Library/AssetsV2/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/4094df88727a054b658681dfb74f23702d3c985e.asset/AssetData/New Oxford American Dictionary.dictionary' '/Users/xxx/Library/Application Support/Alfred/Workflow Data/mr.pennyworth.betterDicts'
  10. Not sure if I followed you correctly, but I tried that (with the correct username) and: No matching processes belonging to you were found Traceback (most recent call last): File "/Users/xxx/Dropbox/applications/Alfred-app/Alfred.alfredpreferences/workflows/user.workflow.E0E103F2-208F-48F7-B4DF-C096F6FDD948/BetterDict.app/Contents/Resources/__boot__.py", line 411, in <module> _run() File "/Users/xxx/Dropbox/applications/Alfred-app/Alfred.alfredpreferences/workflows/user.workflow.E0E103F2-208F-48F7-B4DF-C096F6FDD948/BetterDict.app/Contents/Resources/__boot__.py", line 394, in _run exec(compile(source, path, "exec"), globals(), globals()) File "/Users/xxx/Dropbox/applications/Alfred-app/Alfred.alfredpreferences/workflows/user.workflow.E0E103F2-208F-48F7-B4DF-C096F6FDD948/BetterDict.app/Contents/Resources/BetterDict.py", line 380, in <module> import_dict(dict_path, base_dir) File "/Users/xxx/Dropbox/applications/Alfred-app/Alfred.alfredpreferences/workflows/user.workflow.E0E103F2-208F-48F7-B4DF-C096F6FDD948/BetterDict.app/Contents/Resources/BetterDict.py", line 276, in import_dict info = dict_info(dict_path) File "/Users/xxx/Dropbox/applications/Alfred-app/Alfred.alfredpreferences/workflows/user.workflow.E0E103F2-208F-48F7-B4DF-C096F6FDD948/BetterDict.app/Contents/Resources/BetterDict.py", line 207, in dict_info return readPlist(f'{dict_path}/Contents/Info.plist') File "/Users/xxx/Dropbox/applications/Alfred-app/Alfred.alfredpreferences/workflows/user.workflow.E0E103F2-208F-48F7-B4DF-C096F6FDD948/BetterDict.app/Contents/Resources/BetterDict.py", line 65, in readPlist with open(plist_path, 'rb') as f: FileNotFoundError: [Errno 2] No such file or directory: '/Users/xxx/Dropbox/applications/Alfred-app/Alfred.alfredpreferences/workflows/user.workflow.E0E103F2-208F-48F7-B4DF-C096F6FDD948/BetterDict.app/Contents/Resources/System/Library/AssetsV2/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/4094df88727a054b658681dfb74f23702d3c985e.asset/AssetData/New Oxford American Dictionary.dictionary/Contents/Info.plist' 2020-12-03 06:56:54.727 BetterDict[2600:44830] BetterDict Error UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 2988954240 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 2988954240 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 2988954240 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 2988954240 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open
  11. @Mr Pennyworth After running that command: No matching processes belonging to you were found No matching processes belonging to you were found UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 4111266682 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 4111266682 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 4111266682 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 3818306133 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 3818306133 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 3818306133 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 3818306133 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 3077976816 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 3077976816 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 3077976816 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 3077976816 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: ignoring results because menu isn't open Unlike before, I also saw: After a bit that window went away.
  12. I installed v1.2, ran .setup-better-dictionaries, granted permission in Accessibility to AlfredExtraPane.app, then ran .dict-import. I had choice of only one dictionary: I selected that dictionary and it began installing html files until: I open Console and installation continued for a few seconds until: Fans blazing for awhile. Hotkeys did not appear in the workflow and running lookup shows: [04:48:54.140] Logging Started... [04:48:55.420] Better Dictionaries[Script Filter] Queuing argument '(null)' [04:48:55.432] Better Dictionaries[Script Filter] Script with argv '(null)' finished [04:48:55.437] ERROR: Better Dictionaries[Script Filter] Code 1: Exited with error code but no message [04:48:58.054] Better Dictionaries[Script Filter] Queuing argument '(null)' [04:48:58.126] Better Dictionaries[Script Filter] Script with argv '(null)' finished [04:48:58.128] ERROR: Better Dictionaries[Script Filter] Code 1: cat: /Users/xxx/Library/Application Support/Alfred/Workflow Data/mr.pennyworth.betterDicts/imported.json: No such file or directory Deleted the workflow, rebooted, tried again with same result. Thoughts?
  13. This has been really helpful for me with a workflow I've been running several times a day for a couple years. Thank you! I duplicated the entire workflow for an another application, but how I would go about having multiple lists within the single workflow, each with their own their own trigger? I understand list.json is generated from list.csv, so I imagine the solution would be creating another json from a different csv, but I dont know anything about python. Any help would be appreciated
  14. Connecting a File Filter to a Hotkey Trigger of your choice should do the trick.
  15. Smart! I have some notes I keep in Shortcuts on the EN sidebar for the same reason, but your idea is super low overhead. Thanks!
  16. Have you looked at the help? Take a look at just the first couple pages and I think you'll be on your way, including how to search for and open a file: https://www.alfredapp.com/help/getting-started/ https://www.alfredapp.com/help/getting-started/first-5-minutes/
  17. Can't you do this in the newer version by adding a Hotkey with argument "Selection in macOS" and setting the Copy to Clipboard output to "Automatically paste to front most app"?
  18. This workflow might interest you: You can Quick Look clipboard images with SHIFT, then Open with Preview. RETURN will save the image AND delete it from Alfred's clipboard history, but the Quick Look is non-destructive.
  19. Set up a single Keyword input (with argument required) that connects to multiple Open URL objects. Set the URL of each object to the search query used by the site you want to open, using "{query}" in place of the search term. For example, this will open a new tab and perform a Google Image search https://www.google.com/search?tbm=isch&as_q={query} . Then choose Firefox from the Browser dropdown box in each object.
  20. If the input is always in that format, one way to do it that might also give you some ideas for general use would be the Argument and Variables Utility + Replace Utility The input is keyword with No Argument. The Argument and Variables Utility with {clipboard} as the argument passes the text string from the clipboard to the Replace Utility Replace Utility is set to regex, with an expression that groups the text string received from the previous object into three groups: Group 1) "https://drive.google.com/uc?id=" Group 2) whatever is in between Groups 1 and 3 (in this case "1DwOwtpOX-tVb5xd7kws7y1oTZQCJtUtF") Group 3) "&export=download" Then replaces them with "https://drive.google.com/file/d/" + Group 2 ("1DwOwtpOX-tVb5xd7kws7y1oTZQCJtUtF") + "?usp=sharing" as the new string with gets sent as {query} to the next workflow object. From there you can output it back to the clipboard, ready to paste. My screenshot shows Large Type for output just so I could see it and compare to yours. The values in the Replace Utility are Replace regex (https:\/\/drive\.google\.com\/uc\?id=)(.*?)(&export=download) with https://drive.google.com/file/d/$2/view?usp=sharing If you want to avoid regex, you can use two Replace Utility objects: There may be prettier ways to do it, but I thought this might be helpful to see how some of these objects can be strung together.
  21. It would be handy to be able to get a larger view of images in the Clipboard Viewer, like you can in the main Alfred window by pressing Shift. The default image preview size is based on Alfred’s window size as set in Theme preferences. This feature would allow the user to “zoom” Clipboard History images as needed. Additional actions like Add to Buffer, Show Action Panel, and Save As (as in this workflow) would be even better
  22. Maybe I asked the question wrong, but I am looking for assistance specifically in repositioning Alfred's window without having to drag it. Would appreciate any suggestions.
  23. Does anyone know if it's possible to change position Alfred's window position programmatically?
  24. I like for Alfred to remember its dragged position, but I'd like to re-center the window without having to drag it with the mouse. Is it possible to manipulate Alfred's window position by keyboard, a workflow, script, etc? My goal would be to trigger Alfred, then if the window is off in a corner, hit a hotkey/keyword/shortcut to center the window and ideally leave it open for next command. Thanks
×
×
  • Create New...