Jump to content

zeitlings

Member
  • Posts

    168
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by zeitlings

  1. Ah, I also ran into that problem a while ago. I dealt with it by base64 encoding the argument before calling the trigger and decoding it on the receiving end. Here is a quick demo: https://transfer.archivete.am/yjrd8/Demo Base64 External Trigger.alfredworkflow The shell commands: echo -n "$1" | base64 echo -n "$1" | base64 --decode And I'm just noticing that there actually are Automation Tasks for that already, namely: - Binary Encode Text > Base64 - Binary Decode Text > Base64
  2. I'll use the occasion to integrate a few more browsers 😄 Default Browser v1.3.1 - adds Orion - adds SigmaOS - adds Ghost Browser Should be updated on the gallery soon, too. No need to download from Github.
  3. Thanks! That's already helpful. However, in my tests, this works iff arg is a (valid) file path while the action override is ignored. This is reminiscent of this earlier observation. Here is a version of the color picker workflow where I'm testing this. There are a few of my attempts in get_history.sh that populates the grid view. https://transfer.archivete.am/GvjVB/Color Picker v1.2.1-grid-view-trouble-shooting.alfredworkflow
  4. I noticed that this only works if the source is “Object Input”. If the source is “Script” and the item’s JSON has a file path as arg or action, nothing can be pushed to the file buffer. Is there a trick to it to make this work with the grid view, or is that a bug? On a similar note, setting copy also does not work (no text can copied with cmd+c) while largetype does work.
  5. I just updated the workflow with some fixes, convenience features, optional auto-suggest and added support for creating Xcode playgrounds. v1.2.0 Added support for new Xcode Playgrounds Added optional auto-suggest for file extensions v1.1.0 Added output location selection (keyword modifier: ⌘) Added configurable keyword (default: new) Added keyword to open the workflow configuration (default: :new) Fixed line breaks not being preserved when creating a new file via the input mask Improved creating new file with initial input being preserved @Mods, could you update the documentation in the first post with this? Usage Keyboard Shortcut If the post-haste behavior is enabled, new files are created the same way as folders are when you use the shortcut (default: ⌥+⇧+N). Otherwise you will be prompted with the input mask where you can configure the file name and type. Keyword The workflow will pick up on your location in the Finder and create the new file there. If you use the keyword (default: new), the most recently used Finder window will be selected as the destination. If no Finder window is currently open, the file will be created in the configurable fallback location. Alternatively, press ⌘+↩ to explicitly specify an output location. Creating a new file ⌘ to view the full path to the target folder. ↩ to create the file with configured settings. ⌘+⇧+↩ to create the file with clipboard contents. ⌥+⇧+↩ to create the file without clipboard contents. Bonus: In addition to all plain-text type files, the workflow can also quickly create docx, doc, odt, rtf, rtfd files and Xcode playgrounds. Auto-Suggest If auto-suggest is enabled, press TAB to accept and expand the suggested filename.
  6. @clement You can try again now with the updated version from Github. Let me know if it works!
  7. Your OS is too old for at least one of the functions called here. I'll check if I can add support for macOS 12.
  8. Almost the same thing, but with your quotes and an additional method to provide your input. You can also paste your quotes in the Arg and Vars object, where you don't have to wrap your text in "cat << EOB / EOB". You just need to decide on a delimiter with either approach. https://transfer.archivete.am/h0bL1/Test | Quote Randomizer.alfredworkflow
  9. Uhm, in that example the quotes are separated by three equal signs "===" and the Split arg is set to split accordingly. If your separator differs, you will have to change it to the delimiter you need. Also, note that you will need to preserve the cat << EOB in the beginning and EOB at the end of the Run Script object. Your quotes would go in between those two. Never mind though, if Vero's solution is working for you. In that case I am suggesting an unnecessarily complicated solution anyway.
  10. In the meantime, here is a quick workaround: https://transfer.archivete.am/I2fsB/Test | Quote Randomizer.alfredworkflow
  11. Compress PDF documents. Usage Either invoke the workflow by using the keyword (default: pdfcompress) and locate a PDF, or send a PDF to the workflow's "Compress PDF Document" File Action. A compression preset can be selected by pressing ⌥ before proceeding with ↩. File Filter ↩ Proceed to compress the PDF using the default strategy. ⌥↩ Select a compression preset. File Action ↩ Proceed to compress the PDF using the default strategy. ⌥↩ Select a compression preset. Compression Presets ↩ Proceed to compress the PDF using the selected strategy. The result will be a compressed document in the same location as the source PDF file. Dependencies With Homebrew install Ghostscript: brew install gs
  12. Easily extract a specific page range from an existing PDF document and create a new PDF file with the selected pages. Usage Either invoke the workflow by using the keyword (default: pdfsplit) and locate a PDF, or send a PDF to the workflow's File Action. Specify the start and end pages of the range you want to be extracted. The specified first and last page can be previewed by pressing the ⌘ modifier. Specifying the Pages ↩ Proceed to extract text from the specified pages. ⌘↩ Preview the first and last PDF pages w/ Alfred's PDF View. ⌥↩ Proceed, push the result to the File Buffer and action it in Alfred. Press ↩ to return to the view where you can set the start and end pages. Dependencies With Homebrew install Poppler: brew install poppler
  13. Extract text from PDF documents. Usage Extract the entire text from one or more PDFs by sending them to the workflow's File Action or locate a PDF with the File Filter by using the keyword (default: pdftotext). To extract the text from specific pages of a single document, use the ⌘ modifier. The result will be exported as a plain text document. File Filter ↩ Proceed to extract the entire text. ⌘↩ Proceed by specifing the pages to extract. ⌃↩ Proceed, push the result to the File Buffer and action it in Alfred. File Action ↩ Proceed to extract the entire text. ⌘↩ Proceed by specifing the pages to extract (single file only). ⌃↩ Proceed, push the result(s) to the File Buffer and action them in Alfred. Specifying the Pages ↩ Proceed to extract text from the specified pages. ⌘↩ Preview the first and last PDF pages w/ Alfred's PDF View. ⌥↩ Preview the contents of the first and last page w/ Alfred's Text View. ⌃↩ Proceed, push the result to the File Buffer and action it in Alfred. Press ↩ to return to the view where you can set the start and end pages. Dependencies With Homebrew install Poppler: brew install poppler
  14. I played with this yesterday and the results were rather disappointing. The most limiting factor is the lack of support for markdown tables in Alfred's Text View. Syntax highlighting would also make a big difference. There were a lot of inconsistencies with pandoc, mostly around the broken tables. Html2md, a Go cli tool, produced slightly better and more consistent results, which are still messy when thrown at the Text View as it is now. Here's another alternative I found without markdown view that holds up well: alfred-devdocs.
  15. Hey @Textdriven Unfortunately, there is no error message in the logs to suggest a solution. :cp doesn’t work because there is no color history to show yet. The only thing I can think of is this: The script is compiled on your device the first time you run the workflow. This seems to be required since macOS 14. For this to work, you may still need to install the Xcode command line tools to run the swiftc command that compiles the swift code into an executable. This can be done by running the following command in the terminal: xcode-select --install However, if I'm not mistaken, macOS should have prompted you with a popup asking you to install the command line tools if they are not present 🤷‍♂️
  16. The subtitle reads "Type a name or email address to send an email". When you start typing, you should see options from your contacts to send an email to. If the email function (built-in action) provides the pattern, then the other functions or perhaps workflows you're trying to use will require additional input.
  17. Depends on the IDE you are using... VS Code's CLI has the code --goto <filepath>:<line>:<character> command, for example. But how would a workflow be more convenient than hitting cmd+f, typing the word, and then cycling through the matches with cmd+g? About the arrow keys, I suggest setting up a "hyper key" and remapping hyper+h,j,k,l to the arrow keys via Karabiner or to just use ctrl+n, ctrl+p. Another option would be to check out how vim approaches the problem (incremental search), and to look for integrations with your IDE or to directly give (neo)vim a try. I don't think it's worth the effort, and I'm not even sure it's possible to devise a generic solution if you're looking to manipulate the scroll view of the app.
  18. The integration is not so seamless as to not break the existing code, though. However, I forked the repo, pushed all changes and applied some cosmetics. The code and standalone workflow are now up for grabs and can be integrated or not : https://github.com/zeitlings/alfred-anthropic Thanks!
  19. I got curious when I saw that all models have a 200k context window and that Claude 3 Haiku beats GPT-3-Turbo in some benchmarks at half the price. I hijacked the ChatGPT workflow to use Anthropic's API instead of OpenAI's and it now works just like the original. However, it feels kind of dirty to just throw a hijacked workflow out there. @vitor: Do you plan to include Claude in the workflow? Granted, it makes little sense since the workflow is called "ChatGPT / DALL-E", but if you do, I'll be happy to share my modifications to save you some headaches.
  20. I noticed that when stacking either the text view or the Alfred browser on top of the Alfred window, hitting Escape causes all environment variables to be lost. For my use case, I can work around the problem by looping (back into a script filter object) with an external trigger that follows the view. This recreates the stacking behavior. However, if it's not too much of a change internally, I'd like to see the environment variables preserved so that the feature can be used where the variables remain relevant.
  21. That's what I was thinking. Additional warnings that kick in dynamically when something is off will be helpful (similar to what happens when a required variable is not set in the user-facing workflow configuration), and is probably better than silently adjusting the configuration to a setting that works. I can see this causing irritation as well.
  22. Another problematic configuration with the same problem (that needs a different solution):
  23. Of course, but I think I already located the problem, which is partly due to a lapse on my side: A solution could be that when "Only Stop on Markers" is checked, the amount of markers to show defaults to the count of indices in the specified closed range (Min...Max). I.e. I should have entered 10 instead of 9, but to only have 9 markers where 10 are required to cover the range makes little sense. Going from 8 to 9 in this scenario also jumps to 10 immediately (which persists) skipping 9, but going back to 8 falls back on 7 after saving.
×
×
  • Create New...