dfay Posted April 19, 2017 Share Posted April 19, 2017 4 hours ago, deanishe said: Call it Odysseus stately-plump-buck-mulligan was taken? deanishe 1 Link to comment
deanishe Posted April 19, 2017 Share Posted April 19, 2017 No punctuation in package names, alas. Joyce would approve. Link to comment
robwalton Posted April 19, 2017 Author Share Posted April 19, 2017 The vote came in for Boaty McBoatFace I'm afraid. deanishe, dfay and Vero 3 Link to comment
deanishe Posted April 19, 2017 Share Posted April 19, 2017 Sorry. All got a bit too highbrow there. @robwalton keeping it real. Link to comment
robwalton Posted April 20, 2017 Author Share Posted April 20, 2017 (edited) I've extracted the xcall part of ulysses-python-client into a separate project python-xcall. I think this could be quite a handy tool and I'll try and put this up on PyPi if I can work out how to distribute the lib folder including Martin's xcall.app. Seems like pip wheels are the key! Then maybe after doing some actual work I'll include your ul command @dfayinto the ulysses workflow this thread is supposed to be about Edited April 20, 2017 by deanishe fix URL Link to comment
dfay Posted April 20, 2017 Share Posted April 20, 2017 This reminds me I meant to post about a weird issue I had last night. I kept getting a message "xcall.app is no longer running". In activity monitor there were like nine instances of xcall active. I had to kill them all manually before the workflow would work again. Link to comment
robwalton Posted April 20, 2017 Author Share Posted April 20, 2017 4 minutes ago, dfay said: This reminds me I meant to post about a weird issue I had last night. I kept getting a message "xcall.app is no longer running". In activity monitor there were like nine instances of xcall active. I had to kill them all manually before the workflow would work again. Uh oh! I must have called it thousands of times with automated testing and haven't noticed this. But I noticed sometimes when calling ulysses with a wrong id there are long delays in returning. Possibly there might be other causes of this too. I wonder if your issue might be caused by making a call before another has returned and it all getting out of sync? I'll see if I can reproduce. Also, you mentioned a while back: Quote One thing I noticed, though, was that the authentication token I'd acquired earlier today no longer worked and I had to re-authenticate. Have you been able to consistently use the same token without repeat re-authentication? I've not seen a problem with this one. Even if you request new token, old ones seem to keep working. Link to comment
dfay Posted April 20, 2017 Share Posted April 20, 2017 Just ran into another issue when I sat down at my iMac for the first time in a week....workflows sync via Dropbox but of course Ulysses authentication tokens are not the same from one Mac installation to another. I think I will need to do something like this and pass the authentication token when I call the script in the Script Filter. Unless you see a better way. Link to comment
deanishe Posted April 20, 2017 Share Posted April 20, 2017 (edited) @robwalton I'm looking over the workflow code. There's no need for such long imports. The AW API is defined in __init__.py. from workflow import Workflow3 is enough, unless you're using some internal functions—at your peril Edited April 20, 2017 by deanishe Link to comment
robwalton Posted April 20, 2017 Author Share Posted April 20, 2017 22 minutes ago, deanishe said: @robwalton I'm looking over the workflow code. There's no need for such long imports. The AW API is defined in __init__.py. from workflow import Workflow3 is enough, unless you're using some internal functions—at your peril Thanks Python tutor . I've fixed this on my local development version (it did feel a bit clunky at the time). I have a huge project in my day job which would could probably do with using defining package APIs in __init__s. Will look at that too. I did a huge refactor of that a while back to make it less Java-like, but I guess I still missed some Python tricks. BTW, is there is there a good way to get Alfred to run off a git repo's working copy? Now I ask it: I guess I could just replace my e.g user.workflow.A661A55B-8CCD-4E74-BC15-54528262B74E folder with a symbolic link to my git working copy? Link to comment
deanishe Posted April 20, 2017 Share Posted April 20, 2017 11 minutes ago, robwalton said: BTW, is there is there a good way to get Alfred to run off a git repo's working copy? https://gist.github.com/deanishe/35faae3e7f89f629a94e robwalton 1 Link to comment
robwalton Posted April 22, 2017 Author Share Posted April 22, 2017 On 13/04/2017 at 1:43 AM, dfay said: I poked around in the XML in the library a bit and it seems that the DisplayName for my root is set to "On My Mac" even though it is in fact in iCloud. Seems like a Ulysses bug that is otherwise invisible but which the workflow may make evident by using the DisplayName? Just a guess. Hi there, just integrating the x-callback stuff into ulysses workflow. I think I will go back to supporting iCloud only for now as this seems more trouble than its worth (unless you got further analysing it?) Link to comment
robwalton Posted April 22, 2017 Author Share Posted April 22, 2017 On 20/04/2017 at 5:56 PM, dfay said: Just ran into another issue when I sat down at my iMac for the first time in a week....workflows sync via Dropbox but of course Ulysses authentication tokens are not the same from one Mac installation to another. I think I will need to do something like this and pass the authentication token when I call the script in the Script Filter. Unless you see a better way. Thanks @dfay, I'll get this bit working in the workflow first. I think that in bringing in the x-callback stuff, given the lack of tests in the workflow, I'll run old and new next to each other for a bit with some assertions. May still be a bit until I add your new commands, as will be working on foundations. Thanks for your ideas, work and debugging to date! --Rob Link to comment
robwalton Posted April 22, 2017 Author Share Posted April 22, 2017 On 20/04/2017 at 5:28 PM, robwalton said: This reminds me I meant to post about a weird issue I had last night. I kept getting a message "xcall.app is no longer running". In activity monitor there were like nine instances of xcall active. I had to kill them all manually before the workflow would work again. Hi again, I tried pretty hard to reproduce by firing off call from threads in parallel, but seemed okay. I haven't checked if xcall is thrad/process safe yet, but a quick glance in the code makes me think not. For this, and your issue, python-xcall now throws an AssertionError if it finds xcall already running. There is 20-30ms period after making one call where a second will still go through though. It should help a bit--and it might help you diagnose want wrong for you? The real solution is (from the outside of xcall at least) is a file lock--but those cause so much grief! Link to comment
robwalton Posted April 22, 2017 Author Share Posted April 22, 2017 On 19/04/2017 at 6:42 AM, dfay said: Actually there's a typo in Rob's code … in ulysses_calls.py -- open_recent() should call the URL that patgilmour pasted above. Whoops! Thanks for spotting that. No tests for those bits. Have fixed the workflow on master. Will have to start thinking about a release when it settles down. Link to comment
derekvan Posted August 7, 2017 Share Posted August 7, 2017 This workflow is amazing. Thanks for sharing it! I am getting a few issues though. un : this command only sometimes creates a new sheet. Mostly it opens ulysses and does nothing else. I believe, but am not certain, that it will never create a new sheet in a group I have created, but will always create a new sheet if I select the "inbox" as the destination. uo : this command typically calls command-o to whatever app is open when I invoke it. Thus, it will work if Ulysses is already open, but not if some other app is open. Link to comment
dfay Posted October 28, 2017 Share Posted October 28, 2017 Hi Rob I am getting the same issue described above with uo . Also using any of u ug uf us throws a KeyError: 'displayName' full message here: [2017-10-28 10:51:16][ERROR: input.scriptfilter] Code 1: ulysses_items.py:124: SyntaxWarning: assertion is always true, perhaps remove parentheses? assert (os.path.exists(args.limit_scope_dir), 10:51:15 workflow.py:2249 DEBUG workflow version: 1.0.0 10:51:15 workflow.py:1657 DEBUG reading settings from /Users/usernamehere/Library/Application Support/Alfred 3/Workflow Data/com.github.robwalton.alfred-ulysses-workflow/settings.json 10:51:15 workflow.py:2532 DEBUG Update check not due 10:51:15 ulysses_items.py:57 INFO ulysses_items.main(wf): args = Namespace(kind='sheet', limit_scope_dir=None, query='', search_content=False, search_ulysses_path=True) 10:51:15 workflow.py:1884 DEBUG loading cached data: /Users/usernamehere/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.github.robwalton.alfred-ulysses-workflow/__workflow_update_status.cpickle 10:51:15 workflow.py:2462 DEBUG update_data: {u'available': False} 10:51:15 ulysses_items.py:82 INFO Added iCloud items from '/Users/usernamehere/Library/Mobile Documents/X5AZV975AG~com~soulmen~ulysses3/Documents/Library/Groups-ulgroup' 10:51:16 ulysses_items.py:82 INFO Added iCloud Inbox items from '/Users/usernamehere/Library/Mobile Documents/X5AZV975AG~com~soulmen~ulysses3/Documents/Library/Unfiled-ulgroup' 10:51:16 workflow.py:2267 ERROR 'displayName' Traceback (most recent call last): File "/Users/usernamehere/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A4FD89F-3A79-4823-934E-855B611DA3DD/workflow/workflow.py", line 2260, in run func(self) File "ulysses_items.py", line 85, in main include_sheets) File "ulysses_items.py", line 145, in parse_ulysses_for_groups_and_sheets groups_tree = parse_ulysses.create_tree(root_dir, None) File "/Users/usernamehere/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A4FD89F-3A79-4823-934E-855B611DA3DD/parse_ulysses.py", line 113, in create_tree group = Group(rootgroupdir, parent_group) File "/Users/usernamehere/Dropbox/Sync/Alfred/Alfred.alfredpreferences/workflows/user.workflow.8A4FD89F-3A79-4823-934E-855B611DA3DD/parse_ulysses.py", line 63, in __init__ join(self.dirpath, 'Info.ulgroup'))['displayName'] KeyError: 'displayName' 10:51:16 workflow.py:2269 INFO for assistance, see: https://github.com/robwalton/alfred-ulysses-workflow 10:51:16 workflow.py:2290 DEBUG workflow finished in 0.313 seconds Joel a 1 Link to comment
apoc527 Posted November 22, 2017 Share Posted November 22, 2017 Has anyone found a way to fix this workflow with Ulysses 12? Link to comment
40-02 Posted December 12, 2017 Share Posted December 12, 2017 :'( workflow is broken for the latest Ulysses or OsX Link to comment
robwalton Posted December 17, 2017 Author Share Posted December 17, 2017 (edited) Hi @40-02, @apoc527, @dfay (thanks for the stack trace). Thanks for the reports that the workflow is broken with Ulysses 12. I had the same problem. Try this new release v1.0.2. Please let me know if it looks okay and I'll upload it to Packal later and close issue. Thanks. EDIT: updated link to v1.0.2 as I've also fixed the 'uo' command to work with the new app name (although this one always has mixed results and I've tweaked the way it wants for ulysses to be ready to receive cmd-O. Edited December 17, 2017 by robwalton Link to comment
40-02 Posted December 17, 2017 Share Posted December 17, 2017 (edited) Thanks, It seems like it works now. Edited December 17, 2017 by 40-02 Link to comment
dfay Posted December 18, 2017 Share Posted December 18, 2017 Yes, seems to be working for me again, too -- thanks again Rob Link to comment
alfredclough Posted January 8, 2018 Share Posted January 8, 2018 Just want to say this workflow is amazing--it makes working with Ulysses so much more efficient. Link to comment
robwalton Posted January 9, 2018 Author Share Posted January 9, 2018 On 08/01/2018 at 4:23 AM, alfredclough said: Just want to say this workflow is amazing--it makes working with Ulysses so much more efficient. Thanks for the positive feedback. I've started using Ulysses after a bit of a break and I'm just remembering how the workflow works again! Link to comment
robwalton Posted January 9, 2018 Author Share Posted January 9, 2018 (edited) How would a ulysses temporary 'context' work? I'm finding myself spending more extended periods working in one group than I used to. I'm imaging two new commands: * usc -- Select a group to act as a search-limiting context and open that group; no argument to clear. * uc -- Open a sheet or group from within the search-limiting context; warns if no context set. Would anyone else use this? or any better suggestions! Edited January 9, 2018 by robwalton typo 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