Jump to content

Mr Pennyworth

Member
  • Posts

    175
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Mr Pennyworth

  1. This is amazing!!! πŸŽ‰ Unfortunately CleanShot X doesn't have any I had to go digging into the package bundle and had to resort to strings and got lucky at some places strings /Applications/CleanShot\ X.app/Contents/PlugIns/AnnotateShareExtension.appex/Contents/MacOS/AnnotateShareExtension | grep cleanshot # printed: cleanshot://share-extension-annotate?filepath= strings /Applications/CleanShot\ X.app/Contents/PlugIns/PinShareExtension.appex/Contents/MacOS/PinShareExtension | grep cleanshot # printed: cleanshot://share-extension-pin?filepath=
  2. Thanks @Chris Messina! Damn, you should've released it!! I have a couple of questions: Did you also find out about the cleanshot:// urls from Raycast? If not, please do tell how you went about it, it might come handy for other apps! Did you extract those icons from CleanShot's assets.car? If not, again, please do tell! (I have zero design chops or any related abilities, so it might come handy to me later on)
  3. CleanShot X Workflow: Download Requiremens Alfred 4CleanShot 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.
  4. Hey @deanishe I see your "I missed 'context menu'" and I raise you to "I missed the whole paragraph about not wanting to use another app" 🀣 @vitor has a nice and gentle way of asking "have you even read the post fully?" Thanks! πŸ˜‡
  5. EDIT: the post below is a result of not reading the original post properly where the author clearly mentions they have seen BTT and don't want to use it. Take a look at BetterTouchTool. Here's forum thread discussing the same feature. Looks like exactly the thing you want:
  6. @JakeS Seems like you'll have to resort to this. If you've been programming for a while, it won't be hard at all! (would most likely involve setting breakpoints, adding print statements etc (standard ad-hoc debugging)) I need to learn a thing or two from @deanishe and do at least half as decent a job as he does in extensive, detailed documentation, logging and error reporting! sigh P.S. can you go through the whole log and search for "error", "Error", "ERROR"? Just want to make sure an error isn't buried there somewhere!
  7. Not having the logs sucks You can run the following in the terminal, and then use the workflow. That way, you can see the logs in the terminal in real time. killall AlfredGifBrowser; ./AlfredGifBrowser.app/Contents/MacOS/AlfredGifBrowser
  8. @Cyberskier @JakeS could you try the latest release and see if works on M1 macs? (I don't have access to an M1 mac) Technical details: The workflow no longer depends on nodejs
  9. @Cyberskier apologies! The workflow right now doesn't support M1, and I'm not sure how much of a work it would be to support it. Technical details if curious: The workflow ships with compiled binaries (an entire nodejs runtime and a swift app). As they aren't universal binaries, it won't work on an M1 mac. I'm working on getting rid of nodejs right now. After that, I'll look into making the swift app universal.
  10. @deanishe πŸ™πŸΌ thanks soooo much!! πŸ˜‡ @Andrew what say for borrowing from deanishe's documentation to update the JSON spec doc?
  11. Following is from the JSON spec for script filter output: I'm having trouble understanding the difference between "filetype" and "fileicon" in my tests so far, it seems like "filetype" always gives a generic blank file icon (even for folders). Take a look at this screenshot. (Download the corresponding workflow) In case you don't feel like downloading the workflow, but just want to take a look at the script filter JSON: file1="icon.png" file2="~/Desktop" file3="./" cat << EOF {"items":[ {"title": "$file1", "subtitle": "no type", "icon": {"path": "$file1"}}, {"title": "$file1", "subtitle": "type: fileicon", "icon": {"type": "fileicon", "path": "$file1"}}, {"title": "$file1", "subtitle": "type: filetype", "icon": {"type": "filetype", "path": "$file1"}}, {"title": "$file2", "subtitle": "no type", "icon": {"path": "$file2"}}, {"title": "$file2", "subtitle": "type: fileicon", "icon": {"type": "fileicon", "path": "$file2"}}, {"title": "$file2", "subtitle": "type: filetype", "icon": {"type": "filetype", "path": "$file2"}}, {"title": "$file3", "subtitle": "no type", "icon": {"path": "$file3"}}, {"title": "$file3", "subtitle": "type: fileicon", "icon": {"type": "fileicon", "path": "$file3"}}, {"title": "$file3", "subtitle": "type: filetype", "icon": {"type": "filetype", "path": "$file3"}}, ]} EOF
  12. @JakeS I'm going to get rid of the javascript and node-bundling altogether. Will post an update here once done in next day or two.
  13. That's not the setup command though. After you download and import the workflow into alfred, you need to open alfred and type .setup-gif-search. Also, can you make sure that you area either using a custom theme for alfred, or, if not, then using a duplicated version of a built-in theme? Do not use any of these: Here's how you can duplicate: Right-click on the theme name:
  14. Yep! I should change that Laziness and reluctance to learn swift. I have very little understanding of swift. Wrote only those things in swift, which felt like very difficult to write in other languages I know (Scala, Javascript, Python). Even the bundled python scripts in the swift app could be written in swift. Every once in while I get the enthusiasm: "lemme get rid of the huge JS dist, and go with a swift program instead" And it dies down quickly: "but it works"
  15. Both act on the "highlighted GIF" When the user presses cmd-enter, the highlighted GIF file gets copied to the clipboard (pasteboard data type public.file-url). In this case, if the user goes to finder, and hits cmd-v, a GIF file will appear in that folder. When the user presses option-enter, the web url of the highlighted GIF gets copied to the clipboard (pasteboard data type public.utf8-plain-text). In this case, if the user goes to any text editor, and hits cmd-v, a link like this will be pasted there: https://c.tenor.com/tVoDE6m_A0QAAAAM/jonah-hill-shriek.gif. You may ask who does the copying and option/cmd distinguishing etc. Again, the swift app. At this point, it feels like "why not spin out a separate app instead of an alfred workflow?" doesn't it? πŸ™ˆ Look at the corresponding swift code:
  16. That's where the convoluted-ness of it all comes in. Alfred has only one result (the one seen is json). This same swift app watches for keystrokes and mouse movements and passes them along to the webview. The webview accordingly highlights the corresponding GIF. Similarly, the swift app is responsible for the drag-and-drop functionality. Alfred never really sees all the GIF urls, or any other result list. He only sees one single html file. Here's the same HTML file opened in safari: In this whole thing, alfred acts as a text-input box for the query a platform (the workflow editor) that allows me to stitch multiple hodge-podge scripts to get the final thing working
  17. @deanishe Haha I'm so embarrassed right now! πŸ™ˆ I'm doing things in a very convoluted manner For each response the `gifHtml` part is different. For example, you searched for "scream", so it created `scream-gifs.html.html` (meaning to delete that double extension too 🀣) That response is then piped into a python script. The python script creates css that matches alfred's theme and then sends the html from (1) and this css to the swift app The swift app displays injects the css into the html, and displays this injected html in a webview TL;DR: the json is not the same, as the html filename is query-specific What I presently can't seem to figure out is why the swift app never displays the webview for both you and @Miteg !
  18. @Miteg I was wondering whether the problem could be because of BigSur. So I borrowed a BigSur macbook from someone, installed the workflow (0.1.1), and checked. I was not able to reproduce the problem Can you try the following? killall AlfredGifBrowser in terminal killall gif-downloader.bin in terminal Delete the workflow Delete AlfredGifBrowser from Security & Privacy > Accessibility (not just disable, but remove the entry completely) Download and install version 0.1.1 (which fixes issues @deanishe mentioned) Given that the downloader did download the gifs (as I can see from your logs), it feels like the gif browser is not making itself visible. Here's a last resort thing to really make sure the accessibility permissions are accurate: You have already downloaded 0.1.1 above and installed, still the gif browser doesn't show up killall AlfredGifBrowser in terminal Delete AlfredGifBrowser from Security & Privacy > Accessibility (not just disable, but remove the entry completely) Manually add AlfredGifBrowser app to that list again and enable it. Open the workflow folder Drag AlfredGifBrowser from that folder into the accessibility permissions list Enable the checkbox for it
  19. πŸ™ˆ Thanks! Fixed! That error doesn't affect the working of the workflow, but definitely not a good idea to pollute the log with red herrings! Thanks again πŸ˜‡! Fixed!
  20. @Miteg Seems like the gif-downloader.bin keeps crashing. I wonder what is causing the crash. Can you post the contents of /tmp/alfred-gif-search.log?
  21. @Miteg Thanks for the logs! Can you confirm the following? - you are on latest Alfred version (4.3 or above) - you have downloaded the latest workflow (0.1.0) - you are on an intel mac (I haven't tested the workflow on M1 macs) - when you run the following two commands in terminal, you get some number - `pgrep gif-downloader.bin` - `pgrep AlfredGifBrowser` - when you visit http://localhost:8910/?query=haha in your browser, you get some JSON output. Let me know which one of the above fails (if any)
  22. @Miteg That's all right, that's the part of the set up. Every time you run ".setup-gif-search", it is going to ask you to grant the permission. I have a feeling it is already installed correctly. Did you try running it? If it doesn't work, post the debug log here and I can take a look. P.S.: It is not good design that the setup exits without an indication of success. Also, let me see if I can make it such that if someone runs setup multiple times, it doesn't prompt for permissions if already given.
  23. In the meanwhile, if you insist on CSV instead of excel sheets, here's a workflow for you: https://github.com/mr-pennyworth/alfred-lf2csv Example setup: 1) set hotkey to cmd+option+c 2) in the workflow editor, select the list filter you want to export as csv 3) press the hotkey (cmd+option+c), alfred should have a CSV file ready to be dragged-and-dropped
  24. If like me, you don't care about what emacs does with ⌘-v by default, you can add the following to your ~/.emacs ;; Make macOS paste work with ⌘-v (global-set-key (kbd "M-v") 'clipboard-yank)
×
×
  • Create New...