Jump to content

zeitlings

Member
  • Posts

    151
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by zeitlings

  1. 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.

  2. 8 hours ago, iandol said:

    You could make a pull request on github, then @vitor could evaluate if he is willing to make this change?

     

    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

     

    9 hours ago, iandol said:

    offtopic: your µBib looks awesome!

     

    Thanks!

  3. On 3/24/2024 at 12:34 PM, pewu said:

    However, there's a new kid in town, and that's Claude.ai 3, which many (myself included) find superior.

     

    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.

     

    @vitorDo 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.

  4. 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. 

  5. 54 minutes ago, Andrew said:

    setting the snapped marker count incorrectly is an easy (non-obvious) trap to fall into

     

    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.

  6. Of course, but I think I already located the problem, which is partly due to a lapse on my side: 

     

    image.thumb.png.374635f036ab39be4d75501d9f11f03c.png

     

    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.

     

  7. Hey,

     

    I am working on the next evolution of the workflow. The major changes involve the addition of an agenda, the possibility to create new events using natural language, improvements of the week view and an overall redesign. For now, the search function stays true to what it was, except that it is handled internally.

     

    I'm announcing this, because I'm looking for some of you to beta test the workflow as I'm somewhat pushing the limits of what can be achieved with Alfred's plain text result items, and would appreciate knowing that it works well on different machines with different configurations. 

     

    For the potential beta tester:

    • I am using the same tricks to right-align the icons that I use to create the tidy block calendar, and would like to know if the layout of the results (e.g. a listed calendar event) succeeds with your custom theme and configuration.
    • One of the key challenges is to present all the relevant information clearly, given Alfred's limitations in displaying data, without making the view feel cluttered and distracting.  I'd like to get your feedback on how well this works, and your suggestions on how to possibly improve the views. Especially the agenda. 
    • I'd also like you to test the new features and let me know if they (a) work for you as expected, (b) are intuitive for you or not, (c) are buggy in any way or broken due to your locale.
    • Permissions authentication has changed recently, and I am wondering if you are having problems granting access to your calendars, and if so, how you may have resolved them.

    Note that the workflow requires Apple's SF Symbols to be installed for the icons to show.

    Please let me know if you're interested!

     

     

    Here are some previews:

     

    cc1.thumb.png.f8fec82b17cef9ba3b56f00870ca64ef.pngimage.thumb.png.099c90518fcba530d01f18b45665b066.png

    image.thumb.png.4cc01894eed9cea56efceebf57f56ffd.png

    cc4.thumb.png.fdbf10586e5dbf9e08643a1cec8deaf6.png

    (Creating an event, you can adjust the day using > and <, as well as the time using + and -)

    cc5.thumb.png.3d889c1f8499bcd5b141644c2ce6409e.pngcc6.thumb.png.4d5bd00d1d12d529e87c63ace69fe7fd.png

  8. Hey @majoja

     

    On 3/25/2024 at 9:34 AM, majoja said:

    # open events and calendars in fantastical??

     

    I haven't been using fantastical since they've switched to the subscription model. Unfortunately, I won't be able to debug without access to the application.

     

    On 3/25/2024 at 9:34 AM, majoja said:

    # search including the location??

     

    Looking at the code, the location should already have been matched when searching. I can't say why it is not working for you. That being said, I've been reworking the app / workflow recently, so I won't adjust the current version anymore. It shouldn't be too long before the update comes out though.

  9. The script filter expects a specific JSON object as a result that contains information about what to display. Instead of echoing the argument directly, you have to wrap it in this format if you want it to "see" what you typed. Otherwise Alfred will jump to the default fallback because it doesn't know what to do. There is a script filter example under the "getting started" section when creating a new workflow that lets you inspect the format.

     

    In short, you would want to do something like this:

     

    local input="placeholder"
    [[ ! -z "$1" ]] && input="$1"
    
    cat << EOB
    {"items": [
    	{
    		"title": "$input",
    		"subtitle": "$input",
    		"arg": "$input"
    	}
    ]}
    EOB

     

  10. Hey!

    I just updated the workflow. The most important additions are an optional integration with OpenAI for creating literature review summaries from your documents, and a window and tab switcher for active document windows. Consider setting a hotkey for the switcher, and, of course, be aware that using GPT-4 Turbo can become expensive quickly.

     

    dvn-gpt.thumb.png.73443ea278445bb5f902d9ebfd1141af.pngdvn-awd.thumb.png.652a675fce6845baad69f0bee15c155b.png

     

    Download: 

    GitHub Release

     

    Here is the full change log:

     

    v1.1.0

    • Added window and tab switcher: accessible through global option (dvn .w) or via shortcut
      • Merge (filtered) windows and tabs into window with tabs
      • Detach tab and open in new window (modifier: ⌘)
    • Added optional OpenAI integration, i.e. an interface for creating literature review summaries from documents at the record action level.
      • Save as markdown annotation file or custom metadata entry. The custom metadata entry allows for copying the summary from the record action interface.
    • Added global option to list all tags dvn .
    • Added global inline tag retrieval dvn #tagname
    • Added global option to delete workspaces (dvn .)
    • Added global option to synchronize all databases (dvn .)
    • Added modifier to synchronize database (modifier: ⌃)
    • Added option to back out of move, replicate, duplicate record
    • Added placeholders for various fetch operations
    • Added hints that an existing workspace will be updated when trying to save a workspace with an already used name
    • Fixed unhandled case with no open database
    • Fixed excluded databases being included in tag search
    • Fixed attempts to save new workspaces with an empty name not being suppressed
    • Refined overall inline tag handling

     

     

     

  11. Hey @wilsonlyt

      

    23 hours ago, wilsonlyt said:

    Is it possible to search tags easily across databases?

     

    Looks like it isn’t. I will add it as an option under dvn . when I get to it. While searching a specific database, e.g. via dvn |dbs|3| you can search for tags by just typing # and the first letter(s) of the tag you are looking for. Here is some more info on this. I'll try to make it available globally for the next update, too. 

    image.png.e0b9097a2fc472086e187a7815193127.png

     

    23 hours ago, wilsonlyt said:

    is it possible for the brute search to include certain groups or tags like how the devonthink search works?

     

    Unfortunately no. The "brute force search" just uses Alfred's file filter which looks into the metadata of files and there is no information on groups or tags available for those afaik.

     

    23 hours ago, wilsonlyt said:

    I am quite confused about the record action part, there is a record action A and B, how might I 'activate it'? I can press enter in a file and show the a part, but how could I show the B part. 

     

    Part A is just what you see first when you enter the record actions, i.e. the first 9 items. For "part B" stride down with your arrow keys, they are the items that are just not in view yet. 

     

    23 hours ago, wilsonlyt said:

    regarding the universal action part, I cannot 'activate' the dvn|sel and the dvn|uni, and I don't quite understand these functionality.

     

    Universal Actions are one of the features of Alfred (and something you really should familiarize yourself with to get the most out of Alfred!).

    It let's you act on your selection in macOS after pressing a shortcut. From the support page: Alfred uses / by default.

     

    To act on one or more files from your DEVONthink database, try selecting these files and pressing command+shift+D. This will bring up the view for |sel|. Choosing to act on all records here is equivalent to selecting the same files, launching Alfred’s Universal-Action-Panel and activating the Action specific to the workflow; this will bring up the view for |uni|. This works from within the DEVONthink database and outside of it. If you send files to the dvn specific Action that are not already in a database, you will not see options to act on the records. Instead, you will see options that allow you to import the new files.

    dvn-hotkey-dt3-selection.png

    dvn-buffer3-universal-action2.png

    dvn-buffer2-universal-action1.png

    dvn-import.png

     

     

    Also, thanks for the feedback!

  12. On 10/15/2023 at 5:11 AM, TomBenz said:

    In OCR Light, please consider adding universal file action to process OCR image file and copy the content to clipboard.

    Added to version 1.2.0

    image.thumb.png.7bac92e7e36e7c286731143aac7949ba.png

     

    OCR Light v1.2.0

    • Add File Action to extract text from images
    • Fix for macOS Sonoma (Compiles the script en passant to compensate for the failure to link objc symbols on macOS 14).
  13. @Belfong try to make it a habit to press Shift ⇧ to preview, as this will work for anything that can be previewed. Pressing return will always either pass an argument or cause an autocomplete. It is possible to show a quicklook preview this way, but it will open in a new window that has to be closed manually. At this point you can just open the dictionary application, which I think defeats the purpose.

  14. 4 hours ago, biati said:

    Other users have confirmed that this has been fixed

     

    That's a bit puzzling as the latest release on Github is v4.0.5 and the version I have via the Gallery, and that is the one with the error, is also v4.0.5. 

     

    4 hours ago, biati said:

    If you need more help please create an issue on Github, I do not provide support here.

     

    No worries, with an entered API key everything is fine. It is just that if no API key is provided, the warning message does not appear in Alfred, but rather, the workflow simply fails silently. 

     

    The returned JSON should rather look something like this:

     

    {"items":[{"title":"You need to configure the API key for Fixer","valid":false,"arg":""}]}

     

  15. I just updated the workflow from the gallery.

     

    [11:04:03.609] ERROR: Calculate Anything[Script Filter] JSON is missing expected keys; items, variables or rerunafter:
    {"items":{"0":{"title":"You need to configure the API key for Fixer","valid":false,"arg":""},"rerun":false}}

     

    You're assigning a boolean to the `rerun` key, but it expects a float. This results in no response item being displayed at all.

    It's probably best to not set a rerun value at all unless I'm missing something: here and here.

×
×
  • Create New...