Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    62

Posts posted by dfay

  1. Here you go -- rough draft at this point:

     

    https://dl.dropboxusercontent.com/u/6601556/Alfred/Ulysses Sheet Actions.alfredworkflow

     

    There are three commands:

    un - create a new sheet in Ulysses

    ua - set the active sheet to an existing sheet (requires manual entry of the sheet id for reasons discussed above)

    up - append to the active sheet (may not work consistently for reasons unclear)

     

    and a File Action

    Add to Ulysses (active for plain text and Markdown files by default) - create a new sheet with the contents of the selected file

     

    The latter could easily be extended to other file types with some pandoc magic.

     

  2. Take a look at these for examples of how to proceed:

     

    https://www.alfredforum.com/topic/2180-case-converter-including-title-case/#comment-12226

     

    https://www.alfredforum.com/topic/4818-code-case/#comment-29475

    (this may be the best model if you want to be able to preview the output)

     

    Also this one that I use but which never posted:

     

    https://dl.dropboxusercontent.com/u/6601556/Alfred/Text cleaners.alfredworkflow

  3. x-callback is working on the Mac now as of a version or 2 ago of Ulysses....it's easy enough to create a new sheet but the ids that are used still need to be gathered manually (by option-right clicking on the sheet).  Based on the code in the ulysses search workflow, I've been poking around in the Ulysses library structure, and it seems that the ids are not contained there.  That is, when I know an id, I can search every file in the library without finding that id anywhere there.  

     

    I've got a workflow working which requires the user to set an "active sheet" & then allows appending text to the active sheet (as well as creating new sheets, which is easy), but the goal of searching sheets and then appending to the selected sheet from the results seems impossible without a way to find the id programatically.

     

  4. Well the first of those issues can easily be fixed in that workflow by changing the argument to be optional, and editing main.rb (or better copying it and making a new script filter to call the edited version) with the lines

    if (search_term.length > 0)
    	puts MenuItems.generate_xml(search_term, MenuItems.generate_items())
    end

    replaced with 

    if (search_term != "")
    	puts MenuItems.generate_xml(search_term, MenuItems.generate_items())
    else
    	puts MenuItems.generate_xml("",MenuItems.generate_items())
    end

     

     

    The second issue would require third-party developers to make the commands discoverable to Alfred, which hardly seems likely especially since it's only to accommodate a few edge cases.  I'd think writing a workflow to read the Sublime Text palette commands directly might be a better solution.

  5. I use the same script in Mail Act-On and it's working fine for me.

     

    Looks like a URL encoding problem from the error messages....is this happening with every message?

     

    Usually message:// URLs will have the full domain at the end e.g. @mail.gmail.com and the like but your example only has @AMX which would lead me to think there's something with that particular message that's breaking the script.

     

     

  6. One easy option is to set up file filters for the particular directories you want to search, which may make sense if they are relatively few and fixed - https://www.alfredapp.com/help/workflows/inputs/file-filter/

     

    Another is to use the + to add a new workflow then select Examples > Dynamic File Search -- this installs a workflow that lets you search for a directory then search within it.

     

  7. Sorry missed this.  I hadn't used it for a long time but tried it out with a new Sierra install and it worked fine straight away with the exception of the Today and Notification Center commands.  It's all using AppleScript to simulate keypresses and mouse clicks, so it may depend on what your keystrokes are set to.  You could try replacing the AppleScripts with Dispatch Key Combo actions - those weren't available back when I made it.  

     

    You can fix Today and Notification Center by changing one line in the AppleScripts:

     

    click menu bar item "Notification Center" of menu bar 2

    change it to

    click menu bar item "Notification Center" of menu bar 1

     

×
×
  • Create New...