stroebjo / alfred-recent

Shows the recently used file by an app directly in Alfred.
4 stars 0 forks source link

High Sierra #1

Open setegonz opened 6 years ago

setegonz commented 6 years ago

Do I need to do something special to make it work? I'm on High Sierra 10.13.3

stroebjo commented 6 years ago

I'm still on 10.12.x so I haven't tested it, but I would think ist should work.

Do you have any specific error?

setegonz commented 6 years ago

recent This is what is happening.

stroebjo commented 6 years ago

Can you please look if the Workflow outputs any form of error log?

To get the error log open the Workflow in the Alfred preferences and click on the little bug icon in the upper right ("Toggle debug mode"). A panel will open. Then leave the window open and trigger the workflow like you did in your screencapture.

setegonz commented 6 years ago

Here's the output: Starting debug for 'Recently used files by an App'

[2018-03-16 12:32:53][input.scriptfilter] Queuing argument '' [2018-03-16 12:32:53][input.scriptfilter] Script with argument '(null)' finished [2018-03-16 12:32:53][ERROR: input.scriptfilter] Code 1: Traceback (most recent call last): File "./recent.py", line 59, in items = json.loads(stdout) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 338, in loads return _default_decoder.decode(s) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 384, in raw_decode raise ValueError("No JSON object could be decoded") ValueError: No JSON object could be decoded

setegonz commented 6 years ago

@stroebjo Any idea?

stroebjo commented 6 years ago

Sorry for the late answer. Sadly from the error log I have no concrete idea what went wrong.

The Python script doesn't receive a proper JSON object with the recent files. Can you make sure that recent files are activated on your system, so you have some entries under TextEdit > File > Open Recent > …? Other than that I suppose that Apple changed something in the storage / encoding of the recently added files in 10.13.x or inside AppleScript (which I use to the fetch the recent items, and then pass dem down the python script). This is something I have to debug on my machine as soon as I will upgrade myself.

Sorry there is no better fix for now. If you want to dig around and find a fix, I'm happy to merge a pull request though! I will update this issue / provide an update as soon as I upgrade to 10.13.x.

ErikMinekus commented 6 years ago

High Sierra uses .sfl2 files, which have a slightly different format. https://github.com/mac4n6/macMRU-Parser can parse them.

setegonz commented 6 years ago

@stroebjo Is there any progress on this?

stroebjo commented 6 years ago

Sorry I haven't upgraded yet and so can still not test it. I'm happy to merge any pull request though.

stroebjo commented 5 years ago

I just want to post an update on this, I finally updated and had some time to look into this issue. Sadly I won't be able to produce a fix. While I think it's somehow possible to achieve this (the mentioned python library outputs the files somehow, but not in way to be directly usable in the current workflow), for now I won't be able to do it. It's just to time consuming to fiddle around with those plist files and get it working. Sorry.

I leave this ticket open if someone has something ti contribute, or even has a fix for this.