jonteamere Posted April 23, 2016 Share Posted April 23, 2016 (edited) Currently there are workflows that append text from Alfred to Evernote (using Applescript) AND from Alfred to plain text files (using Bash). I'm really interested in doing the same sort of thing with Ulysses III. I'd like to be able to type a string of text in Alfred, hit enter, and have that text append to a specific sheet within Ulysses. Any developers interested in taking this on? I'm certainly willing to pay for your time. I'm also looking for any thoughts on how I could attempt to accomplish this. Edited April 23, 2016 by jonteamere Link to comment
deanishe Posted April 23, 2016 Share Posted April 23, 2016 I don't have Ulysses, so this is very general. First of all, does Ulysses have AppleScript support or another API for interacting with the application? Alternatively, it appears you can add files to Ulysses' data directory. Appending text to existing RTF files would be a good deal more complicated, however. Link to comment
jonteamere Posted April 23, 2016 Author Share Posted April 23, 2016 I'm not entirely sure about Applescript as I can't find anything on it. The only thing I've seen talk about is x callback, Apparently, x callback allows you to append text, but I'm not sure how URL schemes work (nor if it can be used from/on mac). Link to comment
deanishe Posted April 23, 2016 Share Posted April 23, 2016 I've downloaded the demo, and the URL scheme will allow you to append text to a specific sheet. It doesn't appear possible to get a list of sheets, however. (At least not easily.) Link to comment
jonteamere Posted April 23, 2016 Author Share Posted April 23, 2016 How would you set that up with Alfred? That's the part I'm struggling with. From what I understand, x callback is commonly used for iOS → Mac. Link to comment
FroZen_X Posted April 23, 2016 Share Posted April 23, 2016 How would you set that up with Alfred? That's the part I'm struggling with. From what I understand, x callback is commonly used for iOS → Mac. Create a new Workflow->Add a input like a keyword->Add the output "Open URL" and there you just insert the x-call Here is an example: https://www.dropbox.com/s/ffjjf5lno0bipw9/Test%20workflow.alfredworkflow?dl=0 jonteamere 1 Link to comment
jonteamere Posted April 23, 2016 Author Share Posted April 23, 2016 Wow. I swear I looked at all the outputs. Guess not. Thanks FroZen_X Link to comment
jonteamere Posted April 23, 2016 Author Share Posted April 23, 2016 Apparently, you find the required sheet identifier using the iPad app. That's kind of dumb. I guess I'll suffer until the developers add Applescript support or an API. Link to comment
FroZen_X Posted April 23, 2016 Share Posted April 23, 2016 you're welcome Maybe this here also helps you tho: http://www.alfredforum.com/topic/1915-search-ulysses-iii-from-alfred/ I didn't test it myself but if it works, then its maybe that what you want ^^ Link to comment
FroZen_X Posted April 24, 2016 Share Posted April 24, 2016 (edited) I just tested it out and it works in a way...somehow Alfred cannot look into the ulysses files and therefore not find keywords with the filefilter. Therefore you can only find files like "a8f066c020c94be1becc9710a92ba214.ulysses" -.- no clue what they've changed :/ To get the filefilter work you have to add "Library/Containers" under Search Scope. This doesn't help much yet, but you know what's wrong and maybe the developers know any more. Edit: What you can do however is to add a external folder in Ulysses and add this folder to the search scope of the Filefilter. Then create a new sheet via ulysses in this folder and drag this File(extension should be .md) into the "File types" of the Filefilter like this: Then you can search for the different Sheets Edit2: Just checked again lol this is not what you're looking for. However maybe this helps someone else or you too with another problem^^ In addition to that i tested the x-callback and its only for iOS it seems. Hopefully yeah they add Applescript support and/or URL Handler like Fantastical did. Edited April 24, 2016 by FroZen_X Link to comment
dfay Posted January 29, 2017 Share Posted January 29, 2017 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. Link to comment
jonteamere Posted January 29, 2017 Author Share Posted January 29, 2017 @dfay I'd be interested in seeing what you have. I'm all about some Ulysses. Thank you for checking back. Link to comment
dfay Posted February 2, 2017 Share Posted February 2, 2017 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. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now